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
<?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.tanpu.feo.feojob.dao.user.mapper.DaySelectionMapper">
<resultMap id="BaseResultMap" type="com.tanpu.feo.feojob.dao.user.entity.DaySelection">
<!--@mbg.generated-->
<!--@Table day_selection-->
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="ds_type" jdbcType="VARCHAR" property="dsType" />
<result column="ds_subject_id" jdbcType="VARCHAR" property="dsSubjectId" />
<result column="ds_id" jdbcType="VARCHAR" property="dsId" />
<result column="ds_sort" jdbcType="INTEGER" property="dsSort" />
<result column="ds_ext" jdbcType="VARCHAR" property="dsExt" />
<result column="ds_isrecommend" jdbcType="VARCHAR" property="dsIsrecommend" />
<result column="ds_focus_topic" jdbcType="VARCHAR" property="dsFocusTopic" />
<result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
<result column="createby" jdbcType="VARCHAR" property="createby" />
<result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
<result column="updateby" jdbcType="VARCHAR" property="updateby" />
<result column="deletetag" jdbcType="VARCHAR" property="deletetag" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, ds_type, ds_subject_id, ds_id, ds_sort, ds_ext, ds_isrecommend, ds_focus_topic,
createtime, createby, updatetime, updateby, deletetag
</sql>
<update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated-->
update day_selection
<trim prefix="set" suffixOverrides=",">
<trim prefix="ds_type = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=VARCHAR} then #{item.dsType,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="ds_subject_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=VARCHAR} then #{item.dsSubjectId,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="ds_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=VARCHAR} then #{item.dsId,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="ds_sort = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=VARCHAR} then #{item.dsSort,jdbcType=INTEGER}
</foreach>
</trim>
<trim prefix="ds_ext = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=VARCHAR} then #{item.dsExt,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="ds_isrecommend = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=VARCHAR} then #{item.dsIsrecommend,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="ds_focus_topic = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=VARCHAR} then #{item.dsFocusTopic,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="createtime = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=VARCHAR} then #{item.createtime,jdbcType=TIMESTAMP}
</foreach>
</trim>
<trim prefix="createby = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=VARCHAR} then #{item.createby,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="updatetime = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=VARCHAR} then #{item.updatetime,jdbcType=TIMESTAMP}
</foreach>
</trim>
<trim prefix="updateby = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=VARCHAR} then #{item.updateby,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="deletetag = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=VARCHAR} then #{item.deletetag,jdbcType=VARCHAR}
</foreach>
</trim>
</trim>
where id in
<foreach close=")" collection="list" item="item" open="(" separator=", ">
#{item.id,jdbcType=VARCHAR}
</foreach>
</update>
<insert id="batchInsert" parameterType="map">
<!--@mbg.generated-->
insert into day_selection
(id, ds_type, ds_subject_id, ds_id, ds_sort, ds_ext, ds_isrecommend, ds_focus_topic,
createtime, createby, updatetime, updateby, deletetag)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=VARCHAR}, #{item.dsType,jdbcType=VARCHAR}, #{item.dsSubjectId,jdbcType=VARCHAR},
#{item.dsId,jdbcType=VARCHAR}, #{item.dsSort,jdbcType=INTEGER}, #{item.dsExt,jdbcType=VARCHAR},
#{item.dsIsrecommend,jdbcType=VARCHAR}, #{item.dsFocusTopic,jdbcType=VARCHAR},
#{item.createtime,jdbcType=TIMESTAMP}, #{item.createby,jdbcType=VARCHAR}, #{item.updatetime,jdbcType=TIMESTAMP},
#{item.updateby,jdbcType=VARCHAR}, #{item.deletetag,jdbcType=VARCHAR})
</foreach>
</insert>
</mapper>