FrontWxMapper.xml
5.22 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
<?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.frontVx.mapper.FrontVxMapper">
<resultMap type="FrontVx" id="FrontVxResult">
<result property="id" column="id" />
<result property="openId" column="open_id" />
<result property="zname" column="zname" />
<result property="phone" column="phone" />
<result property="enterprise" column="enterprise" />
<result property="intention" column="intention" />
<result property="commend" column="commend" />
<result property="card" column="card" />
<result property="vxStatus" column="vx_status" />
</resultMap>
<sql id="selectFrontVxVo">
select id, open_id, zname, phone, enterprise, intention, commend, card, vx_status from front_Vx
</sql>
<select id="selectFrontVxList" parameterType="FrontVx" resultMap="FrontVxResult">
<include refid="selectFrontVxVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="openId != null and openId != '' "> and open_id = #{openId}</if>
<if test="zname != null and zname != '' "> and zname = #{zname}</if>
<if test="phone != null and phone != '' "> and phone = #{phone}</if>
<if test="enterprise != null and enterprise != '' "> and enterprise = #{enterprise}</if>
<if test="intention != null and intention != '' "> and intention = #{intention}</if>
<if test="commend != null and commend != '' "> and commend = #{commend}</if>
<if test="card != null and card != '' "> and card = #{card}</if>
<if test="vxStatus != null and vxStatus != '' "> and vx_status = #{vxStatus}</if>
</where>
</select>
<select id="selectFrontVxById" parameterType="Integer" resultMap="FrontVxResult">
<include refid="selectFrontVxVo"/>
where id = #{id}
</select>
<insert id="insertFrontVx" parameterType="FrontVx">
insert into front_Vx
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null ">id,</if>
<if test="openId != null and openId != '' ">open_id,</if>
<if test="zname != null and zname != '' ">zname,</if>
<if test="phone != null and phone != '' ">phone,</if>
<if test="enterprise != null and enterprise != '' ">enterprise,</if>
<if test="intention != null and intention != '' ">intention,</if>
<if test="commend != null and commend != '' ">commend,</if>
<if test="card != null and card != '' ">card,</if>
<if test="vxStatus != null and vxStatus != '' ">vx_status,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null ">#{id},</if>
<if test="openId != null and openId != '' ">#{openId},</if>
<if test="zname != null and zname != '' ">#{zname},</if>
<if test="phone != null and phone != '' ">#{phone},</if>
<if test="enterprise != null and enterprise != '' ">#{enterprise},</if>
<if test="intention != null and intention != '' ">#{intention},</if>
<if test="commend != null and commend != '' ">#{commend},</if>
<if test="card != null and card != '' ">#{card},</if>
<if test="vxStatus != null and vxStatus != '' ">#{vxStatus},</if>
</trim>
</insert>
<update id="updateFrontVx" parameterType="FrontVx">
update front_Vx
<trim prefix="SET" suffixOverrides=",">
<if test="openId != null and openId != '' ">open_id = #{openId},</if>
<if test="zname != null and zname != '' ">zname = #{zname},</if>
<if test="phone != null and phone != '' ">phone = #{phone},</if>
<if test="enterprise != null and enterprise != '' ">enterprise = #{enterprise},</if>
<if test="intention != null and intention != '' ">intention = #{intention},</if>
<if test="commend != null and commend != '' ">commend = #{commend},</if>
<if test="card != null and card != '' ">card = #{card},</if>
<if test="vxStatus != null and vxStatus != '' ">vx_status = #{vxStatus},</if>
</trim>
where id = #{id}
</update>
<update id="updateFrontVxByOpenId" parameterType="com.lhcredit.project.business.frontVx.domain.FrontVx">
update front_Vx
<trim prefix="SET" suffixOverrides=",">
<if test="openId != null and openId != '' ">open_id = #{openId},</if>
<if test="zname != null and zname != '' ">zname = #{zname},</if>
<if test="phone != null and phone != '' ">phone = #{phone},</if>
<if test="enterprise != null and enterprise != '' ">enterprise = #{enterprise},</if>
</trim>
where open_id = #{openId}
</update>
<delete id="deleteFrontVxById" parameterType="Integer">
delete from front_Vx where id = #{id}
</delete>
<delete id="deleteFrontVxByIds" parameterType="String">
delete from front_Vx where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>