JycountMapper.xml
5 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
<?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.jycount.mapper.JycountMapper">
<resultMap type="Jycount" id="JycountResult">
<result property="id" column="id" />
<result property="jyyc" column="jyyc" />
<result property="xzcf" column="xzcf" />
<result property="yzwf" column="yzwf" />
<result property="gqcz" column="gqcz" />
<result property="gqdj" column="gqdj" />
<result property="qsgg" column="qsgg" />
<result property="qsxx" column="qsxx" />
<result property="dcdy" column="dcdy" />
<result property="tddy" column="tddy" />
<result property="ccjc" column="ccjc" />
<result property="status" column="status" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectJycountVo">
select id, jyyc, xzcf, yzwf, gqcz, gqdj, qsgg, qsxx, dcdy, tddy, ccjc, status, create_time from jycount
</sql>
<select id="selectJycountList" parameterType="Jycount" resultMap="JycountResult">
<include refid="selectJycountVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="jyyc != null "> and jyyc = #{jyyc}</if>
<if test="xzcf != null "> and xzcf = #{xzcf}</if>
<if test="yzwf != null "> and yzwf = #{yzwf}</if>
<if test="gqcz != null "> and gqcz = #{gqcz}</if>
<if test="gqdj != null "> and gqdj = #{gqdj}</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="tddy != null "> and tddy = #{tddy}</if>
<if test="ccjc != null "> and ccjc = #{ccjc}</if>
<if test="status != null and status != '' "> and status = #{status}</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
</where>
</select>
<select id="selectJycountById" parameterType="Long" resultMap="JycountResult">
<include refid="selectJycountVo"/>
where id = #{id}
</select>
<insert id="insertJycount" parameterType="Jycount" useGeneratedKeys="true" keyProperty="id">
insert into jycount
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="jyyc != null ">jyyc,</if>
<if test="xzcf != null ">xzcf,</if>
<if test="yzwf != null ">yzwf,</if>
<if test="gqcz != null ">gqcz,</if>
<if test="gqdj != null ">gqdj,</if>
<if test="qsgg != null ">qsgg,</if>
<if test="qsxx != null ">qsxx,</if>
<if test="dcdy != null ">dcdy,</if>
<if test="tddy != null ">tddy,</if>
<if test="ccjc != null ">ccjc,</if>
<if test="status != null and status != '' ">status,</if>
<if test="createTime != null ">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="jyyc != null ">#{jyyc},</if>
<if test="xzcf != null ">#{xzcf},</if>
<if test="yzwf != null ">#{yzwf},</if>
<if test="gqcz != null ">#{gqcz},</if>
<if test="gqdj != null ">#{gqdj},</if>
<if test="qsgg != null ">#{qsgg},</if>
<if test="qsxx != null ">#{qsxx},</if>
<if test="dcdy != null ">#{dcdy},</if>
<if test="tddy != null ">#{tddy},</if>
<if test="ccjc != null ">#{ccjc},</if>
<if test="status != null and status != '' ">#{status},</if>
<if test="createTime != null ">#{createTime},</if>
</trim>
</insert>
<update id="updateJycount" parameterType="Jycount">
update jycount
<trim prefix="SET" suffixOverrides=",">
<if test="jyyc != null ">jyyc = #{jyyc},</if>
<if test="xzcf != null ">xzcf = #{xzcf},</if>
<if test="yzwf != null ">yzwf = #{yzwf},</if>
<if test="gqcz != null ">gqcz = #{gqcz},</if>
<if test="gqdj != null ">gqdj = #{gqdj},</if>
<if test="qsgg != null ">qsgg = #{qsgg},</if>
<if test="qsxx != null ">qsxx = #{qsxx},</if>
<if test="dcdy != null ">dcdy = #{dcdy},</if>
<if test="tddy != null ">tddy = #{tddy},</if>
<if test="ccjc != null ">ccjc = #{ccjc},</if>
<if test="status != null and status != '' ">status = #{status},</if>
<if test="createTime != null ">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteJycountById" parameterType="Long">
delete from jycount where id = #{id}
</delete>
<delete id="deleteJycountByIds" parameterType="String">
delete from jycount where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<update id="updateJycountStatus">
update jycount set status='1'
</update>
</mapper>