xiaoyong931011
2020-05-27 cf21e298163c8ac112eec85998c6f55285247ae2
src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java
@@ -102,7 +102,7 @@
      MemberWalletCoinEntity walletCoin = memberWalletCoinDao.selectWalletCoinBymIdAndCode(memberId, symbol);
      
      PlatformTradeSettingEntity tradeSetting = platformTradeSettingDao.findTradeSetting();
      if (tradeSetting == null) {
      if (ObjectUtil.isEmpty(tradeSetting)) {
         return Result.fail(MessageSourceUtils.getString("order_service_0003"));
      }
      //获取USDT的币币账户信息
@@ -144,6 +144,9 @@
      transactionPageOfWalletCoinVo.setCnyUsdt(cnyUsdt.setScale(4, BigDecimal.ROUND_DOWN));
      //换算成人民币的币种价格
      transactionPageOfWalletCoinVo.setCurrentPriceCny(cnyUsdt.multiply(closePrice).setScale(4, BigDecimal.ROUND_DOWN));
      transactionPageOfWalletCoinVo.setSymbol(symbol);
      transactionPageOfWalletCoinVo.setType(type);
      return Result.ok(transactionPageOfWalletCoinVo);
   }
@@ -397,7 +400,7 @@
      List<OrderCoinsDealEntity> selectAllWalletCoinOrder = orderCoinDealDao.selectAllWalletCoinOrder(memberId);
      if(CollUtil.isNotEmpty(selectAllWalletCoinOrder)) {
         for(OrderCoinsDealEntity orderCoinsDealEntity: selectAllWalletCoinOrder) {
            OrderWalletCoinDealVo entityToVo = OrderWalletCoinDealMapper.INSTANCE.entityToVo(orderCoinsDealEntity);
            OrderWalletCoinDealVo entityToVo = OrderWalletCoinDealMapper.INSTANCE.entityToVoOrder(orderCoinsDealEntity);
            arrayList.add(entityToVo);
         }
      }
@@ -410,7 +413,7 @@
      //获取用户ID
      Long memberId = LoginUserUtils.getAppLoginUser().getId();
      OrderCoinsDealEntity selectWalletCoinOrder = orderCoinDealDao.selectWalletCoinOrder(orderId,memberId);
      OrderWalletCoinDealVo entityToVo = OrderWalletCoinDealMapper.INSTANCE.entityToVo(selectWalletCoinOrder);
      OrderWalletCoinDealVo entityToVo = OrderWalletCoinDealMapper.INSTANCE.entityToVoOrder(selectWalletCoinOrder);
      return Result.ok(entityToVo);
   }
@@ -428,6 +431,7 @@
      }else {
         Map<String, Object> columnMap = new HashMap<>();
         columnMap.put("symbol", symbol);
         columnMap.put("member_id", memberId);
         memberSelectSymbolsDao.deleteByMap(columnMap);;
         return Result.ok(MessageSourceUtils.getString("order_service_0016"));
      }