外汇行情数据方式修改为每2分钟调用远程接口获取真实接口,每15秒将获取到的真实外汇数据生成模拟外汇数据,模拟外汇数据生成规则参考代码
parent
602b8a2d0b
commit
6cca79845d
@ -0,0 +1,607 @@
|
||||
package com.sztzjy.forex.trading_trading.entity;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.sztzjy.forex.trading_trading.entity.mql5Entity.ForexData;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class ForexMarketData {
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column sys_forex_market_data.id
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
private String id = IdUtil.simpleUUID();
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column sys_forex_market_data.buy_pic
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
private Double buyPic;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column sys_forex_market_data.close_pri
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
private Double closePri;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column sys_forex_market_data.code
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column sys_forex_market_data.color
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
private String color;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column sys_forex_market_data.currency
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
private String currency;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column sys_forex_market_data.data_time
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
private Date dataTime;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column sys_forex_market_data.date
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
private String date;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column sys_forex_market_data.high_pic
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
private String highPic;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column sys_forex_market_data.low_pic
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
private String lowPic;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column sys_forex_market_data.open_pri
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
private String openPri;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column sys_forex_market_data.range
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
private String range;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column sys_forex_market_data.sell_pic
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
private String sellPic;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column sys_forex_market_data.yes_pic
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
private String yesPic;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column sys_forex_market_data.diff_amo
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
private Double diffAmo;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column sys_forex_market_data.diff_per
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
private Double diffPer;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column sys_forex_market_data.is_real
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
|
||||
@ApiModelProperty("该字段用于标识数据是否是真实的外汇数据")
|
||||
private Boolean isReal;
|
||||
|
||||
private String batchId;
|
||||
|
||||
|
||||
public String getBatchId() {
|
||||
return batchId;
|
||||
}
|
||||
|
||||
public void setBatchId(String batchId) {
|
||||
this.batchId = batchId;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column sys_forex_market_data.id
|
||||
*
|
||||
* @return the value of sys_forex_market_data.id
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column sys_forex_market_data.id
|
||||
*
|
||||
* @param id the value for sys_forex_market_data.id
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public void setId(String id) {
|
||||
this.id = id == null ? null : id.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column sys_forex_market_data.buy_pic
|
||||
*
|
||||
* @return the value of sys_forex_market_data.buy_pic
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public Double getBuyPic() {
|
||||
return buyPic;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column sys_forex_market_data.buy_pic
|
||||
*
|
||||
* @param buyPic the value for sys_forex_market_data.buy_pic
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public void setBuyPic(Double buyPic) {
|
||||
this.buyPic = buyPic;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column sys_forex_market_data.close_pri
|
||||
*
|
||||
* @return the value of sys_forex_market_data.close_pri
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public Double getClosePri() {
|
||||
return closePri;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column sys_forex_market_data.close_pri
|
||||
*
|
||||
* @param closePri the value for sys_forex_market_data.close_pri
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public void setClosePri(Double closePri) {
|
||||
this.closePri = closePri;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column sys_forex_market_data.code
|
||||
*
|
||||
* @return the value of sys_forex_market_data.code
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column sys_forex_market_data.code
|
||||
*
|
||||
* @param code the value for sys_forex_market_data.code
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public void setCode(String code) {
|
||||
this.code = code == null ? null : code.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column sys_forex_market_data.color
|
||||
*
|
||||
* @return the value of sys_forex_market_data.color
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column sys_forex_market_data.color
|
||||
*
|
||||
* @param color the value for sys_forex_market_data.color
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public void setColor(String color) {
|
||||
this.color = color == null ? null : color.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column sys_forex_market_data.currency
|
||||
*
|
||||
* @return the value of sys_forex_market_data.currency
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public String getCurrency() {
|
||||
return currency;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column sys_forex_market_data.currency
|
||||
*
|
||||
* @param currency the value for sys_forex_market_data.currency
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public void setCurrency(String currency) {
|
||||
this.currency = currency == null ? null : currency.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column sys_forex_market_data.data_time
|
||||
*
|
||||
* @return the value of sys_forex_market_data.data_time
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public Date getDataTime() {
|
||||
return dataTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column sys_forex_market_data.data_time
|
||||
*
|
||||
* @param dataTime the value for sys_forex_market_data.data_time
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public void setDataTime(Date dataTime) {
|
||||
this.dataTime = dataTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column sys_forex_market_data.date
|
||||
*
|
||||
* @return the value of sys_forex_market_data.date
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public String getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column sys_forex_market_data.date
|
||||
*
|
||||
* @param date the value for sys_forex_market_data.date
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public void setDate(String date) {
|
||||
this.date = date == null ? null : date.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column sys_forex_market_data.high_pic
|
||||
*
|
||||
* @return the value of sys_forex_market_data.high_pic
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public String getHighPic() {
|
||||
return highPic;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column sys_forex_market_data.high_pic
|
||||
*
|
||||
* @param highPic the value for sys_forex_market_data.high_pic
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public void setHighPic(String highPic) {
|
||||
this.highPic = highPic == null ? null : highPic.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column sys_forex_market_data.low_pic
|
||||
*
|
||||
* @return the value of sys_forex_market_data.low_pic
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public String getLowPic() {
|
||||
return lowPic;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column sys_forex_market_data.low_pic
|
||||
*
|
||||
* @param lowPic the value for sys_forex_market_data.low_pic
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public void setLowPic(String lowPic) {
|
||||
this.lowPic = lowPic == null ? null : lowPic.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column sys_forex_market_data.open_pri
|
||||
*
|
||||
* @return the value of sys_forex_market_data.open_pri
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public String getOpenPri() {
|
||||
return openPri;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column sys_forex_market_data.open_pri
|
||||
*
|
||||
* @param openPri the value for sys_forex_market_data.open_pri
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public void setOpenPri(String openPri) {
|
||||
this.openPri = openPri == null ? null : openPri.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column sys_forex_market_data.range
|
||||
*
|
||||
* @return the value of sys_forex_market_data.range
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public String getRange() {
|
||||
return range;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column sys_forex_market_data.range
|
||||
*
|
||||
* @param range the value for sys_forex_market_data.range
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public void setRange(String range) {
|
||||
this.range = range == null ? null : range.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column sys_forex_market_data.sell_pic
|
||||
*
|
||||
* @return the value of sys_forex_market_data.sell_pic
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public String getSellPic() {
|
||||
return sellPic;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column sys_forex_market_data.sell_pic
|
||||
*
|
||||
* @param sellPic the value for sys_forex_market_data.sell_pic
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public void setSellPic(String sellPic) {
|
||||
this.sellPic = sellPic == null ? null : sellPic.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column sys_forex_market_data.yes_pic
|
||||
*
|
||||
* @return the value of sys_forex_market_data.yes_pic
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public String getYesPic() {
|
||||
return yesPic;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column sys_forex_market_data.yes_pic
|
||||
*
|
||||
* @param yesPic the value for sys_forex_market_data.yes_pic
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public void setYesPic(String yesPic) {
|
||||
this.yesPic = yesPic == null ? null : yesPic.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column sys_forex_market_data.diff_amo
|
||||
*
|
||||
* @return the value of sys_forex_market_data.diff_amo
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public Double getDiffAmo() {
|
||||
return diffAmo;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column sys_forex_market_data.diff_amo
|
||||
*
|
||||
* @param diffAmo the value for sys_forex_market_data.diff_amo
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public void setDiffAmo(Double diffAmo) {
|
||||
this.diffAmo = diffAmo;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column sys_forex_market_data.diff_per
|
||||
*
|
||||
* @return the value of sys_forex_market_data.diff_per
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public Double getDiffPer() {
|
||||
return diffPer;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column sys_forex_market_data.diff_per
|
||||
*
|
||||
* @param diffPer the value for sys_forex_market_data.diff_per
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public void setDiffPer(Double diffPer) {
|
||||
this.diffPer = diffPer;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column sys_forex_market_data.is_real
|
||||
*
|
||||
* @return the value of sys_forex_market_data.is_real
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public Boolean getIsReal() {
|
||||
return isReal;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column sys_forex_market_data.is_real
|
||||
*
|
||||
* @param isReal the value for sys_forex_market_data.is_real
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
public void setIsReal(Boolean isReal) {
|
||||
this.isReal = isReal;
|
||||
}
|
||||
|
||||
|
||||
public static ForexMarketData copyToForexData(ForexData data,String batchId) {
|
||||
ForexMarketData marketData = new ForexMarketData();
|
||||
marketData.setBuyPic(Double.valueOf(data.getBuyPic()));
|
||||
marketData.setClosePri(Double.valueOf(data.getClosePri()));
|
||||
marketData.setCode(data.getCode());
|
||||
marketData.setColor(data.getColor());
|
||||
marketData.setCurrency(data.getCurrency());
|
||||
marketData.setDataTime(new Date());
|
||||
marketData.setDate(data.getDate());
|
||||
marketData.setHighPic(data.getHighPic());
|
||||
marketData.setLowPic(data.getLowPic());
|
||||
marketData.setOpenPri(data.getOpenPri());
|
||||
marketData.setRange(data.getRange());
|
||||
marketData.setSellPic(data.getSellPic());
|
||||
marketData.setYesPic(data.getYesPic());
|
||||
marketData.setDiffAmo(Double.valueOf(data.getDiffAmo()));
|
||||
marketData.setDiffPer(Double.valueOf(data.getDiffPer()));
|
||||
marketData.setIsReal(true);
|
||||
marketData.setBatchId(batchId);
|
||||
return marketData;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static List<ForexMarketData> copyToForexData(List<ForexData> forexDataList){
|
||||
List<ForexMarketData> forexMarketData =new ArrayList<>();
|
||||
String batchId = IdUtil.simpleUUID();
|
||||
forexDataList.forEach(data->{
|
||||
forexMarketData.add(copyToForexData(data,batchId));
|
||||
});
|
||||
return forexMarketData;
|
||||
}
|
||||
|
||||
public ForexMarketData(Double buyPic,
|
||||
Double closePri,
|
||||
String code,
|
||||
String color,
|
||||
String currency,
|
||||
Date dataTime,
|
||||
String date,
|
||||
String highPic,
|
||||
String lowPic,
|
||||
String openPri,
|
||||
String range,
|
||||
String sellPic,
|
||||
String yesPic,
|
||||
Double diffAmo,
|
||||
Double diffPer,
|
||||
String batchId) {
|
||||
this.id = IdUtil.simpleUUID();
|
||||
this.isReal=false;
|
||||
this.buyPic = buyPic;
|
||||
this.closePri = closePri;
|
||||
this.code = code;
|
||||
this.color = color;
|
||||
this.currency = currency;
|
||||
this.dataTime = dataTime;
|
||||
this.date = date;
|
||||
this.highPic = highPic;
|
||||
this.lowPic = lowPic;
|
||||
this.openPri = openPri;
|
||||
this.range = range;
|
||||
this.sellPic = sellPic;
|
||||
this.yesPic = yesPic;
|
||||
this.diffAmo = diffAmo;
|
||||
this.diffPer = diffPer;
|
||||
this.batchId = batchId;
|
||||
}
|
||||
|
||||
public ForexMarketData() {
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,115 @@
|
||||
package com.sztzjy.forex.trading_trading.mappers;
|
||||
|
||||
import com.sztzjy.forex.trading_trading.entity.ForexMarketData;
|
||||
import com.sztzjy.forex.trading_trading.entity.ForexMarketDataExample;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
@Mapper
|
||||
public interface ForexMarketDataMapper {
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_forex_market_data
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
long countByExample(ForexMarketDataExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_forex_market_data
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
int deleteByExample(ForexMarketDataExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_forex_market_data
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_forex_market_data
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
int insert(ForexMarketData record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_forex_market_data
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
int insertSelective(ForexMarketData record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_forex_market_data
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
List<ForexMarketData> selectByExample(ForexMarketDataExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_forex_market_data
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
ForexMarketData selectByPrimaryKey(String id);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_forex_market_data
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
int updateByExampleSelective(@Param("record") ForexMarketData record, @Param("example") ForexMarketDataExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_forex_market_data
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
int updateByExample(@Param("record") ForexMarketData record, @Param("example") ForexMarketDataExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_forex_market_data
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
int updateByPrimaryKeySelective(ForexMarketData record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_forex_market_data
|
||||
*
|
||||
* @mbg.generated Sun Jul 16 23:42:14 CST 2023
|
||||
*/
|
||||
int updateByPrimaryKey(ForexMarketData record);
|
||||
|
||||
|
||||
void insertAll(List<ForexMarketData> forexMarketData);
|
||||
|
||||
|
||||
@Select("SELECT * " +
|
||||
"FROM sys_forex_market_data " +
|
||||
"WHERE batch_Id = ( " +
|
||||
" SELECT batch_Id " +
|
||||
" FROM sys_forex_market_data " +
|
||||
" ORDER BY data_time DESC " +
|
||||
" LIMIT 1 " +
|
||||
")")
|
||||
List<ForexMarketData> selectLastForexMarketData();
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.sztzjy.forex.trading_trading.service;
|
||||
|
||||
import com.sztzjy.forex.trading_trading.entity.ForexMarketData;
|
||||
import com.sztzjy.forex.trading_trading.entity.mql5Entity.ForexData;
|
||||
import com.sztzjy.forex.trading_trading.mappers.ForexMarketDataMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ForexMarketDataService {
|
||||
|
||||
@Autowired
|
||||
ForexMarketDataMapper forexMarketDataMapper;
|
||||
|
||||
|
||||
public void insertAll(List<ForexData> forexDataList) {
|
||||
List<ForexMarketData> forexMarketDataList = ForexMarketData.copyToForexData(forexDataList);
|
||||
forexMarketDataMapper.insertAll(forexMarketDataList);
|
||||
}
|
||||
|
||||
public void insertAllByMarketData(List<ForexMarketData> forexMarketData) {
|
||||
forexMarketDataMapper.insertAll(forexMarketData);
|
||||
}
|
||||
|
||||
public List<ForexMarketData> selectLastForexMarketData() {
|
||||
return forexMarketDataMapper.selectLastForexMarketData();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,496 @@
|
||||
<?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.ForexMarketDataMapper">
|
||||
<resultMap id="BaseResultMap" type="com.sztzjy.forex.trading_trading.entity.ForexMarketData">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 16 23:42:14 CST 2023.
|
||||
-->
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="buy_pic" jdbcType="DOUBLE" property="buyPic" />
|
||||
<result column="close_pri" jdbcType="DOUBLE" property="closePri" />
|
||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||
<result column="color" jdbcType="VARCHAR" property="color" />
|
||||
<result column="currency" jdbcType="VARCHAR" property="currency" />
|
||||
<result column="data_time" jdbcType="TIMESTAMP" property="dataTime" />
|
||||
<result column="date" jdbcType="VARCHAR" property="date" />
|
||||
<result column="high_pic" jdbcType="VARCHAR" property="highPic" />
|
||||
<result column="low_pic" jdbcType="VARCHAR" property="lowPic" />
|
||||
<result column="open_pri" jdbcType="VARCHAR" property="openPri" />
|
||||
<result column="range" jdbcType="VARCHAR" property="range" />
|
||||
<result column="sell_pic" jdbcType="VARCHAR" property="sellPic" />
|
||||
<result column="yes_pic" jdbcType="VARCHAR" property="yesPic" />
|
||||
<result column="diff_amo" jdbcType="DOUBLE" property="diffAmo" />
|
||||
<result column="diff_per" jdbcType="DOUBLE" property="diffPer" />
|
||||
<result column="is_real" jdbcType="BIT" property="isReal" />
|
||||
</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 Sun Jul 16 23:42:14 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 Sun Jul 16 23:42:14 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 Sun Jul 16 23:42:14 CST 2023.
|
||||
-->
|
||||
id, buy_pic, close_pri, code, color, currency, data_time, date, high_pic, low_pic,
|
||||
open_pri, range, sell_pic, yes_pic, diff_amo, diff_per, is_real
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.sztzjy.forex.trading_trading.entity.ForexMarketDataExample" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 16 23:42:14 CST 2023.
|
||||
-->
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from sys_forex_market_data
|
||||
<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 Sun Jul 16 23:42:14 CST 2023.
|
||||
-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from sys_forex_market_data
|
||||
where id = #{id,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 Sun Jul 16 23:42:14 CST 2023.
|
||||
-->
|
||||
delete from sys_forex_market_data
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.sztzjy.forex.trading_trading.entity.ForexMarketDataExample">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 16 23:42:14 CST 2023.
|
||||
-->
|
||||
delete from sys_forex_market_data
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sztzjy.forex.trading_trading.entity.ForexMarketData">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 16 23:42:14 CST 2023.
|
||||
-->
|
||||
insert into sys_forex_market_data (id, buy_pic, close_pri,
|
||||
code, color, currency,
|
||||
data_time, date, high_pic,
|
||||
low_pic, open_pri, range,
|
||||
sell_pic, yes_pic, diff_amo,
|
||||
diff_per, is_real)
|
||||
values (#{id,jdbcType=VARCHAR}, #{buyPic,jdbcType=DOUBLE}, #{closePri,jdbcType=DOUBLE},
|
||||
#{code,jdbcType=VARCHAR}, #{color,jdbcType=VARCHAR}, #{currency,jdbcType=VARCHAR},
|
||||
#{dataTime,jdbcType=TIMESTAMP}, #{date,jdbcType=VARCHAR}, #{highPic,jdbcType=VARCHAR},
|
||||
#{lowPic,jdbcType=VARCHAR}, #{openPri,jdbcType=VARCHAR}, #{range,jdbcType=VARCHAR},
|
||||
#{sellPic,jdbcType=VARCHAR}, #{yesPic,jdbcType=VARCHAR}, #{diffAmo,jdbcType=DOUBLE},
|
||||
#{diffPer,jdbcType=DOUBLE}, #{isReal,jdbcType=BIT})
|
||||
</insert>
|
||||
|
||||
<insert id="insertAll" parameterType="java.util.List">
|
||||
insert into sys_forex_market_data (id, buy_pic, close_pri,
|
||||
code, color, currency,
|
||||
data_time, date, high_pic,
|
||||
low_pic, open_pri, range,
|
||||
sell_pic, yes_pic, diff_amo,
|
||||
diff_per, is_real)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.buyPic,jdbcType=DOUBLE}, #{item.closePri,jdbcType=DOUBLE},
|
||||
#{item.code,jdbcType=VARCHAR}, #{item.color,jdbcType=VARCHAR}, #{item.currency,jdbcType=VARCHAR},
|
||||
#{item.dataTime,jdbcType=TIMESTAMP}, #{item.date,jdbcType=VARCHAR}, #{item.highPic,jdbcType=VARCHAR},
|
||||
#{item.lowPic,jdbcType=VARCHAR}, #{item.openPri,jdbcType=VARCHAR}, #{item.range,jdbcType=VARCHAR},
|
||||
#{item.sellPic,jdbcType=VARCHAR}, #{item.yesPic,jdbcType=VARCHAR}, #{item.diffAmo,jdbcType=DOUBLE},
|
||||
#{item.diffPer,jdbcType=DOUBLE}, #{item.isReal,jdbcType=BIT})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
<insert id="insertSelective" parameterType="com.sztzjy.forex.trading_trading.entity.ForexMarketData">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 16 23:42:14 CST 2023.
|
||||
-->
|
||||
insert into sys_forex_market_data
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="buyPic != null">
|
||||
buy_pic,
|
||||
</if>
|
||||
<if test="closePri != null">
|
||||
close_pri,
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code,
|
||||
</if>
|
||||
<if test="color != null">
|
||||
color,
|
||||
</if>
|
||||
<if test="currency != null">
|
||||
currency,
|
||||
</if>
|
||||
<if test="dataTime != null">
|
||||
data_time,
|
||||
</if>
|
||||
<if test="date != null">
|
||||
date,
|
||||
</if>
|
||||
<if test="highPic != null">
|
||||
high_pic,
|
||||
</if>
|
||||
<if test="lowPic != null">
|
||||
low_pic,
|
||||
</if>
|
||||
<if test="openPri != null">
|
||||
open_pri,
|
||||
</if>
|
||||
<if test="range != null">
|
||||
range,
|
||||
</if>
|
||||
<if test="sellPic != null">
|
||||
sell_pic,
|
||||
</if>
|
||||
<if test="yesPic != null">
|
||||
yes_pic,
|
||||
</if>
|
||||
<if test="diffAmo != null">
|
||||
diff_amo,
|
||||
</if>
|
||||
<if test="diffPer != null">
|
||||
diff_per,
|
||||
</if>
|
||||
<if test="isReal != null">
|
||||
is_real,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="buyPic != null">
|
||||
#{buyPic,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="closePri != null">
|
||||
#{closePri,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
#{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="color != null">
|
||||
#{color,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="currency != null">
|
||||
#{currency,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dataTime != null">
|
||||
#{dataTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="date != null">
|
||||
#{date,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="highPic != null">
|
||||
#{highPic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lowPic != null">
|
||||
#{lowPic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="openPri != null">
|
||||
#{openPri,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="range != null">
|
||||
#{range,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sellPic != null">
|
||||
#{sellPic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="yesPic != null">
|
||||
#{yesPic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="diffAmo != null">
|
||||
#{diffAmo,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="diffPer != null">
|
||||
#{diffPer,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="isReal != null">
|
||||
#{isReal,jdbcType=BIT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.sztzjy.forex.trading_trading.entity.ForexMarketDataExample" resultType="java.lang.Long">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 16 23:42:14 CST 2023.
|
||||
-->
|
||||
select count(*) from sys_forex_market_data
|
||||
<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 Sun Jul 16 23:42:14 CST 2023.
|
||||
-->
|
||||
update sys_forex_market_data
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.buyPic != null">
|
||||
buy_pic = #{record.buyPic,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="record.closePri != null">
|
||||
close_pri = #{record.closePri,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="record.code != null">
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.color != null">
|
||||
color = #{record.color,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.currency != null">
|
||||
currency = #{record.currency,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.dataTime != null">
|
||||
data_time = #{record.dataTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.date != null">
|
||||
date = #{record.date,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.highPic != null">
|
||||
high_pic = #{record.highPic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.lowPic != null">
|
||||
low_pic = #{record.lowPic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.openPri != null">
|
||||
open_pri = #{record.openPri,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.range != null">
|
||||
range = #{record.range,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.sellPic != null">
|
||||
sell_pic = #{record.sellPic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.yesPic != null">
|
||||
yes_pic = #{record.yesPic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.diffAmo != null">
|
||||
diff_amo = #{record.diffAmo,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="record.diffPer != null">
|
||||
diff_per = #{record.diffPer,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="record.isReal != null">
|
||||
is_real = #{record.isReal,jdbcType=BIT},
|
||||
</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 Sun Jul 16 23:42:14 CST 2023.
|
||||
-->
|
||||
update sys_forex_market_data
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
buy_pic = #{record.buyPic,jdbcType=DOUBLE},
|
||||
close_pri = #{record.closePri,jdbcType=DOUBLE},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
color = #{record.color,jdbcType=VARCHAR},
|
||||
currency = #{record.currency,jdbcType=VARCHAR},
|
||||
data_time = #{record.dataTime,jdbcType=TIMESTAMP},
|
||||
date = #{record.date,jdbcType=VARCHAR},
|
||||
high_pic = #{record.highPic,jdbcType=VARCHAR},
|
||||
low_pic = #{record.lowPic,jdbcType=VARCHAR},
|
||||
open_pri = #{record.openPri,jdbcType=VARCHAR},
|
||||
range = #{record.range,jdbcType=VARCHAR},
|
||||
sell_pic = #{record.sellPic,jdbcType=VARCHAR},
|
||||
yes_pic = #{record.yesPic,jdbcType=VARCHAR},
|
||||
diff_amo = #{record.diffAmo,jdbcType=DOUBLE},
|
||||
diff_per = #{record.diffPer,jdbcType=DOUBLE},
|
||||
is_real = #{record.isReal,jdbcType=BIT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.forex.trading_trading.entity.ForexMarketData">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 16 23:42:14 CST 2023.
|
||||
-->
|
||||
update sys_forex_market_data
|
||||
<set>
|
||||
<if test="buyPic != null">
|
||||
buy_pic = #{buyPic,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="closePri != null">
|
||||
close_pri = #{closePri,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="color != null">
|
||||
color = #{color,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="currency != null">
|
||||
currency = #{currency,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dataTime != null">
|
||||
data_time = #{dataTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="date != null">
|
||||
date = #{date,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="highPic != null">
|
||||
high_pic = #{highPic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lowPic != null">
|
||||
low_pic = #{lowPic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="openPri != null">
|
||||
open_pri = #{openPri,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="range != null">
|
||||
range = #{range,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sellPic != null">
|
||||
sell_pic = #{sellPic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="yesPic != null">
|
||||
yes_pic = #{yesPic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="diffAmo != null">
|
||||
diff_amo = #{diffAmo,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="diffPer != null">
|
||||
diff_per = #{diffPer,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="isReal != null">
|
||||
is_real = #{isReal,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.sztzjy.forex.trading_trading.entity.ForexMarketData">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 16 23:42:14 CST 2023.
|
||||
-->
|
||||
update sys_forex_market_data
|
||||
set buy_pic = #{buyPic,jdbcType=DOUBLE},
|
||||
close_pri = #{closePri,jdbcType=DOUBLE},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
color = #{color,jdbcType=VARCHAR},
|
||||
currency = #{currency,jdbcType=VARCHAR},
|
||||
data_time = #{dataTime,jdbcType=TIMESTAMP},
|
||||
date = #{date,jdbcType=VARCHAR},
|
||||
high_pic = #{highPic,jdbcType=VARCHAR},
|
||||
low_pic = #{lowPic,jdbcType=VARCHAR},
|
||||
open_pri = #{openPri,jdbcType=VARCHAR},
|
||||
range = #{range,jdbcType=VARCHAR},
|
||||
sell_pic = #{sellPic,jdbcType=VARCHAR},
|
||||
yes_pic = #{yesPic,jdbcType=VARCHAR},
|
||||
diff_amo = #{diffAmo,jdbcType=DOUBLE},
|
||||
diff_per = #{diffPer,jdbcType=DOUBLE},
|
||||
is_real = #{isReal,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
Loading…
Reference in New Issue