AuditConfigMapper.xml
2.39 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
<?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.lframework.xingyun.basedata.mappers.AuditConfigMapper">
<resultMap id="AuditConfig" type="com.lframework.xingyun.basedata.entity.AuditConfig">
<id column="id" property="id"/>
<result column="type" property="type"/>
<result column="enable_audit" property="enableAudit"/>
<result column="process_id" property="processId"/>
<result column="flow_code" property="processCode"/>
<result column="flow_name" property="processName"/>
<result column="create_by_id" property="createById"/>
<result column="create_by" property="createBy"/>
<result column="update_by_id" property="updateById"/>
<result column="update_by" property="updateBy"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<sql id="AuditConfig_sql">
SELECT
tb.id,
tb.type,
tb.enable_audit,
tb.process_id,
tb.create_by_id,
tb.create_by,
tb.update_by_id,
tb.update_by,
tb.create_time,
tb.update_time,
f.flow_code,
f.flow_name
FROM base_data_audit_config AS tb
LEFT JOIN flow_definition f ON tb.process_id = f.id
</sql>
<select id="query" resultMap="AuditConfig">
<include refid="AuditConfig_sql"/>
<where>
<if test="vo.type != null">
AND tb.type = #{vo.type}
</if>
</where>
</select>
<insert id="batchAdd">
INSERT INTO base_data_audit_config (
id,
type,
enable_audit,
process_id,
create_by_id,
create_by,
update_by_id,
update_by,
create_time,
update_time
) VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.id},
#{item.type},
#{item.enableAudit},
#{item.processId},
#{item.createById},
#{item.createBy},
#{item.updateById},
#{item.updateBy},
#{item.createTime},
#{item.updateTime}
)
</foreach>
</insert>
</mapper>