CreditGrantingRiskMapper.xml
10.4 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<?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.lhcredit.project.business.creditGrantingRisk.mapper.CreditGrantingRiskMapper">
<resultMap type="CreditGrantingRisk" id="CreditGrantingRiskResult">
<result property="id" column="id" />
<result property="cgId" column="cg_id" />
<result property="ename" column="ename" />
<result property="jyyc" column="jyyc" />
<result property="xzcf" column="xzcf" />
<result property="hgxzcf" column="hgxzcf" />
<result property="yzwf" column="yzwf" />
<result property="gqcz" column="gqcz" />
<result property="qsgg" column="qsgg" />
<result property="qsxx" column="qsxx" />
<result property="dcdy" column="dcdy" />
<result property="cyjc" column="cyjc" />
<result property="msaj" column="msaj" />
<result property="xzaj" column="xzaj" />
<result property="xsaj" column="xsaj" />
<result property="zxaj" column="zxaj" />
<result property="qzqsypc" column="qzqsypc" />
<result property="fsbqaj" column="fsbqaj" />
<result property="sxbzxr" column="sxbzxr" />
<result property="xzgxf" column="xzgxf" />
<result property="sfxz" column="sfxz" />
<result property="sfpm" column="sfpm" />
<result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
</resultMap>
<sql id="selectCreditGrantingRiskVo">
select id, cg_id, ename, jyyc, xzcf, hgxzcf, yzwf, gqcz, qsgg, qsxx, dcdy, cyjc, msaj, xzaj, xsaj, zxaj, qzqsypc, fsbqaj, sxbzxr, xzgxf, sfxz, sfpm, del_flag, create_time, update_time, update_by from credit_granting_risk
</sql>
<select id="selectCreditGrantingRiskList" parameterType="CreditGrantingRisk" resultMap="CreditGrantingRiskResult">
<include refid="selectCreditGrantingRiskVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="cgId != null "> and cg_id = #{cgId}</if>
<if test="ename != null and ename != '' "> and ename = #{ename}</if>
<if test="jyyc != null and jyyc != '' "> and jyyc = #{jyyc}</if>
<if test="xzcf != null and xzcf != '' "> and xzcf = #{xzcf}</if>
<if test="hgxzcf != null and hgxzcf != '' "> and hgxzcf = #{hgxzcf}</if>
<if test="yzwf != null and yzwf != '' "> and yzwf = #{yzwf}</if>
<if test="gqcz != null and gqcz != '' "> and gqcz = #{gqcz}</if>
<if test="qsgg != null and qsgg != '' "> and qsgg = #{qsgg}</if>
<if test="qsxx != null and qsxx != '' "> and qsxx = #{qsxx}</if>
<if test="dcdy != null and dcdy != '' "> and dcdy = #{dcdy}</if>
<if test="cyjc != null and cyjc != '' "> and cyjc = #{cyjc}</if>
<if test="msaj != null and msaj != '' "> and msaj = #{msaj}</if>
<if test="xzaj != null and xzaj != '' "> and xzaj = #{xzaj}</if>
<if test="xsaj != null and xsaj != '' "> and xsaj = #{xsaj}</if>
<if test="zxaj != null and zxaj != '' "> and zxaj = #{zxaj}</if>
<if test="qzqsypc != null and qzqsypc != '' "> and qzqsypc = #{qzqsypc}</if>
<if test="fsbqaj != null and fsbqaj != '' "> and fsbqaj = #{fsbqaj}</if>
<if test="sxbzxr != null and sxbzxr != '' "> and sxbzxr = #{sxbzxr}</if>
<if test="xzgxf != null and xzgxf != '' "> and xzgxf = #{xzgxf}</if>
<if test="sfxz != null and sfxz != '' "> and sfxz = #{sfxz}</if>
<if test="sfpm != null and sfpm != '' "> and sfpm = #{sfpm}</if>
<if test="delFlag != null and delFlag != '' "> and del_flag = #{delFlag}</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="updateBy != null and updateBy != '' "> and update_by = #{updateBy}</if>
</where>
</select>
<select id="selectCreditGrantingRiskById" parameterType="Long" resultMap="CreditGrantingRiskResult">
<include refid="selectCreditGrantingRiskVo"/>
where id = #{id}
</select>
<select id="selectCreditGrantingRiskByCgId" parameterType="Long" resultMap="CreditGrantingRiskResult">
<include refid="selectCreditGrantingRiskVo"/>
where cg_id = #{cgId}
</select>
<insert id="insertCreditGrantingRisk" parameterType="CreditGrantingRisk" useGeneratedKeys="true" keyProperty="id">
insert into credit_granting_risk
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="cgId != null ">cg_id,</if>
<if test="ename != null and ename != '' ">ename,</if>
<if test="jyyc != null and jyyc != '' ">jyyc,</if>
<if test="xzcf != null and xzcf != '' ">xzcf,</if>
<if test="hgxzcf != null and hgxzcf != '' ">hgxzcf,</if>
<if test="yzwf != null and yzwf != '' ">yzwf,</if>
<if test="gqcz != null and gqcz != '' ">gqcz,</if>
<if test="qsgg != null and qsgg != '' ">qsgg,</if>
<if test="qsxx != null and qsxx != '' ">qsxx,</if>
<if test="dcdy != null and dcdy != '' ">dcdy,</if>
<if test="cyjc != null and cyjc != '' ">cyjc,</if>
<if test="msaj != null and msaj != '' ">msaj,</if>
<if test="xzaj != null and xzaj != '' ">xzaj,</if>
<if test="xsaj != null and xsaj != '' ">xsaj,</if>
<if test="zxaj != null and zxaj != '' ">zxaj,</if>
<if test="qzqsypc != null and qzqsypc != '' ">qzqsypc,</if>
<if test="fsbqaj != null and fsbqaj != '' ">fsbqaj,</if>
<if test="sxbzxr != null and sxbzxr != '' ">sxbzxr,</if>
<if test="xzgxf != null and xzgxf != '' ">xzgxf,</if>
<if test="sfxz != null and sfxz != '' ">sfxz,</if>
<if test="sfpm != null and sfpm != '' ">sfpm,</if>
<if test="delFlag != null and delFlag != '' ">del_flag,</if>
<if test="createTime != null ">create_time,</if>
<if test="updateTime != null ">update_time,</if>
<if test="updateBy != null and updateBy != '' ">update_by,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="cgId != null ">#{cgId},</if>
<if test="ename != null and ename != '' ">#{ename},</if>
<if test="jyyc != null and jyyc != '' ">#{jyyc},</if>
<if test="xzcf != null and xzcf != '' ">#{xzcf},</if>
<if test="hgxzcf != null and hgxzcf != '' ">#{hgxzcf},</if>
<if test="yzwf != null and yzwf != '' ">#{yzwf},</if>
<if test="gqcz != null and gqcz != '' ">#{gqcz},</if>
<if test="qsgg != null and qsgg != '' ">#{qsgg},</if>
<if test="qsxx != null and qsxx != '' ">#{qsxx},</if>
<if test="dcdy != null and dcdy != '' ">#{dcdy},</if>
<if test="cyjc != null and cyjc != '' ">#{cyjc},</if>
<if test="msaj != null and msaj != '' ">#{msaj},</if>
<if test="xzaj != null and xzaj != '' ">#{xzaj},</if>
<if test="xsaj != null and xsaj != '' ">#{xsaj},</if>
<if test="zxaj != null and zxaj != '' ">#{zxaj},</if>
<if test="qzqsypc != null and qzqsypc != '' ">#{qzqsypc},</if>
<if test="fsbqaj != null and fsbqaj != '' ">#{fsbqaj},</if>
<if test="sxbzxr != null and sxbzxr != '' ">#{sxbzxr},</if>
<if test="xzgxf != null and xzgxf != '' ">#{xzgxf},</if>
<if test="sfxz != null and sfxz != '' ">#{sfxz},</if>
<if test="sfpm != null and sfpm != '' ">#{sfpm},</if>
<if test="delFlag != null and delFlag != '' ">#{delFlag},</if>
<if test="createTime != null ">#{createTime},</if>
<if test="updateTime != null ">#{updateTime},</if>
<if test="updateBy != null and updateBy != '' ">#{updateBy},</if>
</trim>
</insert>
<update id="updateCreditGrantingRisk" parameterType="CreditGrantingRisk">
update credit_granting_risk
<trim prefix="SET" suffixOverrides=",">
<if test="cgId != null ">cg_id = #{cgId},</if>
<if test="ename != null and ename != '' ">ename = #{ename},</if>
<if test="jyyc != null and jyyc != '' ">jyyc = #{jyyc},</if>
<if test="xzcf != null and xzcf != '' ">xzcf = #{xzcf},</if>
<if test="hgxzcf != null and hgxzcf != '' ">hgxzcf = #{hgxzcf},</if>
<if test="yzwf != null and yzwf != '' ">yzwf = #{yzwf},</if>
<if test="gqcz != null and gqcz != '' ">gqcz = #{gqcz},</if>
<if test="qsgg != null and qsgg != '' ">qsgg = #{qsgg},</if>
<if test="qsxx != null and qsxx != '' ">qsxx = #{qsxx},</if>
<if test="dcdy != null and dcdy != '' ">dcdy = #{dcdy},</if>
<if test="cyjc != null and cyjc != '' ">cyjc = #{cyjc},</if>
<if test="msaj != null and msaj != '' ">msaj = #{msaj},</if>
<if test="xzaj != null and xzaj != '' ">xzaj = #{xzaj},</if>
<if test="xsaj != null and xsaj != '' ">xsaj = #{xsaj},</if>
<if test="zxaj != null and zxaj != '' ">zxaj = #{zxaj},</if>
<if test="qzqsypc != null and qzqsypc != '' ">qzqsypc = #{qzqsypc},</if>
<if test="fsbqaj != null and fsbqaj != '' ">fsbqaj = #{fsbqaj},</if>
<if test="sxbzxr != null and sxbzxr != '' ">sxbzxr = #{sxbzxr},</if>
<if test="xzgxf != null and xzgxf != '' ">xzgxf = #{xzgxf},</if>
<if test="sfxz != null and sfxz != '' ">sfxz = #{sfxz},</if>
<if test="sfpm != null and sfpm != '' ">sfpm = #{sfpm},</if>
<if test="delFlag != null and delFlag != '' ">del_flag = #{delFlag},</if>
<if test="createTime != null ">create_time = #{createTime},</if>
<if test="updateTime != null ">update_time = #{updateTime},</if>
<if test="updateBy != null and updateBy != '' ">update_by = #{updateBy},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteCreditGrantingRiskById" parameterType="Long">
delete from credit_granting_risk where id = #{id}
</delete>
<delete id="deleteCreditGrantingRiskByIds" parameterType="String">
delete from credit_granting_risk where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>