<?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.IndexBasicMapper"> <resultMap id="BaseResultMap" type="com.tanpu.fund.entity.generator.IndexBasic"> <!--@mbg.generated--> <!--@Table index_basic--> <result column="base_point" jdbcType="DOUBLE" property="basePoint" /> <result column="org_id" jdbcType="VARCHAR" property="orgId" /> </resultMap> <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tanpu.fund.entity.generator.IndexBasic"> <!--@mbg.generated--> <!--@Table index_basic--> <result column="ts_code" jdbcType="LONGVARCHAR" property="tsCode" /> <result column="name" jdbcType="LONGVARCHAR" property="name" /> <result column="market" jdbcType="LONGVARCHAR" property="market" /> <result column="publisher" jdbcType="LONGVARCHAR" property="publisher" /> <result column="category" jdbcType="LONGVARCHAR" property="category" /> <result column="base_date" jdbcType="LONGVARCHAR" property="baseDate" /> <result column="list_date" jdbcType="LONGVARCHAR" property="listDate" /> </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--> base_point, org_id </sql> <sql id="Blob_Column_List"> <!--@mbg.generated--> ts_code, `name`, market, publisher, category, base_date, list_date </sql> <select id="selectByExampleWithBLOBs" parameterType="com.tanpu.fund.entity.generator.IndexBasicExample" resultMap="ResultMapWithBLOBs"> <!--@mbg.generated--> select <if test="distinct"> distinct </if> <include refid="Base_Column_List" /> , <include refid="Blob_Column_List" /> from index_basic <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null"> order by ${orderByClause} </if> </select> <select id="selectByExample" parameterType="com.tanpu.fund.entity.generator.IndexBasicExample" resultMap="BaseResultMap"> <!--@mbg.generated--> select <if test="distinct"> distinct </if> <include refid="Base_Column_List" /> from index_basic <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null"> order by ${orderByClause} </if> </select> <delete id="deleteByExample" parameterType="com.tanpu.fund.entity.generator.IndexBasicExample"> <!--@mbg.generated--> delete from index_basic <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="com.tanpu.fund.entity.generator.IndexBasic"> <!--@mbg.generated--> insert into index_basic (base_point, org_id, ts_code, `name`, market, publisher, category, base_date, list_date ) values (#{basePoint,jdbcType=DOUBLE}, #{orgId,jdbcType=VARCHAR}, #{tsCode,jdbcType=LONGVARCHAR}, #{name,jdbcType=LONGVARCHAR}, #{market,jdbcType=LONGVARCHAR}, #{publisher,jdbcType=LONGVARCHAR}, #{category,jdbcType=LONGVARCHAR}, #{baseDate,jdbcType=LONGVARCHAR}, #{listDate,jdbcType=LONGVARCHAR} ) </insert> <insert id="insertSelective" parameterType="com.tanpu.fund.entity.generator.IndexBasic"> <!--@mbg.generated--> insert into index_basic <trim prefix="(" suffix=")" suffixOverrides=","> <if test="basePoint != null"> base_point, </if> <if test="orgId != null"> org_id, </if> <if test="tsCode != null"> ts_code, </if> <if test="name != null"> `name`, </if> <if test="market != null"> market, </if> <if test="publisher != null"> publisher, </if> <if test="category != null"> category, </if> <if test="baseDate != null"> base_date, </if> <if test="listDate != null"> list_date, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="basePoint != null"> #{basePoint,jdbcType=DOUBLE}, </if> <if test="orgId != null"> #{orgId,jdbcType=VARCHAR}, </if> <if test="tsCode != null"> #{tsCode,jdbcType=LONGVARCHAR}, </if> <if test="name != null"> #{name,jdbcType=LONGVARCHAR}, </if> <if test="market != null"> #{market,jdbcType=LONGVARCHAR}, </if> <if test="publisher != null"> #{publisher,jdbcType=LONGVARCHAR}, </if> <if test="category != null"> #{category,jdbcType=LONGVARCHAR}, </if> <if test="baseDate != null"> #{baseDate,jdbcType=LONGVARCHAR}, </if> <if test="listDate != null"> #{listDate,jdbcType=LONGVARCHAR}, </if> </trim> </insert> <select id="countByExample" parameterType="com.tanpu.fund.entity.generator.IndexBasicExample" resultType="java.lang.Long"> <!--@mbg.generated--> select count(*) from index_basic <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </select> <update id="updateByExampleSelective" parameterType="map"> <!--@mbg.generated--> update index_basic <set> <if test="record.basePoint != null"> base_point = #{record.basePoint,jdbcType=DOUBLE}, </if> <if test="record.orgId != null"> org_id = #{record.orgId,jdbcType=VARCHAR}, </if> <if test="record.tsCode != null"> ts_code = #{record.tsCode,jdbcType=LONGVARCHAR}, </if> <if test="record.name != null"> `name` = #{record.name,jdbcType=LONGVARCHAR}, </if> <if test="record.market != null"> market = #{record.market,jdbcType=LONGVARCHAR}, </if> <if test="record.publisher != null"> publisher = #{record.publisher,jdbcType=LONGVARCHAR}, </if> <if test="record.category != null"> category = #{record.category,jdbcType=LONGVARCHAR}, </if> <if test="record.baseDate != null"> base_date = #{record.baseDate,jdbcType=LONGVARCHAR}, </if> <if test="record.listDate != null"> list_date = #{record.listDate,jdbcType=LONGVARCHAR}, </if> </set> <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByExampleWithBLOBs" parameterType="map"> <!--@mbg.generated--> update index_basic set base_point = #{record.basePoint,jdbcType=DOUBLE}, org_id = #{record.orgId,jdbcType=VARCHAR}, ts_code = #{record.tsCode,jdbcType=LONGVARCHAR}, `name` = #{record.name,jdbcType=LONGVARCHAR}, market = #{record.market,jdbcType=LONGVARCHAR}, publisher = #{record.publisher,jdbcType=LONGVARCHAR}, category = #{record.category,jdbcType=LONGVARCHAR}, base_date = #{record.baseDate,jdbcType=LONGVARCHAR}, list_date = #{record.listDate,jdbcType=LONGVARCHAR} <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByExample" parameterType="map"> <!--@mbg.generated--> update index_basic set base_point = #{record.basePoint,jdbcType=DOUBLE}, org_id = #{record.orgId,jdbcType=VARCHAR} <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <insert id="batchInsert" parameterType="map"> <!--@mbg.generated--> insert into index_basic (base_point, org_id, ts_code, `name`, market, publisher, category, base_date, list_date ) values <foreach collection="list" item="item" separator=","> (#{item.basePoint,jdbcType=DOUBLE}, #{item.orgId,jdbcType=VARCHAR}, #{item.tsCode,jdbcType=LONGVARCHAR}, #{item.name,jdbcType=LONGVARCHAR}, #{item.market,jdbcType=LONGVARCHAR}, #{item.publisher,jdbcType=LONGVARCHAR}, #{item.category,jdbcType=LONGVARCHAR}, #{item.baseDate,jdbcType=LONGVARCHAR}, #{item.listDate,jdbcType=LONGVARCHAR} ) </foreach> </insert> <insert id="insertOrUpdate" parameterType="com.tanpu.fund.entity.generator.IndexBasic"> <!--@mbg.generated--> insert into index_basic (base_point, org_id) values (#{basePoint,jdbcType=DOUBLE}, #{orgId,jdbcType=VARCHAR}) on duplicate key update base_point = #{basePoint,jdbcType=DOUBLE}, org_id = #{orgId,jdbcType=VARCHAR} </insert> <insert id="insertOrUpdateWithBLOBs" parameterType="com.tanpu.fund.entity.generator.IndexBasic"> <!--@mbg.generated--> insert into index_basic (base_point, org_id, ts_code, `name`, market, publisher, category, base_date, list_date ) values (#{basePoint,jdbcType=DOUBLE}, #{orgId,jdbcType=VARCHAR}, #{tsCode,jdbcType=LONGVARCHAR}, #{name,jdbcType=LONGVARCHAR}, #{market,jdbcType=LONGVARCHAR}, #{publisher,jdbcType=LONGVARCHAR}, #{category,jdbcType=LONGVARCHAR}, #{baseDate,jdbcType=LONGVARCHAR}, #{listDate,jdbcType=LONGVARCHAR} ) on duplicate key update base_point = #{basePoint,jdbcType=DOUBLE}, org_id = #{orgId,jdbcType=VARCHAR}, ts_code = #{tsCode,jdbcType=LONGVARCHAR}, `name` = #{name,jdbcType=LONGVARCHAR}, market = #{market,jdbcType=LONGVARCHAR}, publisher = #{publisher,jdbcType=LONGVARCHAR}, category = #{category,jdbcType=LONGVARCHAR}, base_date = #{baseDate,jdbcType=LONGVARCHAR}, list_date = #{listDate,jdbcType=LONGVARCHAR} </insert> <insert id="insertOrUpdateSelective" parameterType="com.tanpu.fund.entity.generator.IndexBasic"> <!--@mbg.generated--> insert into index_basic <trim prefix="(" suffix=")" suffixOverrides=","> <if test="basePoint != null"> base_point, </if> <if test="orgId != null"> org_id, </if> <if test="tsCode != null"> ts_code, </if> <if test="name != null"> `name`, </if> <if test="market != null"> market, </if> <if test="publisher != null"> publisher, </if> <if test="category != null"> category, </if> <if test="baseDate != null"> base_date, </if> <if test="listDate != null"> list_date, </if> </trim> values <trim prefix="(" suffix=")" suffixOverrides=","> <if test="basePoint != null"> #{basePoint,jdbcType=DOUBLE}, </if> <if test="orgId != null"> #{orgId,jdbcType=VARCHAR}, </if> <if test="tsCode != null"> #{tsCode,jdbcType=LONGVARCHAR}, </if> <if test="name != null"> #{name,jdbcType=LONGVARCHAR}, </if> <if test="market != null"> #{market,jdbcType=LONGVARCHAR}, </if> <if test="publisher != null"> #{publisher,jdbcType=LONGVARCHAR}, </if> <if test="category != null"> #{category,jdbcType=LONGVARCHAR}, </if> <if test="baseDate != null"> #{baseDate,jdbcType=LONGVARCHAR}, </if> <if test="listDate != null"> #{listDate,jdbcType=LONGVARCHAR}, </if> </trim> on duplicate key update <trim suffixOverrides=","> <if test="basePoint != null"> base_point = #{basePoint,jdbcType=DOUBLE}, </if> <if test="orgId != null"> org_id = #{orgId,jdbcType=VARCHAR}, </if> <if test="tsCode != null"> ts_code = #{tsCode,jdbcType=LONGVARCHAR}, </if> <if test="name != null"> `name` = #{name,jdbcType=LONGVARCHAR}, </if> <if test="market != null"> market = #{market,jdbcType=LONGVARCHAR}, </if> <if test="publisher != null"> publisher = #{publisher,jdbcType=LONGVARCHAR}, </if> <if test="category != null"> category = #{category,jdbcType=LONGVARCHAR}, </if> <if test="baseDate != null"> base_date = #{baseDate,jdbcType=LONGVARCHAR}, </if> <if test="listDate != null"> list_date = #{listDate,jdbcType=LONGVARCHAR}, </if> </trim> </insert> </mapper>