SfcountMapper.xml
5.34 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
<?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.sfcount.mapper.SfcountMapper">
<resultMap type="Sfcount" id="SfcountResult">
<result property="id" column="id" />
<result property="ms" column="ms" />
<result property="xs" column="xs" />
<result property="xz" column="xz" />
<result property="fsbq" column="fsbq" />
<result property="zx" column="zx" />
<result property="pc" column="pc" />
<result property="yg" column="yg" />
<result property="bg" column="bg" />
<result property="dsr" column="dsr" />
<result property="yja" column="yja" />
<result property="wja" column="wja" />
<result property="ay" column="ay" />
<result property="status" column="status" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectSfcountVo">
select id, ms, xs, xz, fsbq, zx, pc, yg, bg, dsr, yja, wja, ay, status, create_time from sfcount
</sql>
<select id="selectSfcountList" parameterType="Sfcount" resultMap="SfcountResult">
<include refid="selectSfcountVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="ms != null "> and ms = #{ms}</if>
<if test="xs != null "> and xs = #{xs}</if>
<if test="xz != null "> and xz = #{xz}</if>
<if test="fsbq != null "> and fsbq = #{fsbq}</if>
<if test="zx != null "> and zx = #{zx}</if>
<if test="pc != null "> and pc = #{pc}</if>
<if test="yg != null "> and yg = #{yg}</if>
<if test="bg != null "> and bg = #{bg}</if>
<if test="dsr != null "> and dsr = #{dsr}</if>
<if test="yja != null "> and yja = #{yja}</if>
<if test="wja != null "> and wja = #{wja}</if>
<if test="ay != null and ay != '' "> and ay = #{ay}</if>
<if test="status != null and status != '' "> and status = #{status}</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
</where>
</select>
<select id="selectSfcountById" parameterType="Long" resultMap="SfcountResult">
<include refid="selectSfcountVo"/>
where id = #{id}
</select>
<insert id="insertSfcount" parameterType="Sfcount" useGeneratedKeys="true" keyProperty="id">
insert into sfcount
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="ms != null ">ms,</if>
<if test="xs != null ">xs,</if>
<if test="xz != null ">xz,</if>
<if test="fsbq != null ">fsbq,</if>
<if test="zx != null ">zx,</if>
<if test="pc != null ">pc,</if>
<if test="yg != null ">yg,</if>
<if test="bg != null ">bg,</if>
<if test="dsr != null ">dsr,</if>
<if test="yja != null ">yja,</if>
<if test="wja != null ">wja,</if>
<if test="ay != null and ay != '' ">ay,</if>
<if test="status != null and status != '' ">status,</if>
<if test="createTime != null ">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ms != null ">#{ms},</if>
<if test="xs != null ">#{xs},</if>
<if test="xz != null ">#{xz},</if>
<if test="fsbq != null ">#{fsbq},</if>
<if test="zx != null ">#{zx},</if>
<if test="pc != null ">#{pc},</if>
<if test="yg != null ">#{yg},</if>
<if test="bg != null ">#{bg},</if>
<if test="dsr != null ">#{dsr},</if>
<if test="yja != null ">#{yja},</if>
<if test="wja != null ">#{wja},</if>
<if test="ay != null and ay != '' ">#{ay},</if>
<if test="status != null and status != '' ">#{status},</if>
<if test="createTime != null ">#{createTime},</if>
</trim>
</insert>
<update id="updateSfcount" parameterType="Sfcount">
update sfcount
<trim prefix="SET" suffixOverrides=",">
<if test="ms != null ">ms = #{ms},</if>
<if test="xs != null ">xs = #{xs},</if>
<if test="xz != null ">xz = #{xz},</if>
<if test="fsbq != null ">fsbq = #{fsbq},</if>
<if test="zx != null ">zx = #{zx},</if>
<if test="pc != null ">pc = #{pc},</if>
<if test="yg != null ">yg = #{yg},</if>
<if test="bg != null ">bg = #{bg},</if>
<if test="dsr != null ">dsr = #{dsr},</if>
<if test="yja != null ">yja = #{yja},</if>
<if test="wja != null ">wja = #{wja},</if>
<if test="ay != null and ay != '' ">ay = #{ay},</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="deleteSfcountById" parameterType="Long">
delete from sfcount where id = #{id}
</delete>
<delete id="deleteSfcountByIds" parameterType="String">
delete from sfcount where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<update id="updateSfcountStatus">
update sfcount set status='1'
</update>
</mapper>