Merge remote-tracking branch 'origin/master'
commit
602b8a2d0b
@ -0,0 +1,60 @@
|
||||
package com.sztzjy.forex.trading_trading.dto;
|
||||
|
||||
import com.sztzjy.forex.trading_trading.entity.TakeStash;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Getter
|
||||
@Setter
|
||||
public class TakeStashVO {
|
||||
|
||||
public TakeStashVO() {
|
||||
// 无参数的默认构造函数
|
||||
}
|
||||
|
||||
public TakeStashVO(TakeStash takeStash){
|
||||
this.stashId = takeStash.getStashId();
|
||||
this.memberId = takeStash.getMemberId();
|
||||
this.trainingId = takeStash.getTrainingId();
|
||||
this.tradingCode = takeStash.getTradingCode();
|
||||
this.orderNumber = takeStash.getOrderNumber();
|
||||
this.buySellType = takeStash.getBuySellType();
|
||||
this.volumeTransaction = takeStash.getVolumeTransaction();
|
||||
this.priceTransaction = takeStash.getPriceTransaction();
|
||||
this.stopLoss = takeStash.getStopLoss();
|
||||
this.stopWin = takeStash.getStopWin();
|
||||
this.timeTransaction = takeStash.getTimeTransaction();
|
||||
this.status = takeStash.getStatus();
|
||||
}
|
||||
private String stashId;
|
||||
|
||||
private String memberId;
|
||||
|
||||
private String trainingId;
|
||||
|
||||
private String tradingCode;
|
||||
|
||||
private String orderNumber;
|
||||
|
||||
private String buySellType;
|
||||
|
||||
private Double volumeTransaction;
|
||||
|
||||
private Double priceTransaction;
|
||||
|
||||
private Double stopLoss;
|
||||
|
||||
private Double stopWin;
|
||||
|
||||
private Date timeTransaction;
|
||||
|
||||
private Integer status;
|
||||
|
||||
private Double currentPrice;
|
||||
|
||||
private Double profitAndLoss;
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.sztzjy.forex.trading_trading.task;
|
||||
|
||||
import com.sztzjy.forex.trading_trading.common.mql5API.Mql5API;
|
||||
import com.sztzjy.forex.trading_trading.entity.mql5Entity.ForexData;
|
||||
import com.sztzjy.forex.trading_trading.util.RedisUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
@EnableScheduling
|
||||
public class redisTask {
|
||||
@Autowired
|
||||
RedisUtil redisUtil;
|
||||
|
||||
@Scheduled(fixedDelay = 1278000) // 每隔1278秒执行一次
|
||||
public void doTask() {
|
||||
System.out.println("!!!!");
|
||||
Mql5API mql5API = new Mql5API();
|
||||
List<ForexData> marketQuotation = mql5API.getMarketQuotation();
|
||||
redisUtil.set("ForexDateList", marketQuotation);
|
||||
}
|
||||
|
||||
}
|
@ -1,398 +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.forex.trading_trading.TrainingMapper">
|
||||
<resultMap id="BaseResultMap" type="com.sztzjy.forex.trading_trading.Training">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Fri Jun 30 14:37:06 CST 2023.
|
||||
-->
|
||||
<id column="training_id" jdbcType="VARCHAR" property="trainingId" />
|
||||
<result column="people_count" jdbcType="INTEGER" property="peopleCount" />
|
||||
<result column="start_time" jdbcType="VARCHAR" property="startTime" />
|
||||
<result column="end_time" jdbcType="VARCHAR" property="endTime" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="creator_id" jdbcType="INTEGER" property="creatorId" />
|
||||
<result column="create_school" jdbcType="VARCHAR" property="createSchool" />
|
||||
<result column="training_name" jdbcType="VARCHAR" property="trainingName" />
|
||||
<result column="creator_name" jdbcType="VARCHAR" property="creatorName" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="school_id" jdbcType="INTEGER" property="schoolId" />
|
||||
</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 Fri Jun 30 14:37:06 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>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Fri Jun 30 14:37:06 CST 2023.
|
||||
-->
|
||||
<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">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Fri Jun 30 14:37:06 CST 2023.
|
||||
-->
|
||||
training_id, people_count, start_time, end_time, status, creator_id, create_school,
|
||||
training_name, creator_name, create_time, update_time, school_id
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.sztzjy.forex.trading_trading.TrainingExample" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Fri Jun 30 14:37:06 CST 2023.
|
||||
-->
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from sys_training
|
||||
<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">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Fri Jun 30 14:37:06 CST 2023.
|
||||
-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from sys_training
|
||||
where training_id = #{trainingId,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 Fri Jun 30 14:37:06 CST 2023.
|
||||
-->
|
||||
delete from sys_training
|
||||
where training_id = #{trainingId,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.sztzjy.forex.trading_trading.TrainingExample">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Fri Jun 30 14:37:06 CST 2023.
|
||||
-->
|
||||
delete from sys_training
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sztzjy.forex.trading_trading.Training">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Fri Jun 30 14:37:06 CST 2023.
|
||||
-->
|
||||
insert into sys_training (training_id, people_count, start_time,
|
||||
end_time, status, creator_id,
|
||||
create_school, training_name, creator_name,
|
||||
create_time, update_time, school_id
|
||||
)
|
||||
values (#{trainingId,jdbcType=VARCHAR}, #{peopleCount,jdbcType=INTEGER}, #{startTime,jdbcType=VARCHAR},
|
||||
#{endTime,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{creatorId,jdbcType=INTEGER},
|
||||
#{createSchool,jdbcType=VARCHAR}, #{trainingName,jdbcType=VARCHAR}, #{creatorName,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{schoolId,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sztzjy.forex.trading_trading.Training">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Fri Jun 30 14:37:06 CST 2023.
|
||||
-->
|
||||
insert into sys_training
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="trainingId != null">
|
||||
training_id,
|
||||
</if>
|
||||
<if test="peopleCount != null">
|
||||
people_count,
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time,
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
end_time,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createSchool != null">
|
||||
create_school,
|
||||
</if>
|
||||
<if test="trainingName != null">
|
||||
training_name,
|
||||
</if>
|
||||
<if test="creatorName != null">
|
||||
creator_name,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="schoolId != null">
|
||||
school_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="trainingId != null">
|
||||
#{trainingId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="peopleCount != null">
|
||||
#{peopleCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
#{startTime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
#{endTime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createSchool != null">
|
||||
#{createSchool,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="trainingName != null">
|
||||
#{trainingName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorName != null">
|
||||
#{creatorName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="schoolId != null">
|
||||
#{schoolId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.sztzjy.forex.trading_trading.TrainingExample" resultType="java.lang.Long">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Fri Jun 30 14:37:06 CST 2023.
|
||||
-->
|
||||
select count(*) from sys_training
|
||||
<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 Fri Jun 30 14:37:06 CST 2023.
|
||||
-->
|
||||
update sys_training
|
||||
<set>
|
||||
<if test="record.trainingId != null">
|
||||
training_id = #{record.trainingId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.peopleCount != null">
|
||||
people_count = #{record.peopleCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.startTime != null">
|
||||
start_time = #{record.startTime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.endTime != null">
|
||||
end_time = #{record.endTime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
status = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.createSchool != null">
|
||||
create_school = #{record.createSchool,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.trainingName != null">
|
||||
training_name = #{record.trainingName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorName != null">
|
||||
creator_name = #{record.creatorName,jdbcType=VARCHAR},
|
||||
</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>
|
||||
<if test="record.schoolId != null">
|
||||
school_id = #{record.schoolId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Fri Jun 30 14:37:06 CST 2023.
|
||||
-->
|
||||
update sys_training
|
||||
set training_id = #{record.trainingId,jdbcType=VARCHAR},
|
||||
people_count = #{record.peopleCount,jdbcType=INTEGER},
|
||||
start_time = #{record.startTime,jdbcType=VARCHAR},
|
||||
end_time = #{record.endTime,jdbcType=VARCHAR},
|
||||
status = #{record.status,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=INTEGER},
|
||||
create_school = #{record.createSchool,jdbcType=VARCHAR},
|
||||
training_name = #{record.trainingName,jdbcType=VARCHAR},
|
||||
creator_name = #{record.creatorName,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
school_id = #{record.schoolId,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.forex.trading_trading.Training">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Fri Jun 30 14:37:06 CST 2023.
|
||||
-->
|
||||
update sys_training
|
||||
<set>
|
||||
<if test="peopleCount != null">
|
||||
people_count = #{peopleCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time = #{startTime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
end_time = #{endTime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,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="creatorName != null">
|
||||
creator_name = #{creatorName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="schoolId != null">
|
||||
school_id = #{schoolId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where training_id = #{trainingId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.sztzjy.forex.trading_trading.Training">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Fri Jun 30 14:37:06 CST 2023.
|
||||
-->
|
||||
update sys_training
|
||||
set people_count = #{peopleCount,jdbcType=INTEGER},
|
||||
start_time = #{startTime,jdbcType=VARCHAR},
|
||||
end_time = #{endTime,jdbcType=VARCHAR},
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=INTEGER},
|
||||
create_school = #{createSchool,jdbcType=VARCHAR},
|
||||
training_name = #{trainingName,jdbcType=VARCHAR},
|
||||
creator_name = #{creatorName,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
school_id = #{schoolId,jdbcType=INTEGER}
|
||||
where training_id = #{trainingId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
Loading…
Reference in New Issue