CreditDisciplineListMapper.xml
6.51 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?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.credit.cy.business.mapper.CreditDisciplineListMapper">
<resultMap type="CreditDisciplineList" id="CreditDisciplineListResult">
<result property="id" column="id" />
<result property="listType" column="list_type" />
<result property="listMeasure" column="list_measure" />
<result property="listContent" column="list_content" />
<result property="listTarget" column="list_target" />
<result property="listReason" column="list_reason" />
<result property="listEntity" column="list_entity" />
<result property="listFile" column="list_file" />
<result property="listStatus" column="list_status" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectCreditDisciplineListVo">
select id, list_type, list_measure, list_content, list_target, list_reason, list_entity, list_file, list_status, del_flag, create_by, create_time, update_by, update_time from credit_discipline_list
</sql>
<select id="selectCreditDisciplineListList" parameterType="CreditDisciplineList" resultMap="CreditDisciplineListResult">
<include refid="selectCreditDisciplineListVo"/>
<where>
<if test="listType != null and listType != ''"> and list_type = #{listType}</if>
<if test="listMeasure != null and listMeasure != ''"> and list_measure like concat('%', #{listMeasure}, '%')</if>
<if test="listContent != null and listContent != ''"> and list_content like concat('%', #{listContent}, '%')</if>
<if test="listTarget != null and listTarget != ''"> and list_target = #{listTarget}</if>
<if test="listReason != null and listReason != ''"> and list_reason = #{listReason}</if>
<if test="listEntity != null and listEntity != ''"> and list_entity like concat('%', #{listEntity}, '%')</if>
<if test="listFile != null and listFile != ''"> and list_file = #{listFile}</if>
<if test="listStatus != null "> and list_status = #{listStatus}</if>
</where>
</select>
<select id="selectCreditDisciplineListById" parameterType="Long" resultMap="CreditDisciplineListResult">
<include refid="selectCreditDisciplineListVo"/>
where id = #{id}
</select>
<insert id="insertCreditDisciplineList" parameterType="CreditDisciplineList" useGeneratedKeys="true" keyProperty="id">
insert into credit_discipline_list
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="listType != null and listType != ''">list_type,</if>
<if test="listMeasure != null and listMeasure != ''">list_measure,</if>
<if test="listContent != null and listContent != ''">list_content,</if>
<if test="listTarget != null and listTarget != ''">list_target,</if>
<if test="listReason != null and listReason != ''">list_reason,</if>
<if test="listEntity != null and listEntity != ''">list_entity,</if>
<if test="listFile != null">list_file,</if>
<if test="listStatus != null">list_status,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="listType != null and listType != ''">#{listType},</if>
<if test="listMeasure != null and listMeasure != ''">#{listMeasure},</if>
<if test="listContent != null and listContent != ''">#{listContent},</if>
<if test="listTarget != null and listTarget != ''">#{listTarget},</if>
<if test="listReason != null and listReason != ''">#{listReason},</if>
<if test="listEntity != null and listEntity != ''">#{listEntity},</if>
<if test="listFile != null">#{listFile},</if>
<if test="listStatus != null">#{listStatus},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateCreditDisciplineList" parameterType="CreditDisciplineList">
update credit_discipline_list
<trim prefix="SET" suffixOverrides=",">
<if test="listType != null and listType != ''">list_type = #{listType},</if>
<if test="listMeasure != null and listMeasure != ''">list_measure = #{listMeasure},</if>
<if test="listContent != null and listContent != ''">list_content = #{listContent},</if>
<if test="listTarget != null and listTarget != ''">list_target = #{listTarget},</if>
<if test="listReason != null and listReason != ''">list_reason = #{listReason},</if>
<if test="listEntity != null and listEntity != ''">list_entity = #{listEntity},</if>
<if test="listFile != null">list_file = #{listFile},</if>
<if test="listStatus != null">list_status = #{listStatus},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteCreditDisciplineListById" parameterType="Long">
delete from credit_discipline_list where id = #{id}
</delete>
<delete id="deleteCreditDisciplineListByIds" parameterType="String">
delete from credit_discipline_list where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>