xiaoyong931011
2020-06-03 f277f8fbba56fe460a1c954926f4699592ecfbca
src/main/java/com/xcong/excoin/modules/contract/service/impl/ContractHoldOrderServiceImpl.java
@@ -22,9 +22,11 @@
import com.xcong.excoin.modules.contract.parameter.vo.ContractMoneyInfoVo;
import com.xcong.excoin.modules.contract.parameter.vo.HoldOrderListVo;
import com.xcong.excoin.modules.contract.service.ContractHoldOrderService;
import com.xcong.excoin.modules.member.dao.MemberLevelRateDao;
import com.xcong.excoin.modules.member.dao.MemberWalletContractDao;
import com.xcong.excoin.modules.member.entity.AgentReturnEntity;
import com.xcong.excoin.modules.member.entity.MemberEntity;
import com.xcong.excoin.modules.member.entity.MemberLevelRateEntity;
import com.xcong.excoin.modules.member.entity.MemberWalletContractEntity;
import com.xcong.excoin.modules.platform.dao.TradeSettingDao;
import com.xcong.excoin.modules.platform.entity.PlatformTradeSettingEntity;
@@ -67,6 +69,9 @@
    @Resource
    private MemberWalletContractDao memberWalletContractDao;
    @Resource
    private MemberLevelRateDao memberLevelRateDao;
    @Resource
    private CacheSettingUtils cacheSettingUtils;
@@ -492,6 +497,8 @@
        MemberWalletContractEntity walletContractEntity = memberWalletContractDao.findWalletContractByMemberIdAndSymbol(memberEntity.getId(), CoinTypeEnum.USDT.name());
        MemberLevelRateEntity rateEntity = memberLevelRateDao.selectLeverRateByMemberIdAndSymbol(memberEntity.getId(), symbol);
        // 权益
        BigDecimal equity = walletContractEntity.getTotalBalance().add(totalProfitOrLess);
@@ -504,6 +511,7 @@
        contractMoneyInfoVo.setLeverAgeRatio(tradeSetting.getLeverageRatio());
        contractMoneyInfoVo.setNewPrice(newPrice);
        contractMoneyInfoVo.setSymbolSku(cacheSettingUtils.getSymbolSku(symbol));
        contractMoneyInfoVo.setLeverRate(rateEntity.getLevelRateUp());
        return Result.ok(contractMoneyInfoVo);
    }
}