AppYohoToutiaoNewUidMapper.xml
6.69 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
<?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.yoho.unions.dal.AppYohoToutiaoNewUidMapper" >
<resultMap id="BaseResultMap" type="com.yoho.unions.dal.model.AppYohoToutiaoNewUid" >
<id column="order_code" property="orderCode" jdbcType="VARCHAR" />
<result column="wakeup_date" property="wakeupDate" jdbcType="INTEGER" />
<result column="udid" property="udid" jdbcType="VARCHAR" />
<result column="client_type" property="clientType" jdbcType="INTEGER" />
<result column="idfa" property="idfa" jdbcType="VARCHAR" />
<result column="imei" property="imei" jdbcType="VARCHAR" />
<result column="order_time" property="orderTime" jdbcType="INTEGER" />
<result column="uid" property="uid" jdbcType="INTEGER" />
<result column="union_type" property="unionType" jdbcType="VARCHAR" />
<result column="source" property="source" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="INTEGER" />
<result column="date_id" property="dateId" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List" >
order_code, wakeup_date, udid, client_type, idfa, imei, order_time, uid, union_type,
source, create_time, date_id
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from app_yoho_toutiao_new_uid
where order_code = #{orderCode,jdbcType=VARCHAR}
</select>
<select id="selectCountByDateId" resultType="java.lang.Integer" >
select count(1)
from app_yoho_toutiao_new_uid
where date_id = #{dateId}
</select>
<select id="selectByDateId" resultMap="BaseResultMap" >
select <include refid="Base_Column_List" />
from app_yoho_toutiao_new_uid
where date_id = #{dateId}
limit #{startIndex},#{pageSize}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from app_yoho_toutiao_new_uid
where order_code = #{orderCode,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.yoho.unions.dal.model.AppYohoToutiaoNewUid" >
insert into app_yoho_toutiao_new_uid (order_code, wakeup_date, udid,
client_type, idfa, imei,
order_time, uid, union_type,
source, create_time, date_id
)
values (#{orderCode,jdbcType=VARCHAR}, #{wakeupDate,jdbcType=INTEGER}, #{udid,jdbcType=VARCHAR},
#{clientType,jdbcType=INTEGER}, #{idfa,jdbcType=VARCHAR}, #{imei,jdbcType=VARCHAR},
#{orderTime,jdbcType=INTEGER}, #{uid,jdbcType=INTEGER}, #{unionType,jdbcType=VARCHAR},
#{source,jdbcType=INTEGER}, #{createTime,jdbcType=INTEGER}, #{dateId,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.yoho.unions.dal.model.AppYohoToutiaoNewUid" >
insert into app_yoho_toutiao_new_uid
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="orderCode != null" >
order_code,
</if>
<if test="wakeupDate != null" >
wakeup_date,
</if>
<if test="udid != null" >
udid,
</if>
<if test="clientType != null" >
client_type,
</if>
<if test="idfa != null" >
idfa,
</if>
<if test="imei != null" >
imei,
</if>
<if test="orderTime != null" >
order_time,
</if>
<if test="uid != null" >
uid,
</if>
<if test="unionType != null" >
union_type,
</if>
<if test="source != null" >
source,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="dateId != null" >
date_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="orderCode != null" >
#{orderCode,jdbcType=VARCHAR},
</if>
<if test="wakeupDate != null" >
#{wakeupDate,jdbcType=INTEGER},
</if>
<if test="udid != null" >
#{udid,jdbcType=VARCHAR},
</if>
<if test="clientType != null" >
#{clientType,jdbcType=INTEGER},
</if>
<if test="idfa != null" >
#{idfa,jdbcType=VARCHAR},
</if>
<if test="imei != null" >
#{imei,jdbcType=VARCHAR},
</if>
<if test="orderTime != null" >
#{orderTime,jdbcType=INTEGER},
</if>
<if test="uid != null" >
#{uid,jdbcType=INTEGER},
</if>
<if test="unionType != null" >
#{unionType,jdbcType=VARCHAR},
</if>
<if test="source != null" >
#{source,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=INTEGER},
</if>
<if test="dateId != null" >
#{dateId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yoho.unions.dal.model.AppYohoToutiaoNewUid" >
update app_yoho_toutiao_new_uid
<set >
<if test="wakeupDate != null" >
wakeup_date = #{wakeupDate,jdbcType=INTEGER},
</if>
<if test="udid != null" >
udid = #{udid,jdbcType=VARCHAR},
</if>
<if test="clientType != null" >
client_type = #{clientType,jdbcType=INTEGER},
</if>
<if test="idfa != null" >
idfa = #{idfa,jdbcType=VARCHAR},
</if>
<if test="imei != null" >
imei = #{imei,jdbcType=VARCHAR},
</if>
<if test="orderTime != null" >
order_time = #{orderTime,jdbcType=INTEGER},
</if>
<if test="uid != null" >
uid = #{uid,jdbcType=INTEGER},
</if>
<if test="unionType != null" >
union_type = #{unionType,jdbcType=VARCHAR},
</if>
<if test="source != null" >
source = #{source,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=INTEGER},
</if>
<if test="dateId != null" >
date_id = #{dateId,jdbcType=INTEGER},
</if>
</set>
where order_code = #{orderCode,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.yoho.unions.dal.model.AppYohoToutiaoNewUid" >
update app_yoho_toutiao_new_uid
set wakeup_date = #{wakeupDate,jdbcType=INTEGER},
udid = #{udid,jdbcType=VARCHAR},
client_type = #{clientType,jdbcType=INTEGER},
idfa = #{idfa,jdbcType=VARCHAR},
imei = #{imei,jdbcType=VARCHAR},
order_time = #{orderTime,jdbcType=INTEGER},
uid = #{uid,jdbcType=INTEGER},
union_type = #{unionType,jdbcType=VARCHAR},
source = #{source,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=INTEGER},
date_id = #{dateId,jdbcType=INTEGER}
where order_code = #{orderCode,jdbcType=VARCHAR}
</update>
</mapper>