<?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>