ActivityThemeDaoMapper.xml
1.86 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
<?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.fw.dalaran.dao.ActivityThemeDao">
<update id="alertTheme" parameterType="cn.fw.dalaran.domain.db.ActivityTheme">
update activity_theme
<set>
<if test="param.theme !=null and param.theme != ''">
theme = #{param.theme},
</if>
<if test="param.topic !=null and param.topic != ''">
topic = #{param.topic},
</if>
<if test="param.startTime !=null">
start_time = #{param.startTime},
</if>
<if test="param.endTime !=null">
end_time = #{param.endTime},
</if>
<if test="param.allShop !=null">
all_shop = #{param.allShop},
</if>
<if test="param.shopIds !=null and param.shopIds != ''">
shop_ids = #{param.shopIds},
</if>
<if test="param.shopNames !=null and param.shopNames != ''">
shop_names = #{param.shopNames},
</if>
<if test="param.validConfigJson !=null and param.validConfigJson != ''">
valid_config_json = #{param.validConfigJson},
</if>
<if test="param.groupId !=null">
group_id = #{param.groupId},
</if>
<if test="param.logicDel !=null">
logic_del = #{param.logicDel},
</if>
</set>
<where>
<if test="param.id !=null">
activity_theme.id = #{param.id}
</if>
</where>
</update>
<select id="getHasDelActivityTheme" resultType="cn.fw.dalaran.domain.db.ActivityTheme">
SELECT * from activity_theme where logic_del = 1
</select>
</mapper>