Helius
2021-05-28 7697fa12e0ad1ce22308631abc5af1115c920f69
src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcEntrustOrderServiceImpl.java
@@ -2,6 +2,7 @@
import cn.hutool.core.collection.CollUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -32,12 +33,15 @@
import com.xcong.excoin.modules.otc.vo.EntrustListVo;
import com.xcong.excoin.modules.otc.vo.EntrustOrderDetailVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import netscape.javascript.JSObject;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.List;
@Slf4j
@Service
@RequiredArgsConstructor
public class OtcEntrustOrderServiceImpl extends ServiceImpl<OtcEntrustOrderDao, OtcEntrustOrder> implements OtcEntrustOrderService {
@@ -74,6 +78,7 @@
            throw new GlobalException("最大限额应小于总金额");
        }
        log.info("----->>>{}", JSONObject.toJSONString(addDto));
        if (OtcEntrustOrder.ORDER_TYPE_S.equals(addDto.getType())) {
            MemberWalletCoinEntity coinWallet = memberWalletCoinDao.selectWalletCoinBymIdAndCode(member.getId(), "USDT");
//            BigDecimal multiply = addDto.getUnitPrice().multiply(coinWallet.getAvailableBalance());
@@ -81,7 +86,8 @@
                throw new GlobalException("可用金额不足");
            }
            memberWalletCoinDao.updateFrozenBalance(member.getId(), coinWallet.getId(), addDto.getAmount());
            int i =memberWalletCoinDao.updateFrozenBalance(member.getId(), coinWallet.getId(), addDto.getAmount());
            log.info("=========>{}", i);
        }
        if (!MemberEntity.IS_TRADER_Y.equals(member.getIsTrader())) {