WeappNicknameModifyAuditMapper.xml
2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.com.glsx.dj.wechat.mapper.WeappNicknameModifyAuditMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.wechat.model.WeappNicknameModifyAudit">
<id column="ID" jdbcType="INTEGER" property="id" />
<result column="APP_ID" jdbcType="VARCHAR" property="appId" />
<result column="NICKNAME" jdbcType="VARCHAR" property="nickname" />
<result column="AUDIT_ID" jdbcType="INTEGER" property="auditId" />
<result column="AUDIT_STAT" jdbcType="INTEGER" property="auditStat" />
<result column="FAIL_REASON" jdbcType="VARCHAR" property="failReason" />
<result column="CREATED_BY" jdbcType="VARCHAR" property="createdBy" />
<result column="CREATED_DATE" jdbcType="TIMESTAMP" property="createdDate" />
<result column="UPDATED_BY" jdbcType="VARCHAR" property="updatedBy" />
<result column="UPDATED_DATE" jdbcType="TIMESTAMP" property="updatedDate" />
<result column="DELETED_FLAG" jdbcType="CHAR" property="deletedFlag" />
</resultMap>
<sql id="Base_Column_List">
ID, APP_ID, NICKNAME, AUDIT_ID, AUDIT_STAT, FAIL_REASON, CREATED_BY, CREATED_DATE, UPDATED_BY, UPDATED_DATE, DELETED_FLAG
</sql>
<select id="loadByAppIdLast" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from dj_weapp_nickname_modify_audit
where APP_ID = #{appId}
order by ID desc
limit 1
</select>
<select id="search" parameterType="cn.com.glsx.dj.wechat.dto.WeappNicknameModifyAuditDTO" resultType="cn.com.glsx.dj.wechat.dto.WeappNicknameModifyAuditDTO">
select
wnma.ID id,
wnma.APP_ID appId,
wnma.NICKNAME nickname,
wbi.HEAD_IMAGE_URL logo,
sm.MERCHANT_ID merchantId,
sm.merchant_name merchantName,
wnma.AUDIT_ID auditId,
wnma.AUDIT_STAT auditStat,
wnma.FAIL_REASON failReason,
wnma.CREATED_BY createdBy,
wnma.CREATED_DATE createdDate,
wnma.UPDATED_BY updatedBy,
wnma.UPDATED_DATE updatedDate,
wnma.DELETED_FLAG deletedFlag
from
dj_weapp_nickname_modify_audit wnma
left join
dj_weapp_base_info wbi
on wnma.app_id = wbi.app_id
left join
dj_system_merchant sm
on wbi.merchant_id = sm.merchant_id
<where>
wnma.DELETED_FLAG = 'N'
<if test="merchantId != null">
and sm.merchant_id = #{merchantId}
</if>
<if test="merchantName != null">
and sm.merchant_name like concat('%', #{merchantName}, '%')
</if>
<if test="appId != null">
and wnma.app_id like concat('%', #{appId}, '%')
</if>
<if test="nickname != null">
and wnma.NICKNAME like concat('%', #{nickname}, '%')
</if>
<if test="auditStat != null">
and wnma.audit_stat = #{auditStat}
</if>
</where>
order by wnma.id desc
</select>
</mapper>