CreditGovernmentIntegrityMapper.xml
9.09 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?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.CreditGovernmentIntegrityMapper">
<resultMap type="CreditGovernmentIntegrity" id="CreditGovernmentIntegrityResult">
<result property="id" column="id" />
<result property="parentId" column="parent_id" />
<result property="serialNumber" column="serial_number" />
<result property="firstIndex" column="first_index" />
<result property="secondIndex" column="second_index" />
<result property="score" column="score" />
<result property="fileType" column="file_type" />
<result property="monitorContent" column="monitor_content" />
<result property="scoreStandard" column="score_standard" />
<result property="fileRequest" column="file_request" />
<result property="memo" column="memo" />
<result property="reportDate" column="report_date" />
<result property="reportDept" column="report_dept" />
<result property="checkStatus" column="check_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" />
<result property="point" column="point" />
</resultMap>
<sql id="selectCreditGovernmentIntegrityVo">
select id, parent_id, serial_number, first_index, second_index, score, file_type, monitor_content, score_standard, file_request, memo, report_date, report_dept, check_status, del_flag, create_by, create_time, update_by, update_time, point from credit_government_integrity
</sql>
<select id="selectCreditGovernmentIntegrityList" parameterType="CreditGovernmentIntegrity" resultMap="CreditGovernmentIntegrityResult">
<include refid="selectCreditGovernmentIntegrityVo"/>
<where>
<if test="parentId != null "> and parent_id = #{parentId}</if>
<if test="serialNumber != null "> and serial_number = #{serialNumber}</if>
<if test="firstIndex != null and firstIndex != ''"> and first_index = #{firstIndex}</if>
<if test="secondIndex != null and secondIndex != ''"> and second_index = #{secondIndex}</if>
<if test="score != null "> and score = #{score}</if>
<if test="fileType != null and fileType != ''"> and file_type = #{fileType}</if>
<if test="monitorContent != null and monitorContent != ''"> and monitor_content = #{monitorContent}</if>
<if test="scoreStandard != null and scoreStandard != ''"> and score_standard = #{scoreStandard}</if>
<if test="fileRequest != null and fileRequest != ''"> and file_request = #{fileRequest}</if>
<if test="memo != null and memo != ''"> and memo = #{memo}</if>
<if test="reportDate != null "> and report_date = #{reportDate}</if>
<if test="reportDept != null and reportDept != ''"> and report_dept = #{reportDept}</if>
<if test="checkStatus != null "> and check_status = #{checkStatus}</if>
</where>
order by serial_number
</select>
<select id="selectCreditGovernmentIntegrityById" parameterType="Long" resultMap="CreditGovernmentIntegrityResult">
<include refid="selectCreditGovernmentIntegrityVo"/>
where id = #{id}
</select>
<insert id="insertCreditGovernmentIntegrity" parameterType="CreditGovernmentIntegrity" useGeneratedKeys="true" keyProperty="id">
insert into credit_government_integrity
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="parentId != null">parent_id,</if>
<if test="serialNumber != null">serial_number,</if>
<if test="firstIndex != null and firstIndex != ''">first_index,</if>
<if test="secondIndex != null and secondIndex != ''">second_index,</if>
<if test="score != null">score,</if>
<if test="fileType != null and fileType != ''">file_type,</if>
<if test="monitorContent != null and monitorContent != ''">monitor_content,</if>
<if test="scoreStandard != null and scoreStandard != ''">score_standard,</if>
<if test="fileRequest != null and fileRequest != ''">file_request,</if>
<if test="memo != null">memo,</if>
<if test="reportDate != null">report_date,</if>
<if test="reportDept != null">report_dept,</if>
<if test="checkStatus != null">check_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>
<if test="point != null">point,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="parentId != null">#{parentId},</if>
<if test="serialNumber != null">#{serialNumber},</if>
<if test="firstIndex != null and firstIndex != ''">#{firstIndex},</if>
<if test="secondIndex != null and secondIndex != ''">#{secondIndex},</if>
<if test="score != null">#{score},</if>
<if test="fileType != null and fileType != ''">#{fileType},</if>
<if test="monitorContent != null and monitorContent != ''">#{monitorContent},</if>
<if test="scoreStandard != null and scoreStandard != ''">#{scoreStandard},</if>
<if test="fileRequest != null and fileRequest != ''">#{fileRequest},</if>
<if test="memo != null">#{memo},</if>
<if test="reportDate != null">#{reportDate},</if>
<if test="reportDept != null">#{reportDept},</if>
<if test="checkStatus != null">#{checkStatus},</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>
<if test="point != null">#{point},</if>
</trim>
</insert>
<update id="updateCreditGovernmentIntegrity" parameterType="CreditGovernmentIntegrity">
update credit_government_integrity
<trim prefix="SET" suffixOverrides=",">
<if test="parentId != null">parent_id = #{parentId},</if>
<if test="serialNumber != null">serial_number = #{serialNumber},</if>
<if test="firstIndex != null and firstIndex != ''">first_index = #{firstIndex},</if>
<if test="secondIndex != null and secondIndex != ''">second_index = #{secondIndex},</if>
<if test="score != null">score = #{score},</if>
<if test="fileType != null and fileType != ''">file_type = #{fileType},</if>
<if test="monitorContent != null and monitorContent != ''">monitor_content = #{monitorContent},</if>
<if test="scoreStandard != null and scoreStandard != ''">score_standard = #{scoreStandard},</if>
<if test="fileRequest != null and fileRequest != ''">file_request = #{fileRequest},</if>
<if test="memo != null">memo = #{memo},</if>
<if test="reportDate != null">report_date = #{reportDate},</if>
<if test="reportDept != null">report_dept = #{reportDept},</if>
<if test="checkStatus != null">check_status = #{checkStatus},</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>
<if test="point != null">point = #{point},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteCreditGovernmentIntegrityById" parameterType="Long">
delete from credit_government_integrity where id = #{id}
</delete>
<delete id="deleteCreditGovernmentIntegrityByIds" parameterType="String">
delete from credit_government_integrity where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="selectCount" parameterType="com.credit.cy.business.model.query.WorkCountQuery" resultType="java.lang.Long">
select count(1) from credit_government_integrity
<where>
<if test="reportDept != null and reportDept != ''"> and report_dept = #{reportDept}</if>
<if test="null!=reportStartDate"> and report_date >= #{reportStartDate}</if>
<if test="null!=reportEndDate"> AND report_date <![CDATA[<=]]> #{reportEndDate}</if>
</where>
</select>
</mapper>