<?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.fund.mapper.generator.FundManagerMapping1Mapper"> <resultMap id="BaseResultMap" type="com.tanpu.fund.entity.generator.FundManagerMapping1"> <!--@mbg.generated--> <!--@Table fund_manager_mapping1--> <id column="id" jdbcType="VARCHAR" property="id" /> <result column="fund_id" jdbcType="VARCHAR" property="fundId" /> <result column="fund_manager_id" jdbcType="VARCHAR" property="fundManagerId" /> <result column="management_start_date" jdbcType="DATE" property="managementStartDate" /> <result column="management_end_date" jdbcType="DATE" property="managementEndDate" /> <result column="isvisible" jdbcType="INTEGER" property="isvisible" /> <result column="create_by" jdbcType="VARCHAR" property="createBy" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="update_by" jdbcType="VARCHAR" property="updateBy" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="delete_tag" jdbcType="INTEGER" property="deleteTag" /> </resultMap> <sql id="Example_Where_Clause"> <!--@mbg.generated--> <where> <foreach collection="oredCriteria" item="criteria" separator="or"> <if test="criteria.valid"> <trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="criteria.criteria" item="criterion"> <choose> <when test="criterion.noValue"> and ${criterion.condition} </when> <when test="criterion.singleValue"> and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue"> and ${criterion.condition} <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Update_By_Example_Where_Clause"> <!--@mbg.generated--> <where> <foreach collection="example.oredCriteria" item="criteria" separator="or"> <if test="criteria.valid"> <trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="criteria.criteria" item="criterion"> <choose> <when test="criterion.noValue"> and ${criterion.condition} </when> <when test="criterion.singleValue"> and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue"> and ${criterion.condition} <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Base_Column_List"> <!--@mbg.generated--> id, fund_id, fund_manager_id, management_start_date, management_end_date, isvisible, create_by, create_time, update_by, update_time, delete_tag </sql> <select id="selectByExample" parameterType="com.tanpu.fund.entity.generator.FundManagerMapping1Example" resultMap="BaseResultMap"> <!--@mbg.generated--> select <if test="distinct"> distinct </if> <include refid="Base_Column_List" /> from fund_manager_mapping1 <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null"> order by ${orderByClause} </if> </select> <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> <!--@mbg.generated--> select <include refid="Base_Column_List" /> from fund_manager_mapping1 where id = #{id,jdbcType=VARCHAR} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> <!--@mbg.generated--> delete from fund_manager_mapping1 where id = #{id,jdbcType=VARCHAR} </delete> <delete id="deleteByExample" parameterType="com.tanpu.fund.entity.generator.FundManagerMapping1Example"> <!--@mbg.generated--> delete from fund_manager_mapping1 <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="com.tanpu.fund.entity.generator.FundManagerMapping1"> <!--@mbg.generated--> insert into fund_manager_mapping1 (id, fund_id, fund_manager_id, management_start_date, management_end_date, isvisible, create_by, create_time, update_by, update_time, delete_tag) values (#{id,jdbcType=VARCHAR}, #{fundId,jdbcType=VARCHAR}, #{fundManagerId,jdbcType=VARCHAR}, #{managementStartDate,jdbcType=DATE}, #{managementEndDate,jdbcType=DATE}, #{isvisible,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{deleteTag,jdbcType=INTEGER}) </insert> <insert id="insertSelective" parameterType="com.tanpu.fund.entity.generator.FundManagerMapping1"> <!--@mbg.generated--> insert into fund_manager_mapping1 <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> id, </if> <if test="fundId != null"> fund_id, </if> <if test="fundManagerId != null"> fund_manager_id, </if> <if test="managementStartDate != null"> management_start_date, </if> <if test="managementEndDate != null"> management_end_date, </if> <if test="isvisible != null"> isvisible, </if> <if test="createBy != null"> create_by, </if> <if test="createTime != null"> create_time, </if> <if test="updateBy != null"> update_by, </if> <if test="updateTime != null"> update_time, </if> <if test="deleteTag != null"> delete_tag, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null"> #{id,jdbcType=VARCHAR}, </if> <if test="fundId != null"> #{fundId,jdbcType=VARCHAR}, </if> <if test="fundManagerId != null"> #{fundManagerId,jdbcType=VARCHAR}, </if> <if test="managementStartDate != null"> #{managementStartDate,jdbcType=DATE}, </if> <if test="managementEndDate != null"> #{managementEndDate,jdbcType=DATE}, </if> <if test="isvisible != null"> #{isvisible,jdbcType=INTEGER}, </if> <if test="createBy != null"> #{createBy,jdbcType=VARCHAR}, </if> <if test="createTime != null"> #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateBy != null"> #{updateBy,jdbcType=VARCHAR}, </if> <if test="updateTime != null"> #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="deleteTag != null"> #{deleteTag,jdbcType=INTEGER}, </if> </trim> </insert> <select id="countByExample" parameterType="com.tanpu.fund.entity.generator.FundManagerMapping1Example" resultType="java.lang.Long"> <!--@mbg.generated--> select count(*) from fund_manager_mapping1 <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </select> <update id="updateByExampleSelective" parameterType="map"> <!--@mbg.generated--> update fund_manager_mapping1 <set> <if test="record.id != null"> id = #{record.id,jdbcType=VARCHAR}, </if> <if test="record.fundId != null"> fund_id = #{record.fundId,jdbcType=VARCHAR}, </if> <if test="record.fundManagerId != null"> fund_manager_id = #{record.fundManagerId,jdbcType=VARCHAR}, </if> <if test="record.managementStartDate != null"> management_start_date = #{record.managementStartDate,jdbcType=DATE}, </if> <if test="record.managementEndDate != null"> management_end_date = #{record.managementEndDate,jdbcType=DATE}, </if> <if test="record.isvisible != null"> isvisible = #{record.isvisible,jdbcType=INTEGER}, </if> <if test="record.createBy != null"> create_by = #{record.createBy,jdbcType=VARCHAR}, </if> <if test="record.createTime != null"> create_time = #{record.createTime,jdbcType=TIMESTAMP}, </if> <if test="record.updateBy != null"> update_by = #{record.updateBy,jdbcType=VARCHAR}, </if> <if test="record.updateTime != null"> update_time = #{record.updateTime,jdbcType=TIMESTAMP}, </if> <if test="record.deleteTag != null"> delete_tag = #{record.deleteTag,jdbcType=INTEGER}, </if> </set> <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByExample" parameterType="map"> <!--@mbg.generated--> update fund_manager_mapping1 set id = #{record.id,jdbcType=VARCHAR}, fund_id = #{record.fundId,jdbcType=VARCHAR}, fund_manager_id = #{record.fundManagerId,jdbcType=VARCHAR}, management_start_date = #{record.managementStartDate,jdbcType=DATE}, management_end_date = #{record.managementEndDate,jdbcType=DATE}, isvisible = #{record.isvisible,jdbcType=INTEGER}, create_by = #{record.createBy,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=TIMESTAMP}, update_by = #{record.updateBy,jdbcType=VARCHAR}, update_time = #{record.updateTime,jdbcType=TIMESTAMP}, delete_tag = #{record.deleteTag,jdbcType=INTEGER} <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByPrimaryKeySelective" parameterType="com.tanpu.fund.entity.generator.FundManagerMapping1"> <!--@mbg.generated--> update fund_manager_mapping1 <set> <if test="fundId != null"> fund_id = #{fundId,jdbcType=VARCHAR}, </if> <if test="fundManagerId != null"> fund_manager_id = #{fundManagerId,jdbcType=VARCHAR}, </if> <if test="managementStartDate != null"> management_start_date = #{managementStartDate,jdbcType=DATE}, </if> <if test="managementEndDate != null"> management_end_date = #{managementEndDate,jdbcType=DATE}, </if> <if test="isvisible != null"> isvisible = #{isvisible,jdbcType=INTEGER}, </if> <if test="createBy != null"> create_by = #{createBy,jdbcType=VARCHAR}, </if> <if test="createTime != null"> create_time = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateBy != null"> update_by = #{updateBy,jdbcType=VARCHAR}, </if> <if test="updateTime != null"> update_time = #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="deleteTag != null"> delete_tag = #{deleteTag,jdbcType=INTEGER}, </if> </set> where id = #{id,jdbcType=VARCHAR} </update> <update id="updateByPrimaryKey" parameterType="com.tanpu.fund.entity.generator.FundManagerMapping1"> <!--@mbg.generated--> update fund_manager_mapping1 set fund_id = #{fundId,jdbcType=VARCHAR}, fund_manager_id = #{fundManagerId,jdbcType=VARCHAR}, management_start_date = #{managementStartDate,jdbcType=DATE}, management_end_date = #{managementEndDate,jdbcType=DATE}, isvisible = #{isvisible,jdbcType=INTEGER}, create_by = #{createBy,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_by = #{updateBy,jdbcType=VARCHAR}, update_time = #{updateTime,jdbcType=TIMESTAMP}, delete_tag = #{deleteTag,jdbcType=INTEGER} where id = #{id,jdbcType=VARCHAR} </update> <update id="updateBatch" parameterType="java.util.List"> <!--@mbg.generated--> update fund_manager_mapping1 <trim prefix="set" suffixOverrides=","> <trim prefix="fund_id = case" suffix="end,"> <foreach collection="list" index="index" item="item"> when id = #{item.id,jdbcType=VARCHAR} then #{item.fundId,jdbcType=VARCHAR} </foreach> </trim> <trim prefix="fund_manager_id = case" suffix="end,"> <foreach collection="list" index="index" item="item"> when id = #{item.id,jdbcType=VARCHAR} then #{item.fundManagerId,jdbcType=VARCHAR} </foreach> </trim> <trim prefix="management_start_date = case" suffix="end,"> <foreach collection="list" index="index" item="item"> when id = #{item.id,jdbcType=VARCHAR} then #{item.managementStartDate,jdbcType=DATE} </foreach> </trim> <trim prefix="management_end_date = case" suffix="end,"> <foreach collection="list" index="index" item="item"> when id = #{item.id,jdbcType=VARCHAR} then #{item.managementEndDate,jdbcType=DATE} </foreach> </trim> <trim prefix="isvisible = case" suffix="end,"> <foreach collection="list" index="index" item="item"> when id = #{item.id,jdbcType=VARCHAR} then #{item.isvisible,jdbcType=INTEGER} </foreach> </trim> <trim prefix="create_by = 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="create_time = 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="update_by = 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="update_time = 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="delete_tag = case" suffix="end,"> <foreach collection="list" index="index" item="item"> when id = #{item.id,jdbcType=VARCHAR} then #{item.deleteTag,jdbcType=INTEGER} </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 fund_manager_mapping1 (id, fund_id, fund_manager_id, management_start_date, management_end_date, isvisible, create_by, create_time, update_by, update_time, delete_tag) values <foreach collection="list" item="item" separator=","> (#{item.id,jdbcType=VARCHAR}, #{item.fundId,jdbcType=VARCHAR}, #{item.fundManagerId,jdbcType=VARCHAR}, #{item.managementStartDate,jdbcType=DATE}, #{item.managementEndDate,jdbcType=DATE}, #{item.isvisible,jdbcType=INTEGER}, #{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.deleteTag,jdbcType=INTEGER} ) </foreach> </insert> <insert id="insertOrUpdate" parameterType="com.tanpu.fund.entity.generator.FundManagerMapping1"> <!--@mbg.generated--> insert into fund_manager_mapping1 (id, fund_id, fund_manager_id, management_start_date, management_end_date, isvisible, create_by, create_time, update_by, update_time, delete_tag) values (#{id,jdbcType=VARCHAR}, #{fundId,jdbcType=VARCHAR}, #{fundManagerId,jdbcType=VARCHAR}, #{managementStartDate,jdbcType=DATE}, #{managementEndDate,jdbcType=DATE}, #{isvisible,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{deleteTag,jdbcType=INTEGER}) on duplicate key update id = #{id,jdbcType=VARCHAR}, fund_id = #{fundId,jdbcType=VARCHAR}, fund_manager_id = #{fundManagerId,jdbcType=VARCHAR}, management_start_date = #{managementStartDate,jdbcType=DATE}, management_end_date = #{managementEndDate,jdbcType=DATE}, isvisible = #{isvisible,jdbcType=INTEGER}, create_by = #{createBy,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_by = #{updateBy,jdbcType=VARCHAR}, update_time = #{updateTime,jdbcType=TIMESTAMP}, delete_tag = #{deleteTag,jdbcType=INTEGER} </insert> <insert id="insertOrUpdateSelective" parameterType="com.tanpu.fund.entity.generator.FundManagerMapping1"> <!--@mbg.generated--> insert into fund_manager_mapping1 <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> id, </if> <if test="fundId != null"> fund_id, </if> <if test="fundManagerId != null"> fund_manager_id, </if> <if test="managementStartDate != null"> management_start_date, </if> <if test="managementEndDate != null"> management_end_date, </if> <if test="isvisible != null"> isvisible, </if> <if test="createBy != null"> create_by, </if> <if test="createTime != null"> create_time, </if> <if test="updateBy != null"> update_by, </if> <if test="updateTime != null"> update_time, </if> <if test="deleteTag != null"> delete_tag, </if> </trim> values <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> #{id,jdbcType=VARCHAR}, </if> <if test="fundId != null"> #{fundId,jdbcType=VARCHAR}, </if> <if test="fundManagerId != null"> #{fundManagerId,jdbcType=VARCHAR}, </if> <if test="managementStartDate != null"> #{managementStartDate,jdbcType=DATE}, </if> <if test="managementEndDate != null"> #{managementEndDate,jdbcType=DATE}, </if> <if test="isvisible != null"> #{isvisible,jdbcType=INTEGER}, </if> <if test="createBy != null"> #{createBy,jdbcType=VARCHAR}, </if> <if test="createTime != null"> #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateBy != null"> #{updateBy,jdbcType=VARCHAR}, </if> <if test="updateTime != null"> #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="deleteTag != null"> #{deleteTag,jdbcType=INTEGER}, </if> </trim> on duplicate key update <trim suffixOverrides=","> <if test="id != null"> id = #{id,jdbcType=VARCHAR}, </if> <if test="fundId != null"> fund_id = #{fundId,jdbcType=VARCHAR}, </if> <if test="fundManagerId != null"> fund_manager_id = #{fundManagerId,jdbcType=VARCHAR}, </if> <if test="managementStartDate != null"> management_start_date = #{managementStartDate,jdbcType=DATE}, </if> <if test="managementEndDate != null"> management_end_date = #{managementEndDate,jdbcType=DATE}, </if> <if test="isvisible != null"> isvisible = #{isvisible,jdbcType=INTEGER}, </if> <if test="createBy != null"> create_by = #{createBy,jdbcType=VARCHAR}, </if> <if test="createTime != null"> create_time = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateBy != null"> update_by = #{updateBy,jdbcType=VARCHAR}, </if> <if test="updateTime != null"> update_time = #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="deleteTag != null"> delete_tag = #{deleteTag,jdbcType=INTEGER}, </if> </trim> </insert> </mapper>