|
|
|
@ -1,258 +1,297 @@
|
|
|
|
|
<?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.forex.trading_trading.mappers.MemberMapper">
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.sztzjy.forex.trading_trading.entity.Member">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
This element was generated on Wed Jul 19 15:55:18 CST 2023.
|
|
|
|
|
-->
|
|
|
|
|
<id column="member_id" jdbcType="VARCHAR" property="memberId" />
|
|
|
|
|
<result column="training_id" jdbcType="VARCHAR" property="trainingId" />
|
|
|
|
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
|
|
|
<result column="student_number" jdbcType="VARCHAR" property="studentNumber" />
|
|
|
|
|
<result column="major" jdbcType="VARCHAR" property="major" />
|
|
|
|
|
<result column="class_grade" jdbcType="VARCHAR" property="classGrade" />
|
|
|
|
|
<result column="stu_rank" jdbcType="INTEGER" property="stuRank" />
|
|
|
|
|
<result column="initial_capital" jdbcType="DOUBLE" property="initialCapital" />
|
|
|
|
|
<result column="total_assets" jdbcType="DOUBLE" property="totalAssets" />
|
|
|
|
|
<result column="net_value" jdbcType="DOUBLE" property="netValue" />
|
|
|
|
|
<result column="margin_used" jdbcType="DOUBLE" property="marginUsed" />
|
|
|
|
|
<result column="available_funds" jdbcType="DOUBLE" property="availableFunds" />
|
|
|
|
|
<result column="margin_level" jdbcType="DOUBLE" property="marginLevel" />
|
|
|
|
|
<result column="position_profit_loss" jdbcType="DOUBLE" property="positionProfitLoss" />
|
|
|
|
|
<result column="cumulative_profit_loss" jdbcType="DOUBLE" property="cumulativeProfitLoss" />
|
|
|
|
|
<result column="yield" jdbcType="DOUBLE" property="yield" />
|
|
|
|
|
<result column="opening_trades" jdbcType="INTEGER" property="openingTrades" />
|
|
|
|
|
<result column="closing_trades" jdbcType="INTEGER" property="closingTrades" />
|
|
|
|
|
<result column="school_id" jdbcType="INTEGER" property="schoolId" />
|
|
|
|
|
<result column="create_school" jdbcType="VARCHAR" property="createSchool" />
|
|
|
|
|
<result column="training_name" jdbcType="VARCHAR" property="trainingName" />
|
|
|
|
|
<result column="report_score" jdbcType="INTEGER" property="reportScore" />
|
|
|
|
|
<result column="class_id" jdbcType="INTEGER" property="classId" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<sql id="Example_Where_Clause">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
This element was generated on Wed Jul 19 15:55:18 CST 2023.
|
|
|
|
|
-->
|
|
|
|
|
<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>
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.sztzjy.forex.trading_trading.entity.Member">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
This element was generated on Wed Jul 19 15:55:18 CST 2023.
|
|
|
|
|
-->
|
|
|
|
|
<id column="member_id" jdbcType="VARCHAR" property="memberId"/>
|
|
|
|
|
<result column="training_id" jdbcType="VARCHAR" property="trainingId"/>
|
|
|
|
|
<result column="name" jdbcType="VARCHAR" property="name"/>
|
|
|
|
|
<result column="student_number" jdbcType="VARCHAR" property="studentNumber"/>
|
|
|
|
|
<result column="major" jdbcType="VARCHAR" property="major"/>
|
|
|
|
|
<result column="class_grade" jdbcType="VARCHAR" property="classGrade"/>
|
|
|
|
|
<result column="stu_rank" jdbcType="INTEGER" property="stuRank"/>
|
|
|
|
|
<result column="initial_capital" jdbcType="DOUBLE" property="initialCapital"/>
|
|
|
|
|
<result column="total_assets" jdbcType="DOUBLE" property="totalAssets"/>
|
|
|
|
|
<result column="net_value" jdbcType="DOUBLE" property="netValue"/>
|
|
|
|
|
<result column="margin_used" jdbcType="DOUBLE" property="marginUsed"/>
|
|
|
|
|
<result column="available_funds" jdbcType="DOUBLE" property="availableFunds"/>
|
|
|
|
|
<result column="margin_level" jdbcType="DOUBLE" property="marginLevel"/>
|
|
|
|
|
<result column="position_profit_loss" jdbcType="DOUBLE" property="positionProfitLoss"/>
|
|
|
|
|
<result column="cumulative_profit_loss" jdbcType="DOUBLE" property="cumulativeProfitLoss"/>
|
|
|
|
|
<result column="yield" jdbcType="DOUBLE" property="yield"/>
|
|
|
|
|
<result column="opening_trades" jdbcType="INTEGER" property="openingTrades"/>
|
|
|
|
|
<result column="closing_trades" jdbcType="INTEGER" property="closingTrades"/>
|
|
|
|
|
<result column="school_id" jdbcType="INTEGER" property="schoolId"/>
|
|
|
|
|
<result column="create_school" jdbcType="VARCHAR" property="createSchool"/>
|
|
|
|
|
<result column="training_name" jdbcType="VARCHAR" property="trainingName"/>
|
|
|
|
|
<result column="report_score" jdbcType="INTEGER" property="reportScore"/>
|
|
|
|
|
<result column="class_id" jdbcType="INTEGER" property="classId"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
<sql id="Example_Where_Clause">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
This element was generated on Wed Jul 19 15:55:18 CST 2023.
|
|
|
|
|
-->
|
|
|
|
|
<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>
|
|
|
|
|
</trim>
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</where>
|
|
|
|
|
</sql>
|
|
|
|
|
</where>
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
This element was generated on Wed Jul 19 15:55:18 CST 2023.
|
|
|
|
|
-->
|
|
|
|
|
member_id, training_id, name, student_number, major, class_grade, stu_rank, initial_capital,
|
|
|
|
|
total_assets, net_value, margin_used, available_funds, margin_level, position_profit_loss,
|
|
|
|
|
cumulative_profit_loss, yield, opening_trades, closing_trades, school_id, create_school,
|
|
|
|
|
training_name, report_score, class_id
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectMemberByNameAndNumber" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
SELECT
|
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
FROM sys_member
|
|
|
|
|
<where>
|
|
|
|
|
<if test="schoolId != null">
|
|
|
|
|
AND school_id = #{schoolId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="name != null and name != ''">
|
|
|
|
|
and (name like "%"#{name}"%" or student_number like "%"#{name}"%")
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
ORDER BY yield DESC
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectMembers" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
SELECT
|
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
FROM sys_member
|
|
|
|
|
<where>
|
|
|
|
|
<if test="schoolId != null and schoolId != ''">
|
|
|
|
|
AND school_id = #{schoolId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="classGrade != null and classGrade!= ''">
|
|
|
|
|
AND class_grade = #{classGrade}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="trainingId != null and trainingId!= ''">
|
|
|
|
|
AND training_id = #{trainingId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="name != null and name != ''">
|
|
|
|
|
and (name like "%"#{name}"%" or student_number like "%"#{name}"%")
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
ORDER BY yield DESC
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
This element was generated on Wed Jul 19 15:55:18 CST 2023.
|
|
|
|
|
-->
|
|
|
|
|
member_id, training_id, name, student_number, major, class_grade, stu_rank, initial_capital,
|
|
|
|
|
total_assets, net_value, margin_used, available_funds, margin_level, position_profit_loss,
|
|
|
|
|
cumulative_profit_loss, yield, opening_trades, closing_trades, school_id, create_school,
|
|
|
|
|
training_name, report_score, class_id
|
|
|
|
|
</sql>
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
This element was generated on Wed Jul 19 15:55:18 CST 2023.
|
|
|
|
|
-->
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
from sys_member
|
|
|
|
|
where member_id = #{memberId,jdbcType=VARCHAR}
|
|
|
|
|
</select>
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
This element was generated on Wed Jul 19 15:55:18 CST 2023.
|
|
|
|
|
-->
|
|
|
|
|
delete from sys_member
|
|
|
|
|
where member_id = #{memberId,jdbcType=VARCHAR}
|
|
|
|
|
</delete>
|
|
|
|
|
<delete id="deleteByExample" parameterType="com.sztzjy.forex.trading_trading.entity.MemberExample">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
This element was generated on Wed Jul 19 15:55:18 CST 2023.
|
|
|
|
|
-->
|
|
|
|
|
delete from sys_member
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
</delete>
|
|
|
|
|
<insert id="insert" parameterType="com.sztzjy.forex.trading_trading.entity.Member">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
This element was generated on Wed Jul 19 15:55:18 CST 2023.
|
|
|
|
|
-->
|
|
|
|
|
insert into sys_member (member_id, training_id, name,
|
|
|
|
|
student_number, major, class_grade,
|
|
|
|
|
stu_rank, initial_capital, total_assets,
|
|
|
|
|
net_value, margin_used, available_funds,
|
|
|
|
|
margin_level, position_profit_loss, cumulative_profit_loss,
|
|
|
|
|
yield, opening_trades, closing_trades,
|
|
|
|
|
school_id, create_school, training_name,
|
|
|
|
|
report_score, class_id)
|
|
|
|
|
values (#{memberId,jdbcType=VARCHAR}, #{trainingId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
|
|
|
|
#{studentNumber,jdbcType=VARCHAR}, #{major,jdbcType=VARCHAR}, #{classGrade,jdbcType=VARCHAR},
|
|
|
|
|
#{stuRank,jdbcType=INTEGER}, #{initialCapital,jdbcType=DOUBLE}, #{totalAssets,jdbcType=DOUBLE},
|
|
|
|
|
#{netValue,jdbcType=DOUBLE}, #{marginUsed,jdbcType=DOUBLE}, #{availableFunds,jdbcType=DOUBLE},
|
|
|
|
|
#{marginLevel,jdbcType=DOUBLE}, #{positionProfitLoss,jdbcType=DOUBLE}, #{cumulativeProfitLoss,jdbcType=DOUBLE},
|
|
|
|
|
#{yield,jdbcType=DOUBLE}, #{openingTrades,jdbcType=INTEGER}, #{closingTrades,jdbcType=INTEGER},
|
|
|
|
|
#{schoolId,jdbcType=INTEGER}, #{createSchool,jdbcType=VARCHAR}, #{trainingName,jdbcType=VARCHAR},
|
|
|
|
|
#{reportScore,jdbcType=INTEGER}, #{classId,jdbcType=INTEGER})
|
|
|
|
|
</insert>
|
|
|
|
|
<select id="countByExample" parameterType="com.sztzjy.forex.trading_trading.entity.MemberExample" resultType="java.lang.Long">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
This element was generated on Wed Jul 19 15:55:18 CST 2023.
|
|
|
|
|
-->
|
|
|
|
|
select count(*) from sys_member
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
This element was generated on Wed Jul 19 15:55:18 CST 2023.
|
|
|
|
|
-->
|
|
|
|
|
update sys_member
|
|
|
|
|
set member_id = #{record.memberId,jdbcType=VARCHAR},
|
|
|
|
|
training_id = #{record.trainingId,jdbcType=VARCHAR},
|
|
|
|
|
name = #{record.name,jdbcType=VARCHAR},
|
|
|
|
|
student_number = #{record.studentNumber,jdbcType=VARCHAR},
|
|
|
|
|
major = #{record.major,jdbcType=VARCHAR},
|
|
|
|
|
class_grade = #{record.classGrade,jdbcType=VARCHAR},
|
|
|
|
|
stu_rank = #{record.stuRank,jdbcType=INTEGER},
|
|
|
|
|
initial_capital = #{record.initialCapital,jdbcType=DOUBLE},
|
|
|
|
|
total_assets = #{record.totalAssets,jdbcType=DOUBLE},
|
|
|
|
|
net_value = #{record.netValue,jdbcType=DOUBLE},
|
|
|
|
|
margin_used = #{record.marginUsed,jdbcType=DOUBLE},
|
|
|
|
|
available_funds = #{record.availableFunds,jdbcType=DOUBLE},
|
|
|
|
|
margin_level = #{record.marginLevel,jdbcType=DOUBLE},
|
|
|
|
|
position_profit_loss = #{record.positionProfitLoss,jdbcType=DOUBLE},
|
|
|
|
|
cumulative_profit_loss = #{record.cumulativeProfitLoss,jdbcType=DOUBLE},
|
|
|
|
|
yield = #{record.yield,jdbcType=DOUBLE},
|
|
|
|
|
opening_trades = #{record.openingTrades,jdbcType=INTEGER},
|
|
|
|
|
closing_trades = #{record.closingTrades,jdbcType=INTEGER},
|
|
|
|
|
school_id = #{record.schoolId,jdbcType=INTEGER},
|
|
|
|
|
create_school = #{record.createSchool,jdbcType=VARCHAR},
|
|
|
|
|
training_name = #{record.trainingName,jdbcType=VARCHAR},
|
|
|
|
|
report_score = #{record.reportScore,jdbcType=INTEGER},
|
|
|
|
|
class_id = #{record.classId,jdbcType=INTEGER}
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.forex.trading_trading.entity.Member">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
This element was generated on Wed Jul 19 15:55:18 CST 2023.
|
|
|
|
|
-->
|
|
|
|
|
update sys_member
|
|
|
|
|
<set>
|
|
|
|
|
<if test="trainingId != null">
|
|
|
|
|
training_id = #{trainingId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="name != null">
|
|
|
|
|
name = #{name,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="studentNumber != null">
|
|
|
|
|
student_number = #{studentNumber,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="major != null">
|
|
|
|
|
major = #{major,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="classGrade != null">
|
|
|
|
|
class_grade = #{classGrade,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="stuRank != null">
|
|
|
|
|
stu_rank = #{stuRank,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="initialCapital != null">
|
|
|
|
|
initial_capital = #{initialCapital,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="totalAssets != null">
|
|
|
|
|
total_assets = #{totalAssets,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="netValue != null">
|
|
|
|
|
net_value = #{netValue,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="marginUsed != null">
|
|
|
|
|
margin_used = #{marginUsed,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="availableFunds != null">
|
|
|
|
|
available_funds = #{availableFunds,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="marginLevel != null">
|
|
|
|
|
margin_level = #{marginLevel,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="positionProfitLoss != null">
|
|
|
|
|
position_profit_loss = #{positionProfitLoss,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cumulativeProfitLoss != null">
|
|
|
|
|
cumulative_profit_loss = #{cumulativeProfitLoss,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="yield != null">
|
|
|
|
|
yield = #{yield,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="openingTrades != null">
|
|
|
|
|
opening_trades = #{openingTrades,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="closingTrades != null">
|
|
|
|
|
closing_trades = #{closingTrades,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="schoolId != null">
|
|
|
|
|
school_id = #{schoolId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createSchool != null">
|
|
|
|
|
create_school = #{createSchool,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="trainingName != null">
|
|
|
|
|
training_name = #{trainingName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="reportScore != null">
|
|
|
|
|
report_score = #{reportScore,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="classId != null">
|
|
|
|
|
class_id = #{classId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
where member_id = #{memberId,jdbcType=VARCHAR}
|
|
|
|
|
</update>
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
This element was generated on Wed Jul 19 15:55:18 CST 2023.
|
|
|
|
|
-->
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
from sys_member
|
|
|
|
|
where member_id = #{memberId,jdbcType=VARCHAR}
|
|
|
|
|
</select>
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
This element was generated on Wed Jul 19 15:55:18 CST 2023.
|
|
|
|
|
-->
|
|
|
|
|
delete from sys_member
|
|
|
|
|
where member_id = #{memberId,jdbcType=VARCHAR}
|
|
|
|
|
</delete>
|
|
|
|
|
<delete id="deleteByExample" parameterType="com.sztzjy.forex.trading_trading.entity.MemberExample">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
This element was generated on Wed Jul 19 15:55:18 CST 2023.
|
|
|
|
|
-->
|
|
|
|
|
delete from sys_member
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause"/>
|
|
|
|
|
</if>
|
|
|
|
|
</delete>
|
|
|
|
|
<insert id="insert" parameterType="com.sztzjy.forex.trading_trading.entity.Member">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
This element was generated on Wed Jul 19 15:55:18 CST 2023.
|
|
|
|
|
-->
|
|
|
|
|
insert into sys_member (member_id, training_id, name,
|
|
|
|
|
student_number, major, class_grade,
|
|
|
|
|
stu_rank, initial_capital, total_assets,
|
|
|
|
|
net_value, margin_used, available_funds,
|
|
|
|
|
margin_level, position_profit_loss, cumulative_profit_loss,
|
|
|
|
|
yield, opening_trades, closing_trades,
|
|
|
|
|
school_id, create_school, training_name,
|
|
|
|
|
report_score, class_id)
|
|
|
|
|
values (#{memberId,jdbcType=VARCHAR}, #{trainingId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
|
|
|
|
#{studentNumber,jdbcType=VARCHAR}, #{major,jdbcType=VARCHAR}, #{classGrade,jdbcType=VARCHAR},
|
|
|
|
|
#{stuRank,jdbcType=INTEGER}, #{initialCapital,jdbcType=DOUBLE}, #{totalAssets,jdbcType=DOUBLE},
|
|
|
|
|
#{netValue,jdbcType=DOUBLE}, #{marginUsed,jdbcType=DOUBLE}, #{availableFunds,jdbcType=DOUBLE},
|
|
|
|
|
#{marginLevel,jdbcType=DOUBLE}, #{positionProfitLoss,jdbcType=DOUBLE}, #{cumulativeProfitLoss,jdbcType=DOUBLE},
|
|
|
|
|
#{yield,jdbcType=DOUBLE}, #{openingTrades,jdbcType=INTEGER}, #{closingTrades,jdbcType=INTEGER},
|
|
|
|
|
#{schoolId,jdbcType=INTEGER}, #{createSchool,jdbcType=VARCHAR}, #{trainingName,jdbcType=VARCHAR},
|
|
|
|
|
#{reportScore,jdbcType=INTEGER}, #{classId,jdbcType=INTEGER})
|
|
|
|
|
</insert>
|
|
|
|
|
<select id="countByExample" parameterType="com.sztzjy.forex.trading_trading.entity.MemberExample"
|
|
|
|
|
resultType="java.lang.Long">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
This element was generated on Wed Jul 19 15:55:18 CST 2023.
|
|
|
|
|
-->
|
|
|
|
|
select count(*) from sys_member
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause"/>
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
This element was generated on Wed Jul 19 15:55:18 CST 2023.
|
|
|
|
|
-->
|
|
|
|
|
update sys_member
|
|
|
|
|
set member_id = #{record.memberId,jdbcType=VARCHAR},
|
|
|
|
|
training_id = #{record.trainingId,jdbcType=VARCHAR},
|
|
|
|
|
name = #{record.name,jdbcType=VARCHAR},
|
|
|
|
|
student_number = #{record.studentNumber,jdbcType=VARCHAR},
|
|
|
|
|
major = #{record.major,jdbcType=VARCHAR},
|
|
|
|
|
class_grade = #{record.classGrade,jdbcType=VARCHAR},
|
|
|
|
|
stu_rank = #{record.stuRank,jdbcType=INTEGER},
|
|
|
|
|
initial_capital = #{record.initialCapital,jdbcType=DOUBLE},
|
|
|
|
|
total_assets = #{record.totalAssets,jdbcType=DOUBLE},
|
|
|
|
|
net_value = #{record.netValue,jdbcType=DOUBLE},
|
|
|
|
|
margin_used = #{record.marginUsed,jdbcType=DOUBLE},
|
|
|
|
|
available_funds = #{record.availableFunds,jdbcType=DOUBLE},
|
|
|
|
|
margin_level = #{record.marginLevel,jdbcType=DOUBLE},
|
|
|
|
|
position_profit_loss = #{record.positionProfitLoss,jdbcType=DOUBLE},
|
|
|
|
|
cumulative_profit_loss = #{record.cumulativeProfitLoss,jdbcType=DOUBLE},
|
|
|
|
|
yield = #{record.yield,jdbcType=DOUBLE},
|
|
|
|
|
opening_trades = #{record.openingTrades,jdbcType=INTEGER},
|
|
|
|
|
closing_trades = #{record.closingTrades,jdbcType=INTEGER},
|
|
|
|
|
school_id = #{record.schoolId,jdbcType=INTEGER},
|
|
|
|
|
create_school = #{record.createSchool,jdbcType=VARCHAR},
|
|
|
|
|
training_name = #{record.trainingName,jdbcType=VARCHAR},
|
|
|
|
|
report_score = #{record.reportScore,jdbcType=INTEGER},
|
|
|
|
|
class_id = #{record.classId,jdbcType=INTEGER}
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause"/>
|
|
|
|
|
</if>
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.forex.trading_trading.entity.Member">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
This element was generated on Wed Jul 19 15:55:18 CST 2023.
|
|
|
|
|
-->
|
|
|
|
|
update sys_member
|
|
|
|
|
<set>
|
|
|
|
|
<if test="trainingId != null">
|
|
|
|
|
training_id = #{trainingId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="name != null">
|
|
|
|
|
name = #{name,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="studentNumber != null">
|
|
|
|
|
student_number = #{studentNumber,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="major != null">
|
|
|
|
|
major = #{major,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="classGrade != null">
|
|
|
|
|
class_grade = #{classGrade,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="stuRank != null">
|
|
|
|
|
stu_rank = #{stuRank,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="initialCapital != null">
|
|
|
|
|
initial_capital = #{initialCapital,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="totalAssets != null">
|
|
|
|
|
total_assets = #{totalAssets,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="netValue != null">
|
|
|
|
|
net_value = #{netValue,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="marginUsed != null">
|
|
|
|
|
margin_used = #{marginUsed,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="availableFunds != null">
|
|
|
|
|
available_funds = #{availableFunds,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="marginLevel != null">
|
|
|
|
|
margin_level = #{marginLevel,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="positionProfitLoss != null">
|
|
|
|
|
position_profit_loss = #{positionProfitLoss,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cumulativeProfitLoss != null">
|
|
|
|
|
cumulative_profit_loss = #{cumulativeProfitLoss,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="yield != null">
|
|
|
|
|
yield = #{yield,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="openingTrades != null">
|
|
|
|
|
opening_trades = #{openingTrades,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="closingTrades != null">
|
|
|
|
|
closing_trades = #{closingTrades,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="schoolId != null">
|
|
|
|
|
school_id = #{schoolId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createSchool != null">
|
|
|
|
|
create_school = #{createSchool,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="trainingName != null">
|
|
|
|
|
training_name = #{trainingName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="reportScore != null">
|
|
|
|
|
report_score = #{reportScore,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="classId != null">
|
|
|
|
|
class_id = #{classId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
where member_id = #{memberId,jdbcType=VARCHAR}
|
|
|
|
|
</update>
|
|
|
|
|
<resultMap id="BaseResultMapForMemberVO" type="com.sztzjy.forex.trading_trading.dto.MemberVO">
|
|
|
|
|
<id column="member_id" jdbcType="VARCHAR" property="memberId"/>
|
|
|
|
|
<result column="training_id" jdbcType="VARCHAR" property="trainingId"/>
|
|
|
|
@ -266,8 +305,6 @@
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="Update_By_Example_Where_Clause">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|