| | |
| | | import com.xcong.excoin.modules.coin.dao.MemberSelectSymbolsDao;
|
| | | import com.xcong.excoin.modules.coin.dao.OrderCoinDealDao;
|
| | | import com.xcong.excoin.modules.coin.dao.OrderCoinsDao;
|
| | | import com.xcong.excoin.modules.coin.dao.platform.CnyUsdtExchangeDao;
|
| | | import com.xcong.excoin.modules.coin.dao.platform.TradeSettingDao;
|
| | | import com.xcong.excoin.modules.coin.entity.CnyUsdtExchange;
|
| | | import com.xcong.excoin.modules.coin.entity.MemberAccountFlowEntity;
|
| | | import com.xcong.excoin.modules.coin.entity.OrderCoinsDealEntity;
|
| | | import com.xcong.excoin.modules.coin.entity.OrderCoinsEntity;
|
| | | import com.xcong.excoin.modules.coin.entity.PlatformTradeSettingEntity;
|
| | | import com.xcong.excoin.modules.coin.mapper.OrderWalletCoinDealMapper;
|
| | | import com.xcong.excoin.modules.coin.mapper.OrderWalletCoinMapper;
|
| | | import com.xcong.excoin.modules.coin.parameter.vo.MemberSelectSymbolsVo;
|
| | | import com.xcong.excoin.modules.coin.parameter.vo.OrderWalletCoinDealListVo;
|
| | | import com.xcong.excoin.modules.coin.parameter.vo.OrderWalletCoinDealVo;
|
| | | import com.xcong.excoin.modules.coin.parameter.vo.OrderWalletCoinListVo;
|
| | | import com.xcong.excoin.modules.coin.parameter.vo.OrderWalletCoinVo;
|
| | | import com.xcong.excoin.modules.coin.parameter.vo.TransactionPageOfWalletCoinVo;
|
| | | import com.xcong.excoin.modules.coin.service.OrderCoinService;
|
| | | import com.xcong.excoin.modules.member.dao.MemberWalletCoinDao;
|
| | | import com.xcong.excoin.modules.member.entity.MemberSelectSymbolsEntity;
|
| | | import com.xcong.excoin.modules.member.entity.MemberWalletCoinEntity;
|
| | | import com.xcong.excoin.modules.platform.dao.CnyUsdtExchangeDao;
|
| | | import com.xcong.excoin.modules.platform.dao.TradeSettingDao;
|
| | | import com.xcong.excoin.modules.platform.entity.PlatformTradeSettingEntity;
|
| | | import com.xcong.excoin.utils.MessageSourceUtils;
|
| | |
|
| | | import cn.hutool.core.collection.CollUtil;
|
| | |
| | | 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);
|
| | | }
|
| | |
|
| | |
| | | public Result getEntrustWalletCoinOrder(String symbol, Integer status) {
|
| | | //获取用户ID
|
| | | Long memberId = LoginUserUtils.getAppLoginUser().getId();
|
| | | OrderWalletCoinListVo orderWalletCoinListVo = new OrderWalletCoinListVo();
|
| | |
|
| | | OrderCoinsEntity orderCoin = orderCoinsDao.findCoinOrderListByMemberIdAndSysmbol(memberId, symbol, status);
|
| | | OrderWalletCoinVo entityToVo = OrderWalletCoinMapper.INSTANCE.entityToVo(orderCoin);
|
| | | return Result.ok(entityToVo);
|
| | | List<OrderWalletCoinVo> arrayList = new ArrayList<>();
|
| | | List<OrderCoinsEntity> findCoinOrderListByMemberIdAndSysmbol = orderCoinsDao.findCoinOrderListByMemberIdAndSysmbol(memberId, symbol, status);
|
| | | if(CollUtil.isNotEmpty(findCoinOrderListByMemberIdAndSysmbol)) {
|
| | | for(OrderCoinsEntity orderCoinsEntity : findCoinOrderListByMemberIdAndSysmbol) {
|
| | | OrderWalletCoinVo entityToVo = OrderWalletCoinMapper.INSTANCE.entityToVo(orderCoinsEntity);
|
| | | arrayList.add(entityToVo);
|
| | | }
|
| | | }
|
| | | orderWalletCoinListVo.setOrderWalletCoinVo(arrayList);
|
| | | return Result.ok(arrayList);
|
| | | }
|
| | |
|
| | | @Override
|