新增根据studentnumber获取训练

master
yz 1 year ago
parent 09fb5dceb5
commit c003d9e65b

@ -303,7 +303,7 @@ public class ScheduledTask {
} }
}else { //开仓方式为卖 则平仓方式为买 先获取买价 }else { //开仓方式为卖 则平仓方式为买 先获取买价
Double buyPic = forexMarketData.getBuyPic(); Double buyPic = forexMarketData.getBuyPic();
if(stopLoss!=-1 && buyPic<=stopLoss){ if(stopLoss!=-1 && buyPic>=stopLoss){
Double margin = takeStashController.startUSDMarginNeed(trainingId, memberId, 0, tradingCode, buySellType, transactionVolume); Double margin = takeStashController.startUSDMarginNeed(trainingId, memberId, 0, tradingCode, buySellType, transactionVolume);
if (margin==0.0){ if (margin==0.0){
redisUtil.del("trainingId_"+trainingId+"_stashId_"+stashId); redisUtil.del("trainingId_"+trainingId+"_stashId_"+stashId);
@ -313,7 +313,7 @@ public class ScheduledTask {
takeStashController.updateMemberAndTakeStash(memberId,stashId,profitLoss,margin,stopLoss); takeStashController.updateMemberAndTakeStash(memberId,stashId,profitLoss,margin,stopLoss);
redisUtil.del("trainingId_"+trainingId+"_stashId_"+stashId); redisUtil.del("trainingId_"+trainingId+"_stashId_"+stashId);
} }
if(stopWin!=-1 && buyPic>=stopWin){ if(stopWin!=-1 && buyPic<=stopWin){
Double margin = takeStashController.startUSDMarginNeed(trainingId, memberId, 0, tradingCode, buySellType, transactionVolume); Double margin = takeStashController.startUSDMarginNeed(trainingId, memberId, 0, tradingCode, buySellType, transactionVolume);
if (margin==0.0){ if (margin==0.0){
redisUtil.del("trainingId_"+trainingId+"_stashId_"+stashId); redisUtil.del("trainingId_"+trainingId+"_stashId_"+stashId);
@ -349,7 +349,7 @@ public class ScheduledTask {
} }
}else { //开仓方式为卖 则平仓方式为买 先获取买价 }else { //开仓方式为卖 则平仓方式为买 先获取买价
Double buyPic = forexMarketData.getBuyPic(); Double buyPic = forexMarketData.getBuyPic();
if(stopLoss!=-1 && buyPic<=stopLoss){ if(stopLoss!=-1 && buyPic>=stopLoss){
Double margin = takeStashController.endUSDMarginNeed( trainingId, memberId,0 , tradingCode, buySellType, transactionVolume, priceTransaction); Double margin = takeStashController.endUSDMarginNeed( trainingId, memberId,0 , tradingCode, buySellType, transactionVolume, priceTransaction);
if (margin==0.0){ if (margin==0.0){
redisUtil.del("trainingId_"+trainingId+"_stashId_"+stashId); redisUtil.del("trainingId_"+trainingId+"_stashId_"+stashId);
@ -359,7 +359,7 @@ public class ScheduledTask {
takeStashController.updateMemberAndTakeStash(memberId,stashId,profitLoss,margin,stopLoss); takeStashController.updateMemberAndTakeStash(memberId,stashId,profitLoss,margin,stopLoss);
redisUtil.del("trainingId_"+trainingId+"_stashId_"+stashId); redisUtil.del("trainingId_"+trainingId+"_stashId_"+stashId);
} }
if(stopWin!=-1 && buyPic>=stopWin){ if(stopWin!=-1 && buyPic<=stopWin){
Double margin = takeStashController.endUSDMarginNeed( trainingId, memberId,0 , tradingCode, buySellType, transactionVolume, priceTransaction); Double margin = takeStashController.endUSDMarginNeed( trainingId, memberId,0 , tradingCode, buySellType, transactionVolume, priceTransaction);
if (margin==0.0){ if (margin==0.0){
redisUtil.del("trainingId_"+trainingId+"_stashId_"+stashId); redisUtil.del("trainingId_"+trainingId+"_stashId_"+stashId);

Loading…
Cancel
Save