| | |
| | | package com.xcong.excoin.modules.otc.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.collection.ListUtil; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | String reason = otcOrderAppealEntity.getReason(); |
| | | otcAppealInfoVo.setReason(reason); |
| | | String content = otcOrderAppealEntity.getContent(); |
| | | otcAppealInfoVo.setContent(content); |
| | | List arr = Arrays.asList(content.split(",")); |
| | | otcAppealInfoVo.setContent(arr); |
| | | } |
| | | //获取对应的订单详情 |
| | | long orderId = otcOrderAppealEntity.getOrderId(); |
| | |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int reduceCoin(Long id) { |
| | | OtcOrderEntity order = otcOrderMapper.selectById(id); |
| | | |
| | | MemberWalletCoinEntity saleWallet = memberWalletCoinMapper.findWalletCoinByMemberIdAndWalletCode(order.getMemberId(), "USDT"); |
| | | MemberWalletCoinEntity buyWallet = memberWalletCoinMapper.findWalletCoinByMemberIdAndWalletCode(order.getOppositeMemberId(), "USDT"); |
| | | |
| | | memberWalletCoinMapper.updateBlockBalance(order.getCoinAmount(), buyWallet.getId()); |
| | | memberWalletCoinMapper.reduceFrozenBalance(order.getCoinAmount(), saleWallet.getId()); |
| | | |
| | | otcOrderMapper.updateOrderStatusByOrderNo(OtcOrderEntity.STATUS_THREE, order.getOrderNo()); |
| | | return 1; |
| | | } |
| | | } |