Helius
2021-11-02 32cd9fe7569d4bf40bd3ee4b13d1e2e5a50203de
src/main/java/com/xcong/excoin/modules/coin/controller/OrderCoinController.java
@@ -6,8 +6,11 @@
import javax.validation.Valid;
import com.alibaba.fastjson.JSONObject;
import com.xcong.excoin.common.annotations.SubmitRepeat;
import com.xcong.excoin.modules.coin.entity.OrderCoinsEntity;
import com.xcong.excoin.modules.symbols.constants.SymbolsConstats;
import com.xcong.excoin.utils.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -40,7 +43,9 @@
   
   @Resource
   OrderCoinService orderCoinService;
   @Autowired
   private RedisUtils redisUtils;
   /**
    * 进入交易页面
    * @return
@@ -61,8 +66,13 @@
    */
   @ApiOperation(value = "提交买卖订单", notes = "提交买卖订单")
   @PostMapping(value="/submitSalesWalletCoinOrder")
    @SubmitRepeat
   public Result submitSalesWalletCoinOrder(@RequestBody @Valid SubmitSalesWalletCoinOrderDto submitSalesWalletCoinOrderDto) {
      log.info("买卖单参数[{}]", JSONObject.toJSONString(submitSalesWalletCoinOrderDto));
      log.debug("买卖单参数[{}]", JSONObject.toJSONString(submitSalesWalletCoinOrderDto));
      String status = redisUtils.getString("bea_order_status");
      if (!"1".equals(status)) {
         return Result.fail("暂未开放");
      }
      String symbol = submitSalesWalletCoinOrderDto.getSymbol();
      Integer type = submitSalesWalletCoinOrderDto.getType();
      Integer tradeType = submitSalesWalletCoinOrderDto.getTradeType();
@@ -97,6 +107,7 @@
    */
   @ApiOperation(value = "撤销委托订单", notes = "撤销委托订单")
   @PostMapping(value="/cancelEntrustWalletCoinOrder")
    @SubmitRepeat
   public Result cancelEntrustWalletCoinOrder(@RequestBody @Valid CancelEntrustWalletCoinOrderDto cancelEntrustWalletCoinOrderDto) {
      String orderId = cancelEntrustWalletCoinOrderDto.getOrderId();
      // 根据不同币种