<?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.FundLatestNavMapper"> <resultMap id="BaseResultMap" type="com.tanpu.fund.entity.generator.FundLatestNav"> <id column="id" jdbcType="BIGINT" property="id" /> <result column="fund_id" jdbcType="VARCHAR" property="fundId" /> <result column="price_date" jdbcType="DATE" property="priceDate" /> <result column="nav" jdbcType="DECIMAL" property="nav" /> <result column="cumulative_nav" jdbcType="DECIMAL" property="cumulativeNav" /> <result column="cumulative_nav_withdrawal" jdbcType="DECIMAL" property="cumulativeNavWithdrawal" /> <result column="ishigh_or_low" jdbcType="INTEGER" property="ishighOrLow" /> <result column="tohigh_nav_ratio" jdbcType="DECIMAL" property="tohighNavRatio" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> </resultMap> <sql id="Example_Where_Clause"> <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"> <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"> id, fund_id, price_date, nav, cumulative_nav, cumulative_nav_withdrawal, ishigh_or_low, tohigh_nav_ratio, create_time, update_time </sql> <select id="selectByExample" parameterType="com.tanpu.fund.entity.generator.FundLatestNavExample" resultMap="BaseResultMap"> select <if test="distinct"> distinct </if> <include refid="Base_Column_List" /> from fund_latest_nav <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.Long" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from fund_latest_nav where id = #{id,jdbcType=BIGINT} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> delete from fund_latest_nav where id = #{id,jdbcType=BIGINT} </delete> <delete id="deleteByExample" parameterType="com.tanpu.fund.entity.generator.FundLatestNavExample"> delete from fund_latest_nav <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="com.tanpu.fund.entity.generator.FundLatestNav"> insert into fund_latest_nav (id, fund_id, price_date, nav, cumulative_nav, cumulative_nav_withdrawal, ishigh_or_low, tohigh_nav_ratio, create_time, update_time) values (#{id,jdbcType=BIGINT}, #{fundId,jdbcType=VARCHAR}, #{priceDate,jdbcType=DATE}, #{nav,jdbcType=DECIMAL}, #{cumulativeNav,jdbcType=DECIMAL}, #{cumulativeNavWithdrawal,jdbcType=DECIMAL}, #{ishighOrLow,jdbcType=INTEGER}, #{tohighNavRatio,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) </insert> <insert id="insertSelective" parameterType="com.tanpu.fund.entity.generator.FundLatestNav"> insert into fund_latest_nav <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> id, </if> <if test="fundId != null"> fund_id, </if> <if test="priceDate != null"> price_date, </if> <if test="nav != null"> nav, </if> <if test="cumulativeNav != null"> cumulative_nav, </if> <if test="cumulativeNavWithdrawal != null"> cumulative_nav_withdrawal, </if> <if test="ishighOrLow != null"> ishigh_or_low, </if> <if test="tohighNavRatio != null"> tohigh_nav_ratio, </if> <if test="createTime != null"> create_time, </if> <if test="updateTime != null"> update_time, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null"> #{id,jdbcType=BIGINT}, </if> <if test="fundId != null"> #{fundId,jdbcType=VARCHAR}, </if> <if test="priceDate != null"> #{priceDate,jdbcType=DATE}, </if> <if test="nav != null"> #{nav,jdbcType=DECIMAL}, </if> <if test="cumulativeNav != null"> #{cumulativeNav,jdbcType=DECIMAL}, </if> <if test="cumulativeNavWithdrawal != null"> #{cumulativeNavWithdrawal,jdbcType=DECIMAL}, </if> <if test="ishighOrLow != null"> #{ishighOrLow,jdbcType=INTEGER}, </if> <if test="tohighNavRatio != null"> #{tohighNavRatio,jdbcType=DECIMAL}, </if> <if test="createTime != null"> #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateTime != null"> #{updateTime,jdbcType=TIMESTAMP}, </if> </trim> </insert> <select id="countByExample" parameterType="com.tanpu.fund.entity.generator.FundLatestNavExample" resultType="java.lang.Long"> select count(*) from fund_latest_nav <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </select> <update id="updateByExampleSelective" parameterType="map"> update fund_latest_nav <set> <if test="record.id != null"> id = #{record.id,jdbcType=BIGINT}, </if> <if test="record.fundId != null"> fund_id = #{record.fundId,jdbcType=VARCHAR}, </if> <if test="record.priceDate != null"> price_date = #{record.priceDate,jdbcType=DATE}, </if> <if test="record.nav != null"> nav = #{record.nav,jdbcType=DECIMAL}, </if> <if test="record.cumulativeNav != null"> cumulative_nav = #{record.cumulativeNav,jdbcType=DECIMAL}, </if> <if test="record.cumulativeNavWithdrawal != null"> cumulative_nav_withdrawal = #{record.cumulativeNavWithdrawal,jdbcType=DECIMAL}, </if> <if test="record.ishighOrLow != null"> ishigh_or_low = #{record.ishighOrLow,jdbcType=INTEGER}, </if> <if test="record.tohighNavRatio != null"> tohigh_nav_ratio = #{record.tohighNavRatio,jdbcType=DECIMAL}, </if> <if test="record.createTime != null"> create_time = #{record.createTime,jdbcType=TIMESTAMP}, </if> <if test="record.updateTime != null"> update_time = #{record.updateTime,jdbcType=TIMESTAMP}, </if> </set> <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByExample" parameterType="map"> update fund_latest_nav set id = #{record.id,jdbcType=BIGINT}, fund_id = #{record.fundId,jdbcType=VARCHAR}, price_date = #{record.priceDate,jdbcType=DATE}, nav = #{record.nav,jdbcType=DECIMAL}, cumulative_nav = #{record.cumulativeNav,jdbcType=DECIMAL}, cumulative_nav_withdrawal = #{record.cumulativeNavWithdrawal,jdbcType=DECIMAL}, ishigh_or_low = #{record.ishighOrLow,jdbcType=INTEGER}, tohigh_nav_ratio = #{record.tohighNavRatio,jdbcType=DECIMAL}, create_time = #{record.createTime,jdbcType=TIMESTAMP}, update_time = #{record.updateTime,jdbcType=TIMESTAMP} <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByPrimaryKeySelective" parameterType="com.tanpu.fund.entity.generator.FundLatestNav"> update fund_latest_nav <set> <if test="fundId != null"> fund_id = #{fundId,jdbcType=VARCHAR}, </if> <if test="priceDate != null"> price_date = #{priceDate,jdbcType=DATE}, </if> <if test="nav != null"> nav = #{nav,jdbcType=DECIMAL}, </if> <if test="cumulativeNav != null"> cumulative_nav = #{cumulativeNav,jdbcType=DECIMAL}, </if> <if test="cumulativeNavWithdrawal != null"> cumulative_nav_withdrawal = #{cumulativeNavWithdrawal,jdbcType=DECIMAL}, </if> <if test="ishighOrLow != null"> ishigh_or_low = #{ishighOrLow,jdbcType=INTEGER}, </if> <if test="tohighNavRatio != null"> tohigh_nav_ratio = #{tohighNavRatio,jdbcType=DECIMAL}, </if> <if test="createTime != null"> create_time = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateTime != null"> update_time = #{updateTime,jdbcType=TIMESTAMP}, </if> </set> where id = #{id,jdbcType=BIGINT} </update> <update id="updateByPrimaryKey" parameterType="com.tanpu.fund.entity.generator.FundLatestNav"> update fund_latest_nav set fund_id = #{fundId,jdbcType=VARCHAR}, price_date = #{priceDate,jdbcType=DATE}, nav = #{nav,jdbcType=DECIMAL}, cumulative_nav = #{cumulativeNav,jdbcType=DECIMAL}, cumulative_nav_withdrawal = #{cumulativeNavWithdrawal,jdbcType=DECIMAL}, ishigh_or_low = #{ishighOrLow,jdbcType=INTEGER}, tohigh_nav_ratio = #{tohighNavRatio,jdbcType=DECIMAL}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP} where id = #{id,jdbcType=BIGINT} </update> </mapper>