编写收益分配页面,新增数据库字段
parent
0f24bb9ad6
commit
9681ae5fd1
@ -1,8 +1,14 @@
|
||||
package com.sztzjy.fund_investment.service;
|
||||
|
||||
import com.sztzjy.fund_investment.entity.ProfitDistribution;
|
||||
import com.sztzjy.fund_investment.util.ResultEntity;
|
||||
|
||||
/**
|
||||
* @Author xcj
|
||||
* @Date 2023/12/6
|
||||
*/
|
||||
public interface ProfitDistributionService {
|
||||
void submit(ProfitDistribution profitDistribution);
|
||||
|
||||
ProfitDistribution echo(String flowId);
|
||||
}
|
||||
|
@ -1,356 +0,0 @@
|
||||
<?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.sztzjy.fund_investment.mapper.ProfitDistributionMapper">
|
||||
<resultMap id="BaseResultMap" type="com.sztzjy.fund_investment.entity.ProfitDistribution">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="flow_id" jdbcType="VARCHAR" property="flowId" />
|
||||
<result column="project_name" jdbcType="VARCHAR" property="projectName" />
|
||||
<result column="investment_amount" jdbcType="DECIMAL" property="investmentAmount" />
|
||||
<result column="exit_stock_price" jdbcType="DECIMAL" property="exitStockPrice" />
|
||||
<result column="fund_earnings" jdbcType="DECIMAL" property="fundEarnings" />
|
||||
<result column="available_funds" jdbcType="DECIMAL" property="availableFunds" />
|
||||
<result column="round1_own_funds" jdbcType="DECIMAL" property="round1OwnFunds" />
|
||||
<result column="round1_subordinated_lp" jdbcType="DECIMAL" property="round1SubordinatedLp" />
|
||||
<result column="round1_preferred_lp" jdbcType="DECIMAL" property="round1PreferredLp" />
|
||||
<result column="round1_bank_loan" jdbcType="DECIMAL" property="round1BankLoan" />
|
||||
<result column="remaining_own_funds" jdbcType="DECIMAL" property="remainingOwnFunds" />
|
||||
<result column="remaining_earnings_subordinated_lp" jdbcType="DECIMAL" property="remainingEarningsSubordinatedLp" />
|
||||
<result column="remaining_earnings_preferred_lp" jdbcType="DECIMAL" property="remainingEarningsPreferredLp" />
|
||||
</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, project_name, investment_amount, exit_stock_price, fund_earnings, available_funds,
|
||||
round1_own_funds, round1_subordinated_lp, round1_preferred_lp, round1_bank_loan,
|
||||
remaining_own_funds, remaining_earnings_subordinated_lp, remaining_earnings_preferred_lp
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.sztzjy.fund_investment.entity.ProfitDistributionExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from profit_distribution
|
||||
<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_distribution
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from profit_distribution
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.sztzjy.fund_investment.entity.ProfitDistributionExample">
|
||||
delete from profit_distribution
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sztzjy.fund_investment.entity.ProfitDistribution">
|
||||
insert into profit_distribution (id, flow_id, project_name,
|
||||
investment_amount, exit_stock_price, fund_earnings,
|
||||
available_funds, round1_own_funds, round1_subordinated_lp,
|
||||
round1_preferred_lp, round1_bank_loan, remaining_own_funds,
|
||||
remaining_earnings_subordinated_lp, remaining_earnings_preferred_lp
|
||||
)
|
||||
values (#{id,jdbcType=VARCHAR}, #{flowId,jdbcType=VARCHAR}, #{projectName,jdbcType=VARCHAR},
|
||||
#{investmentAmount,jdbcType=DECIMAL}, #{exitStockPrice,jdbcType=DECIMAL}, #{fundEarnings,jdbcType=DECIMAL},
|
||||
#{availableFunds,jdbcType=DECIMAL}, #{round1OwnFunds,jdbcType=DECIMAL}, #{round1SubordinatedLp,jdbcType=DECIMAL},
|
||||
#{round1PreferredLp,jdbcType=DECIMAL}, #{round1BankLoan,jdbcType=DECIMAL}, #{remainingOwnFunds,jdbcType=DECIMAL},
|
||||
#{remainingEarningsSubordinatedLp,jdbcType=DECIMAL}, #{remainingEarningsPreferredLp,jdbcType=DECIMAL}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sztzjy.fund_investment.entity.ProfitDistribution">
|
||||
insert into profit_distribution
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="flowId != null">
|
||||
flow_id,
|
||||
</if>
|
||||
<if test="projectName != null">
|
||||
project_name,
|
||||
</if>
|
||||
<if test="investmentAmount != null">
|
||||
investment_amount,
|
||||
</if>
|
||||
<if test="exitStockPrice != null">
|
||||
exit_stock_price,
|
||||
</if>
|
||||
<if test="fundEarnings != null">
|
||||
fund_earnings,
|
||||
</if>
|
||||
<if test="availableFunds != null">
|
||||
available_funds,
|
||||
</if>
|
||||
<if test="round1OwnFunds != null">
|
||||
round1_own_funds,
|
||||
</if>
|
||||
<if test="round1SubordinatedLp != null">
|
||||
round1_subordinated_lp,
|
||||
</if>
|
||||
<if test="round1PreferredLp != null">
|
||||
round1_preferred_lp,
|
||||
</if>
|
||||
<if test="round1BankLoan != null">
|
||||
round1_bank_loan,
|
||||
</if>
|
||||
<if test="remainingOwnFunds != null">
|
||||
remaining_own_funds,
|
||||
</if>
|
||||
<if test="remainingEarningsSubordinatedLp != null">
|
||||
remaining_earnings_subordinated_lp,
|
||||
</if>
|
||||
<if test="remainingEarningsPreferredLp != null">
|
||||
remaining_earnings_preferred_lp,
|
||||
</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="projectName != null">
|
||||
#{projectName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="investmentAmount != null">
|
||||
#{investmentAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="exitStockPrice != null">
|
||||
#{exitStockPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="fundEarnings != null">
|
||||
#{fundEarnings,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="availableFunds != null">
|
||||
#{availableFunds,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="round1OwnFunds != null">
|
||||
#{round1OwnFunds,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="round1SubordinatedLp != null">
|
||||
#{round1SubordinatedLp,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="round1PreferredLp != null">
|
||||
#{round1PreferredLp,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="round1BankLoan != null">
|
||||
#{round1BankLoan,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="remainingOwnFunds != null">
|
||||
#{remainingOwnFunds,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="remainingEarningsSubordinatedLp != null">
|
||||
#{remainingEarningsSubordinatedLp,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="remainingEarningsPreferredLp != null">
|
||||
#{remainingEarningsPreferredLp,jdbcType=DECIMAL},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.sztzjy.fund_investment.entity.ProfitDistributionExample" resultType="java.lang.Long">
|
||||
select count(*) from profit_distribution
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update profit_distribution
|
||||
<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.projectName != null">
|
||||
project_name = #{record.projectName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.investmentAmount != null">
|
||||
investment_amount = #{record.investmentAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.exitStockPrice != null">
|
||||
exit_stock_price = #{record.exitStockPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.fundEarnings != null">
|
||||
fund_earnings = #{record.fundEarnings,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.availableFunds != null">
|
||||
available_funds = #{record.availableFunds,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.round1OwnFunds != null">
|
||||
round1_own_funds = #{record.round1OwnFunds,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.round1SubordinatedLp != null">
|
||||
round1_subordinated_lp = #{record.round1SubordinatedLp,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.round1PreferredLp != null">
|
||||
round1_preferred_lp = #{record.round1PreferredLp,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.round1BankLoan != null">
|
||||
round1_bank_loan = #{record.round1BankLoan,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.remainingOwnFunds != null">
|
||||
remaining_own_funds = #{record.remainingOwnFunds,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.remainingEarningsSubordinatedLp != null">
|
||||
remaining_earnings_subordinated_lp = #{record.remainingEarningsSubordinatedLp,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.remainingEarningsPreferredLp != null">
|
||||
remaining_earnings_preferred_lp = #{record.remainingEarningsPreferredLp,jdbcType=DECIMAL},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update profit_distribution
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
flow_id = #{record.flowId,jdbcType=VARCHAR},
|
||||
project_name = #{record.projectName,jdbcType=VARCHAR},
|
||||
investment_amount = #{record.investmentAmount,jdbcType=DECIMAL},
|
||||
exit_stock_price = #{record.exitStockPrice,jdbcType=DECIMAL},
|
||||
fund_earnings = #{record.fundEarnings,jdbcType=DECIMAL},
|
||||
available_funds = #{record.availableFunds,jdbcType=DECIMAL},
|
||||
round1_own_funds = #{record.round1OwnFunds,jdbcType=DECIMAL},
|
||||
round1_subordinated_lp = #{record.round1SubordinatedLp,jdbcType=DECIMAL},
|
||||
round1_preferred_lp = #{record.round1PreferredLp,jdbcType=DECIMAL},
|
||||
round1_bank_loan = #{record.round1BankLoan,jdbcType=DECIMAL},
|
||||
remaining_own_funds = #{record.remainingOwnFunds,jdbcType=DECIMAL},
|
||||
remaining_earnings_subordinated_lp = #{record.remainingEarningsSubordinatedLp,jdbcType=DECIMAL},
|
||||
remaining_earnings_preferred_lp = #{record.remainingEarningsPreferredLp,jdbcType=DECIMAL}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.fund_investment.entity.ProfitDistribution">
|
||||
update profit_distribution
|
||||
<set>
|
||||
<if test="flowId != null">
|
||||
flow_id = #{flowId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="projectName != null">
|
||||
project_name = #{projectName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="investmentAmount != null">
|
||||
investment_amount = #{investmentAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="exitStockPrice != null">
|
||||
exit_stock_price = #{exitStockPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="fundEarnings != null">
|
||||
fund_earnings = #{fundEarnings,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="availableFunds != null">
|
||||
available_funds = #{availableFunds,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="round1OwnFunds != null">
|
||||
round1_own_funds = #{round1OwnFunds,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="round1SubordinatedLp != null">
|
||||
round1_subordinated_lp = #{round1SubordinatedLp,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="round1PreferredLp != null">
|
||||
round1_preferred_lp = #{round1PreferredLp,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="round1BankLoan != null">
|
||||
round1_bank_loan = #{round1BankLoan,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="remainingOwnFunds != null">
|
||||
remaining_own_funds = #{remainingOwnFunds,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="remainingEarningsSubordinatedLp != null">
|
||||
remaining_earnings_subordinated_lp = #{remainingEarningsSubordinatedLp,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="remainingEarningsPreferredLp != null">
|
||||
remaining_earnings_preferred_lp = #{remainingEarningsPreferredLp,jdbcType=DECIMAL},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.sztzjy.fund_investment.entity.ProfitDistribution">
|
||||
update profit_distribution
|
||||
set flow_id = #{flowId,jdbcType=VARCHAR},
|
||||
project_name = #{projectName,jdbcType=VARCHAR},
|
||||
investment_amount = #{investmentAmount,jdbcType=DECIMAL},
|
||||
exit_stock_price = #{exitStockPrice,jdbcType=DECIMAL},
|
||||
fund_earnings = #{fundEarnings,jdbcType=DECIMAL},
|
||||
available_funds = #{availableFunds,jdbcType=DECIMAL},
|
||||
round1_own_funds = #{round1OwnFunds,jdbcType=DECIMAL},
|
||||
round1_subordinated_lp = #{round1SubordinatedLp,jdbcType=DECIMAL},
|
||||
round1_preferred_lp = #{round1PreferredLp,jdbcType=DECIMAL},
|
||||
round1_bank_loan = #{round1BankLoan,jdbcType=DECIMAL},
|
||||
remaining_own_funds = #{remainingOwnFunds,jdbcType=DECIMAL},
|
||||
remaining_earnings_subordinated_lp = #{remainingEarningsSubordinatedLp,jdbcType=DECIMAL},
|
||||
remaining_earnings_preferred_lp = #{remainingEarningsPreferredLp,jdbcType=DECIMAL}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
Loading…
Reference in New Issue