ReplyApprovalProcessMapper.xml
4.29 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
76
77
78
79
80
81
82
83
84
85
86
87
<?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="com.trash.casefile.mapper.ReplyApprovalProcessMapper">
<resultMap type="ReplyApprovalProcess" id="ReplyApprovalProcessResult">
<result property="id" column="id" />
<result property="tableName" column="table_name" />
<result property="tableId" column="table_id" />
<result property="instanceId" column="instance_id" />
<result property="reply" column="reply" />
<result property="replyTime" column="reply_time" />
<result property="replyImg" column="reply_img" />
<result property="replyPeople" column="reply_people" />
</resultMap>
<sql id="selectReplyApprovalProcessVo">
select id, table_name, table_id, instance_id, reply, reply_time, reply_img, reply_people from reply_approval_process
</sql>
<select id="selectReplyApprovalProcessList" parameterType="ReplyApprovalProcess" resultMap="ReplyApprovalProcessResult">
<include refid="selectReplyApprovalProcessVo"/>
<where>
<if test="tableName != null and tableName != ''"> and table_name = #{tableName}</if>
<if test="tableId != null and tableId != ''"> and table_id = #{tableId}</if>
<if test="instanceId != null and instanceId != ''"> and instance_id = #{instanceId}</if>
<if test="reply != null and reply != ''"> and reply = #{reply}</if>
<if test="replyTime != null "> and reply_time = #{replyTime}</if>
<if test="replyImg != null and replyImg != ''"> and reply_img = #{replyImg}</if>
<if test="replyPeople != null and replyPeople != ''"> and reply_people = #{replyPeople}</if>
</where>
</select>
<select id="selectReplyApprovalProcessById" parameterType="Long" resultMap="ReplyApprovalProcessResult">
<include refid="selectReplyApprovalProcessVo"/>
where id = #{id}
</select>
<insert id="insertReplyApprovalProcess" parameterType="ReplyApprovalProcess" useGeneratedKeys="true" keyProperty="id">
insert into reply_approval_process
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tableName != null">table_name,</if>
<if test="tableId != null">table_id,</if>
<if test="instanceId != null">instance_id,</if>
<if test="reply != null">reply,</if>
<if test="replyTime != null">reply_time,</if>
<if test="replyImg != null">reply_img,</if>
<if test="replyPeople != null">reply_people,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tableName != null">#{tableName},</if>
<if test="tableId != null">#{tableId},</if>
<if test="instanceId != null">#{instanceId},</if>
<if test="reply != null">#{reply},</if>
<if test="replyTime != null">#{replyTime},</if>
<if test="replyImg != null">#{replyImg},</if>
<if test="replyPeople != null">#{replyPeople},</if>
</trim>
</insert>
<update id="updateReplyApprovalProcess" parameterType="ReplyApprovalProcess">
update reply_approval_process
<trim prefix="SET" suffixOverrides=",">
<if test="tableName != null">table_name = #{tableName},</if>
<if test="tableId != null">table_id = #{tableId},</if>
<if test="instanceId != null">instance_id = #{instanceId},</if>
<if test="reply != null">reply = #{reply},</if>
<if test="replyTime != null">reply_time = #{replyTime},</if>
<if test="replyImg != null">reply_img = #{replyImg},</if>
<if test="replyPeople != null">reply_people = #{replyPeople},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteReplyApprovalProcessById" parameterType="Long">
delete from reply_approval_process where id = #{id}
</delete>
<delete id="deleteReplyApprovalProcessByIds" parameterType="String">
delete from reply_approval_process where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>