diff --git a/src/main/java/com/sztzjy/fund_investment/mapper/ProfitManagementMapper.java b/src/main/java/com/sztzjy/fund_investment/mapper/ProfitManagementMapper.java index ebb75a8..ca387f5 100644 --- a/src/main/java/com/sztzjy/fund_investment/mapper/ProfitManagementMapper.java +++ b/src/main/java/com/sztzjy/fund_investment/mapper/ProfitManagementMapper.java @@ -3,8 +3,10 @@ package com.sztzjy.fund_investment.mapper; import com.sztzjy.fund_investment.entity.ProfitManagement; import com.sztzjy.fund_investment.entity.ProfitManagementExample; import java.util.List; -import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +@Mapper public interface ProfitManagementMapper { long countByExample(ProfitManagementExample example); diff --git a/src/main/resources/mappers/ProfitManagementMapper.xml b/src/main/resources/mappers/ProfitManagementMapper.xml index ffd2d2c..416c986 100644 --- a/src/main/resources/mappers/ProfitManagementMapper.xml +++ b/src/main/resources/mappers/ProfitManagementMapper.xml @@ -288,578 +288,4 @@ fund_earnings = #{fundEarnings,jdbcType=DECIMAL} where id = #{id,jdbcType=VARCHAR} </update> - <resultMap id="BaseResultMap" type="com.sztzjy.fund_investment.entity.ProfitManagement"> - <id column="id" jdbcType="VARCHAR" property="id" /> - <result column="flow_id" jdbcType="VARCHAR" property="flowId" /> - <result column="investment_amount" jdbcType="DECIMAL" property="investmentAmount" /> - <result column="share_ratio" jdbcType="DECIMAL" property="shareRatio" /> - <result column="total_equity" jdbcType="DECIMAL" property="totalEquity" /> - <result column="share_count" jdbcType="DECIMAL" property="shareCount" /> - <result column="market_time" jdbcType="INTEGER" property="marketTime" /> - <result column="stock_price" jdbcType="DECIMAL" property="stockPrice" /> - <result column="market_value" jdbcType="DECIMAL" property="marketValue" /> - <result column="fund_earnings" jdbcType="DECIMAL" property="fundEarnings" /> - </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, flow_id, investment_amount, share_ratio, total_equity, share_count, market_time, - stock_price, market_value, fund_earnings - </sql> - <select id="selectByExample" parameterType="com.sztzjy.fund_investment.entity.ProfitManagementExample" resultMap="BaseResultMap"> - select - <if test="distinct"> - distinct - </if> - <include refid="Base_Column_List" /> - from profit_management - <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"> - select - <include refid="Base_Column_List" /> - from profit_management - where id = #{id,jdbcType=VARCHAR} - </select> - <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> - delete from profit_management - where id = #{id,jdbcType=VARCHAR} - </delete> - <delete id="deleteByExample" parameterType="com.sztzjy.fund_investment.entity.ProfitManagementExample"> - delete from profit_management - <if test="_parameter != null"> - <include refid="Example_Where_Clause" /> - </if> - </delete> - <insert id="insert" parameterType="com.sztzjy.fund_investment.entity.ProfitManagement"> - insert into profit_management (id, flow_id, investment_amount, - share_ratio, total_equity, share_count, - market_time, stock_price, market_value, - fund_earnings) - values (#{id,jdbcType=VARCHAR}, #{flowId,jdbcType=VARCHAR}, #{investmentAmount,jdbcType=DECIMAL}, - #{shareRatio,jdbcType=DECIMAL}, #{totalEquity,jdbcType=DECIMAL}, #{shareCount,jdbcType=DECIMAL}, - #{marketTime,jdbcType=INTEGER}, #{stockPrice,jdbcType=DECIMAL}, #{marketValue,jdbcType=DECIMAL}, - #{fundEarnings,jdbcType=DECIMAL}) - </insert> - <insert id="insertSelective" parameterType="com.sztzjy.fund_investment.entity.ProfitManagement"> - insert into profit_management - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="id != null"> - id, - </if> - <if test="flowId != null"> - flow_id, - </if> - <if test="investmentAmount != null"> - investment_amount, - </if> - <if test="shareRatio != null"> - share_ratio, - </if> - <if test="totalEquity != null"> - total_equity, - </if> - <if test="shareCount != null"> - share_count, - </if> - <if test="marketTime != null"> - market_time, - </if> - <if test="stockPrice != null"> - stock_price, - </if> - <if test="marketValue != null"> - market_value, - </if> - <if test="fundEarnings != null"> - fund_earnings, - </if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="id != null"> - #{id,jdbcType=VARCHAR}, - </if> - <if test="flowId != null"> - #{flowId,jdbcType=VARCHAR}, - </if> - <if test="investmentAmount != null"> - #{investmentAmount,jdbcType=DECIMAL}, - </if> - <if test="shareRatio != null"> - #{shareRatio,jdbcType=DECIMAL}, - </if> - <if test="totalEquity != null"> - #{totalEquity,jdbcType=DECIMAL}, - </if> - <if test="shareCount != null"> - #{shareCount,jdbcType=DECIMAL}, - </if> - <if test="marketTime != null"> - #{marketTime,jdbcType=INTEGER}, - </if> - <if test="stockPrice != null"> - #{stockPrice,jdbcType=DECIMAL}, - </if> - <if test="marketValue != null"> - #{marketValue,jdbcType=DECIMAL}, - </if> - <if test="fundEarnings != null"> - #{fundEarnings,jdbcType=DECIMAL}, - </if> - </trim> - </insert> - <select id="countByExample" parameterType="com.sztzjy.fund_investment.entity.ProfitManagementExample" resultType="java.lang.Long"> - select count(*) from profit_management - <if test="_parameter != null"> - <include refid="Example_Where_Clause" /> - </if> - </select> - <update id="updateByExampleSelective" parameterType="map"> - update profit_management - <set> - <if test="record.id != null"> - id = #{record.id,jdbcType=VARCHAR}, - </if> - <if test="record.flowId != null"> - flow_id = #{record.flowId,jdbcType=VARCHAR}, - </if> - <if test="record.investmentAmount != null"> - investment_amount = #{record.investmentAmount,jdbcType=DECIMAL}, - </if> - <if test="record.shareRatio != null"> - share_ratio = #{record.shareRatio,jdbcType=DECIMAL}, - </if> - <if test="record.totalEquity != null"> - total_equity = #{record.totalEquity,jdbcType=DECIMAL}, - </if> - <if test="record.shareCount != null"> - share_count = #{record.shareCount,jdbcType=DECIMAL}, - </if> - <if test="record.marketTime != null"> - market_time = #{record.marketTime,jdbcType=INTEGER}, - </if> - <if test="record.stockPrice != null"> - stock_price = #{record.stockPrice,jdbcType=DECIMAL}, - </if> - <if test="record.marketValue != null"> - market_value = #{record.marketValue,jdbcType=DECIMAL}, - </if> - <if test="record.fundEarnings != null"> - fund_earnings = #{record.fundEarnings,jdbcType=DECIMAL}, - </if> - </set> - <if test="_parameter != null"> - <include refid="Update_By_Example_Where_Clause" /> - </if> - </update> - <update id="updateByExample" parameterType="map"> - update profit_management - set id = #{record.id,jdbcType=VARCHAR}, - flow_id = #{record.flowId,jdbcType=VARCHAR}, - investment_amount = #{record.investmentAmount,jdbcType=DECIMAL}, - share_ratio = #{record.shareRatio,jdbcType=DECIMAL}, - total_equity = #{record.totalEquity,jdbcType=DECIMAL}, - share_count = #{record.shareCount,jdbcType=DECIMAL}, - market_time = #{record.marketTime,jdbcType=INTEGER}, - stock_price = #{record.stockPrice,jdbcType=DECIMAL}, - market_value = #{record.marketValue,jdbcType=DECIMAL}, - fund_earnings = #{record.fundEarnings,jdbcType=DECIMAL} - <if test="_parameter != null"> - <include refid="Update_By_Example_Where_Clause" /> - </if> - </update> - <update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.fund_investment.entity.ProfitManagement"> - update profit_management - <set> - <if test="flowId != null"> - flow_id = #{flowId,jdbcType=VARCHAR}, - </if> - <if test="investmentAmount != null"> - investment_amount = #{investmentAmount,jdbcType=DECIMAL}, - </if> - <if test="shareRatio != null"> - share_ratio = #{shareRatio,jdbcType=DECIMAL}, - </if> - <if test="totalEquity != null"> - total_equity = #{totalEquity,jdbcType=DECIMAL}, - </if> - <if test="shareCount != null"> - share_count = #{shareCount,jdbcType=DECIMAL}, - </if> - <if test="marketTime != null"> - market_time = #{marketTime,jdbcType=INTEGER}, - </if> - <if test="stockPrice != null"> - stock_price = #{stockPrice,jdbcType=DECIMAL}, - </if> - <if test="marketValue != null"> - market_value = #{marketValue,jdbcType=DECIMAL}, - </if> - <if test="fundEarnings != null"> - fund_earnings = #{fundEarnings,jdbcType=DECIMAL}, - </if> - </set> - where id = #{id,jdbcType=VARCHAR} - </update> - <update id="updateByPrimaryKey" parameterType="com.sztzjy.fund_investment.entity.ProfitManagement"> - update profit_management - set flow_id = #{flowId,jdbcType=VARCHAR}, - investment_amount = #{investmentAmount,jdbcType=DECIMAL}, - share_ratio = #{shareRatio,jdbcType=DECIMAL}, - total_equity = #{totalEquity,jdbcType=DECIMAL}, - share_count = #{shareCount,jdbcType=DECIMAL}, - market_time = #{marketTime,jdbcType=INTEGER}, - stock_price = #{stockPrice,jdbcType=DECIMAL}, - market_value = #{marketValue,jdbcType=DECIMAL}, - fund_earnings = #{fundEarnings,jdbcType=DECIMAL} - where id = #{id,jdbcType=VARCHAR} - </update> - <resultMap id="BaseResultMap" type="com.sztzjy.fund_investment.entity.ProfitManagement"> - <id column="id" jdbcType="VARCHAR" property="id" /> - <result column="flow_id" jdbcType="VARCHAR" property="flowId" /> - <result column="investment_amount" jdbcType="DECIMAL" property="investmentAmount" /> - <result column="share_ratio" jdbcType="DECIMAL" property="shareRatio" /> - <result column="total_equity" jdbcType="DECIMAL" property="totalEquity" /> - <result column="share_count" jdbcType="DECIMAL" property="shareCount" /> - <result column="market_time" jdbcType="INTEGER" property="marketTime" /> - <result column="stock_price" jdbcType="DECIMAL" property="stockPrice" /> - <result column="market_value" jdbcType="DECIMAL" property="marketValue" /> - <result column="fund_earnings" jdbcType="DECIMAL" property="fundEarnings" /> - </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, flow_id, investment_amount, share_ratio, total_equity, share_count, market_time, - stock_price, market_value, fund_earnings - </sql> - <select id="selectByExample" parameterType="com.sztzjy.fund_investment.entity.ProfitManagementExample" resultMap="BaseResultMap"> - select - <if test="distinct"> - distinct - </if> - <include refid="Base_Column_List" /> - from profit_management - <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"> - select - <include refid="Base_Column_List" /> - from profit_management - where id = #{id,jdbcType=VARCHAR} - </select> - <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> - delete from profit_management - where id = #{id,jdbcType=VARCHAR} - </delete> - <delete id="deleteByExample" parameterType="com.sztzjy.fund_investment.entity.ProfitManagementExample"> - delete from profit_management - <if test="_parameter != null"> - <include refid="Example_Where_Clause" /> - </if> - </delete> - <insert id="insert" parameterType="com.sztzjy.fund_investment.entity.ProfitManagement"> - insert into profit_management (id, flow_id, investment_amount, - share_ratio, total_equity, share_count, - market_time, stock_price, market_value, - fund_earnings) - values (#{id,jdbcType=VARCHAR}, #{flowId,jdbcType=VARCHAR}, #{investmentAmount,jdbcType=DECIMAL}, - #{shareRatio,jdbcType=DECIMAL}, #{totalEquity,jdbcType=DECIMAL}, #{shareCount,jdbcType=DECIMAL}, - #{marketTime,jdbcType=INTEGER}, #{stockPrice,jdbcType=DECIMAL}, #{marketValue,jdbcType=DECIMAL}, - #{fundEarnings,jdbcType=DECIMAL}) - </insert> - <insert id="insertSelective" parameterType="com.sztzjy.fund_investment.entity.ProfitManagement"> - insert into profit_management - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="id != null"> - id, - </if> - <if test="flowId != null"> - flow_id, - </if> - <if test="investmentAmount != null"> - investment_amount, - </if> - <if test="shareRatio != null"> - share_ratio, - </if> - <if test="totalEquity != null"> - total_equity, - </if> - <if test="shareCount != null"> - share_count, - </if> - <if test="marketTime != null"> - market_time, - </if> - <if test="stockPrice != null"> - stock_price, - </if> - <if test="marketValue != null"> - market_value, - </if> - <if test="fundEarnings != null"> - fund_earnings, - </if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="id != null"> - #{id,jdbcType=VARCHAR}, - </if> - <if test="flowId != null"> - #{flowId,jdbcType=VARCHAR}, - </if> - <if test="investmentAmount != null"> - #{investmentAmount,jdbcType=DECIMAL}, - </if> - <if test="shareRatio != null"> - #{shareRatio,jdbcType=DECIMAL}, - </if> - <if test="totalEquity != null"> - #{totalEquity,jdbcType=DECIMAL}, - </if> - <if test="shareCount != null"> - #{shareCount,jdbcType=DECIMAL}, - </if> - <if test="marketTime != null"> - #{marketTime,jdbcType=INTEGER}, - </if> - <if test="stockPrice != null"> - #{stockPrice,jdbcType=DECIMAL}, - </if> - <if test="marketValue != null"> - #{marketValue,jdbcType=DECIMAL}, - </if> - <if test="fundEarnings != null"> - #{fundEarnings,jdbcType=DECIMAL}, - </if> - </trim> - </insert> - <select id="countByExample" parameterType="com.sztzjy.fund_investment.entity.ProfitManagementExample" resultType="java.lang.Long"> - select count(*) from profit_management - <if test="_parameter != null"> - <include refid="Example_Where_Clause" /> - </if> - </select> - <update id="updateByExampleSelective" parameterType="map"> - update profit_management - <set> - <if test="record.id != null"> - id = #{record.id,jdbcType=VARCHAR}, - </if> - <if test="record.flowId != null"> - flow_id = #{record.flowId,jdbcType=VARCHAR}, - </if> - <if test="record.investmentAmount != null"> - investment_amount = #{record.investmentAmount,jdbcType=DECIMAL}, - </if> - <if test="record.shareRatio != null"> - share_ratio = #{record.shareRatio,jdbcType=DECIMAL}, - </if> - <if test="record.totalEquity != null"> - total_equity = #{record.totalEquity,jdbcType=DECIMAL}, - </if> - <if test="record.shareCount != null"> - share_count = #{record.shareCount,jdbcType=DECIMAL}, - </if> - <if test="record.marketTime != null"> - market_time = #{record.marketTime,jdbcType=INTEGER}, - </if> - <if test="record.stockPrice != null"> - stock_price = #{record.stockPrice,jdbcType=DECIMAL}, - </if> - <if test="record.marketValue != null"> - market_value = #{record.marketValue,jdbcType=DECIMAL}, - </if> - <if test="record.fundEarnings != null"> - fund_earnings = #{record.fundEarnings,jdbcType=DECIMAL}, - </if> - </set> - <if test="_parameter != null"> - <include refid="Update_By_Example_Where_Clause" /> - </if> - </update> - <update id="updateByExample" parameterType="map"> - update profit_management - set id = #{record.id,jdbcType=VARCHAR}, - flow_id = #{record.flowId,jdbcType=VARCHAR}, - investment_amount = #{record.investmentAmount,jdbcType=DECIMAL}, - share_ratio = #{record.shareRatio,jdbcType=DECIMAL}, - total_equity = #{record.totalEquity,jdbcType=DECIMAL}, - share_count = #{record.shareCount,jdbcType=DECIMAL}, - market_time = #{record.marketTime,jdbcType=INTEGER}, - stock_price = #{record.stockPrice,jdbcType=DECIMAL}, - market_value = #{record.marketValue,jdbcType=DECIMAL}, - fund_earnings = #{record.fundEarnings,jdbcType=DECIMAL} - <if test="_parameter != null"> - <include refid="Update_By_Example_Where_Clause" /> - </if> - </update> - <update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.fund_investment.entity.ProfitManagement"> - update profit_management - <set> - <if test="flowId != null"> - flow_id = #{flowId,jdbcType=VARCHAR}, - </if> - <if test="investmentAmount != null"> - investment_amount = #{investmentAmount,jdbcType=DECIMAL}, - </if> - <if test="shareRatio != null"> - share_ratio = #{shareRatio,jdbcType=DECIMAL}, - </if> - <if test="totalEquity != null"> - total_equity = #{totalEquity,jdbcType=DECIMAL}, - </if> - <if test="shareCount != null"> - share_count = #{shareCount,jdbcType=DECIMAL}, - </if> - <if test="marketTime != null"> - market_time = #{marketTime,jdbcType=INTEGER}, - </if> - <if test="stockPrice != null"> - stock_price = #{stockPrice,jdbcType=DECIMAL}, - </if> - <if test="marketValue != null"> - market_value = #{marketValue,jdbcType=DECIMAL}, - </if> - <if test="fundEarnings != null"> - fund_earnings = #{fundEarnings,jdbcType=DECIMAL}, - </if> - </set> - where id = #{id,jdbcType=VARCHAR} - </update> - <update id="updateByPrimaryKey" parameterType="com.sztzjy.fund_investment.entity.ProfitManagement"> - update profit_management - set flow_id = #{flowId,jdbcType=VARCHAR}, - investment_amount = #{investmentAmount,jdbcType=DECIMAL}, - share_ratio = #{shareRatio,jdbcType=DECIMAL}, - total_equity = #{totalEquity,jdbcType=DECIMAL}, - share_count = #{shareCount,jdbcType=DECIMAL}, - market_time = #{marketTime,jdbcType=INTEGER}, - stock_price = #{stockPrice,jdbcType=DECIMAL}, - market_value = #{marketValue,jdbcType=DECIMAL}, - fund_earnings = #{fundEarnings,jdbcType=DECIMAL} - where id = #{id,jdbcType=VARCHAR} - </update> </mapper> \ No newline at end of file