LandRouterConfigDao.xml
7.3 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
183
184
185
186
187
188
189
190
191
192
<?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.sy.mapper.LandRouterConfigDao">
<resultMap id="BaseResultMap" type="com.sy.model.LandRouterConfig">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="area_id" jdbcType="VARCHAR" property="areaId" />
<result column="area_name" jdbcType="VARCHAR" property="areaName" />
<result column="chanel_id" jdbcType="VARCHAR" property="chanelId" />
<result column="chanel_name" jdbcType="VARCHAR" property="chanelName" />
<result column="chanel_type" jdbcType="VARCHAR" property="chanelType" />
<result column="business_type" jdbcType="VARCHAR" property="businessType" />
<result column="g2_business_type" jdbcType="VARCHAR" property="g2BusinessType" />
<result column="ie_type" jdbcType="VARCHAR" property="ieType" />
<result column="identify_type" jdbcType="VARCHAR" property="identifyType" />
<result column="gather_receiver" jdbcType="VARCHAR" property="gatherReceiver" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="status" jdbcType="VARCHAR" property="status" />
</resultMap>
<sql id="Base_Column_List">
id, area_id, area_name, chanel_id, chanel_name, chanel_type, business_type, g2_business_type,ie_type
identify_type, gather_receiver, create_time, `status`
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from land_router_config
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByGatherInfo" parameterType="com.sy.model.LandRouterConfig" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from land_router_config
where chanel_id = #{chanelId,jdbcType=VARCHAR}
and `status` = #{status,jdbcType=VARCHAR}
and gather_receiver = #{gatherReceiver,jdbcType=VARCHAR}
and business_type = #{businessType,jdbcType=VARCHAR}
</select>
<select id="selectByBussType" parameterType="com.sy.model.LandRouterConfig" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from land_router_config
where
business_type = #{businessType,jdbcType=VARCHAR}
and area_id = #{areaId,jdbcType=VARCHAR}
and gather_receiver = 'G2'
and `status` = 'Y'
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from land_router_config
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.sy.model.LandRouterConfig" useGeneratedKeys="true">
insert into land_router_config (area_id, area_name, chanel_id,
chanel_name, chanel_type, business_type,
g2_business_type, identify_type, gather_receiver,
create_time, `status`)
values (#{areaId,jdbcType=VARCHAR}, #{areaName,jdbcType=VARCHAR}, #{chanelId,jdbcType=VARCHAR},
#{chanelName,jdbcType=VARCHAR}, #{chanelType,jdbcType=VARCHAR}, #{businessType,jdbcType=VARCHAR},
#{g2BusinessType,jdbcType=VARCHAR}, #{identifyType,jdbcType=VARCHAR}, #{gatherReceiver,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.sy.model.LandRouterConfig" useGeneratedKeys="true">
insert into land_router_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="areaId != null">
area_id,
</if>
<if test="areaName != null">
area_name,
</if>
<if test="chanelId != null">
chanel_id,
</if>
<if test="chanelName != null">
chanel_name,
</if>
<if test="chanelType != null">
chanel_type,
</if>
<if test="businessType != null">
business_type,
</if>
<if test="g2BusinessType != null">
g2_business_type,
</if>
<if test="identifyType != null">
identify_type,
</if>
<if test="gatherReceiver != null">
gather_receiver,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="status != null">
`status`,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="areaId != null">
#{areaId,jdbcType=VARCHAR},
</if>
<if test="areaName != null">
#{areaName,jdbcType=VARCHAR},
</if>
<if test="chanelId != null">
#{chanelId,jdbcType=VARCHAR},
</if>
<if test="chanelName != null">
#{chanelName,jdbcType=VARCHAR},
</if>
<if test="chanelType != null">
#{chanelType,jdbcType=VARCHAR},
</if>
<if test="businessType != null">
#{businessType,jdbcType=VARCHAR},
</if>
<if test="g2BusinessType != null">
#{g2BusinessType,jdbcType=VARCHAR},
</if>
<if test="identifyType != null">
#{identifyType,jdbcType=VARCHAR},
</if>
<if test="gatherReceiver != null">
#{gatherReceiver,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sy.model.LandRouterConfig">
update land_router_config
<set>
<if test="areaId != null">
area_id = #{areaId,jdbcType=VARCHAR},
</if>
<if test="areaName != null">
area_name = #{areaName,jdbcType=VARCHAR},
</if>
<if test="chanelId != null">
chanel_id = #{chanelId,jdbcType=VARCHAR},
</if>
<if test="chanelName != null">
chanel_name = #{chanelName,jdbcType=VARCHAR},
</if>
<if test="chanelType != null">
chanel_type = #{chanelType,jdbcType=VARCHAR},
</if>
<if test="businessType != null">
business_type = #{businessType,jdbcType=VARCHAR},
</if>
<if test="g2BusinessType != null">
g2_business_type = #{g2BusinessType,jdbcType=VARCHAR},
</if>
<if test="identifyType != null">
identify_type = #{identifyType,jdbcType=VARCHAR},
</if>
<if test="gatherReceiver != null">
gather_receiver = #{gatherReceiver,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
`status` = #{status,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.sy.model.LandRouterConfig">
update land_router_config
set area_id = #{areaId,jdbcType=VARCHAR},
area_name = #{areaName,jdbcType=VARCHAR},
chanel_id = #{chanelId,jdbcType=VARCHAR},
chanel_name = #{chanelName,jdbcType=VARCHAR},
chanel_type = #{chanelType,jdbcType=VARCHAR},
business_type = #{businessType,jdbcType=VARCHAR},
g2_business_type = #{g2BusinessType,jdbcType=VARCHAR},
identify_type = #{identifyType,jdbcType=VARCHAR},
gather_receiver = #{gatherReceiver,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
`status` = #{status,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>