MassConditionMapper.xml
4.83 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
<?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="cn.com.glsx.entmicro.mapper.MassConditionMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.entmicro.entity.MassCondition">
<!--@Table scrm_mass_condition-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="mass_id" jdbcType="INTEGER" property="massId" />
<result column="sex" jdbcType="TINYINT" property="sex" />
<result column="chat_id" jdbcType="VARCHAR" property="chatId" />
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
<result column="tag_id" jdbcType="VARCHAR" property="tagId" />
<result column="del_flag" jdbcType="TINYINT" property="delFlag" />
</resultMap>
<resultMap id="ResultMap" type="cn.com.glsx.entmicro.model.response.MassConditionResponse"
extends="BaseResultMap">
</resultMap>
<sql id="Base_Column_List">
id, mass_id, sex, chat_id, start_time, end_time, tag_id, del_flag
</sql>
<!--<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from scrm_mass_condition
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByMassId" parameterType="java.lang.Integer" resultMap="ResultMap">
select <include refid="Base_Column_List" /> from scrm_mass_condition
where mass_id = #{id,jdbcType=INTEGER} and del_flag = 0 limit 1
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from scrm_mass_condition
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="cn.com.glsx.entmicro.entity.MassCondition" useGeneratedKeys="true">
insert into scrm_mass_condition (mass_id, sex, chat_id,
start_time, end_time, tag_id,
del_flag)
values (#{massId,jdbcType=INTEGER}, #{sex,jdbcType=TINYINT}, #{chatId,jdbcType=VARCHAR},
#{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{tagId,jdbcType=VARCHAR},
#{delFlag,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="cn.com.glsx.entmicro.entity.MassCondition" useGeneratedKeys="true">
insert into scrm_mass_condition
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="massId != null">
mass_id,
</if>
<if test="sex != null">
sex,
</if>
<if test="chatId != null">
chat_id,
</if>
<if test="startTime != null">
start_time,
</if>
<if test="endTime != null">
end_time,
</if>
<if test="tagId != null">
tag_id,
</if>
<if test="delFlag != null">
del_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="massId != null">
#{massId,jdbcType=INTEGER},
</if>
<if test="sex != null">
#{sex,jdbcType=TINYINT},
</if>
<if test="chatId != null">
#{chatId,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
#{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
#{endTime,jdbcType=TIMESTAMP},
</if>
<if test="tagId != null">
#{tagId,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=TINYINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="cn.com.glsx.entmicro.entity.MassCondition">
update scrm_mass_condition
<set>
<if test="massId != null">
mass_id = #{massId,jdbcType=INTEGER},
</if>
<if test="sex != null">
sex = #{sex,jdbcType=TINYINT},
</if>
<if test="chatId != null">
chat_id = #{chatId,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
start_time = #{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=TIMESTAMP},
</if>
<if test="tagId != null">
tag_id = #{tagId,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="cn.com.glsx.entmicro.entity.MassCondition">
update scrm_mass_condition
set mass_id = #{massId,jdbcType=INTEGER},
sex = #{sex,jdbcType=TINYINT},
chat_id = #{chatId,jdbcType=VARCHAR},
start_time = #{startTime,jdbcType=TIMESTAMP},
end_time = #{endTime,jdbcType=TIMESTAMP},
tag_id = #{tagId,jdbcType=VARCHAR},
del_flag = #{delFlag,jdbcType=TINYINT}
where id = #{id,jdbcType=INTEGER}
</update>-->
</mapper>