| | |
| | | import com.xcong.excoin.modules.member.entity.MemberEntity; |
| | | import com.xcong.excoin.modules.member.entity.MemberPaymentMethodEntity; |
| | | import com.xcong.excoin.modules.member.entity.MemberWalletCoinEntity; |
| | | import com.xcong.excoin.modules.otc.dao.OtcEntrustOrderDao; |
| | | import com.xcong.excoin.modules.otc.dao.OtcMarketBussinessDao; |
| | | import com.xcong.excoin.modules.otc.dao.OtcOrderAppealDao; |
| | | import com.xcong.excoin.modules.otc.dao.*; |
| | | import com.xcong.excoin.modules.otc.dto.HasPayDto; |
| | | import com.xcong.excoin.modules.otc.dto.OrderApealDto; |
| | | import com.xcong.excoin.modules.otc.dto.OrderListDto; |
| | | import com.xcong.excoin.modules.otc.dto.OtcOrderAddDto; |
| | | import com.xcong.excoin.modules.otc.entity.OtcEntrustOrder; |
| | | import com.xcong.excoin.modules.otc.entity.OtcMarketBussiness; |
| | | import com.xcong.excoin.modules.otc.entity.OtcOrder; |
| | | import com.xcong.excoin.modules.otc.dao.OtcOrderDao; |
| | | import com.xcong.excoin.modules.otc.entity.OtcOrderAppeal; |
| | | import com.xcong.excoin.modules.otc.entity.*; |
| | | import com.xcong.excoin.modules.otc.service.OtcOrderService; |
| | | import com.xcong.excoin.modules.otc.vo.BuyOrderDetailVo; |
| | | import com.xcong.excoin.modules.otc.vo.OrderListVo; |
| | |
| | | private final MemberWalletCoinDao memberWalletCoinDao; |
| | | private final MemberDao memberDao; |
| | | private final MemberPaymentMethodDao memberPaymentMethodDao; |
| | | private final OtcBlackListDao otcBlackListDao; |
| | | |
| | | |
| | | @Override |
| | |
| | | buyDetail.setCreateTime(buyOrder.getCreateTime()); |
| | | buyDetail.setIsMb(member.getIsTrader()); |
| | | buyDetail.setPayName(buyOrder.getPayName()); |
| | | buyDetail.setIsOwnEntrust(member.getId().equals(buyOrder.getEntrustOrderId()) ? 1 : 2); |
| | | |
| | | OtcOrder saleOrder = this.baseMapper.selectOrderByOrderNoAndType(otcOrder.getOrderNo(), OtcEntrustOrder.ORDER_TYPE_S); |
| | | MemberEntity saleMember = memberDao.selectById(saleOrder.getMemberId()); |
| | | |
| | | OtcBlackList otcBlackList = otcBlackListDao.selectByMemberIdAndBlackMemberId(member.getId(), buyOrder.getEntrustMemberId()); |
| | | if (otcBlackList != null) { |
| | | buyDetail.setIsBlack(1); |
| | | } else { |
| | | buyDetail.setIsBlack(2); |
| | | } |
| | | |
| | | buyDetail.setSaleName(saleMember.getName()); |
| | | |
| | |
| | | } |
| | | MemberEntity buyMember = memberDao.selectById(saleOrder.getOppositeMemberId()); |
| | | |
| | | |
| | | SaleOrderDetailVo saleDetail = new SaleOrderDetailVo(); |
| | | saleDetail.setOrderNo(saleOrder.getOrderNo()); |
| | | saleDetail.setUsdtAmount(saleOrder.getCoinAmount()); |
| | |
| | | saleDetail.setPayName(saleOrder.getPayName()); |
| | | saleDetail.setSaleName(buyMember.getName()); |
| | | saleDetail.setPayType(saleOrder.getPayType()); |
| | | saleDetail.setIsOwnEntrust(member.getId().equals(saleOrder.getEntrustOrderId()) ? 1 : 2); |
| | | |
| | | OtcBlackList otcBlackList = otcBlackListDao.selectByMemberIdAndBlackMemberId(member.getId(), saleOrder.getEntrustMemberId()); |
| | | if (otcBlackList != null) { |
| | | saleDetail.setIsBlack(1); |
| | | } else { |
| | | saleDetail.setIsBlack(2); |
| | | } |
| | | if (!saleOrder.getMemberId().equals(saleOrder.getEntrustMemberId())) { |
| | | OtcMarketBussiness otcMb = otcMarketBussinessDao.selectMarketBussinessByMemberId(saleOrder.getEntrustMemberId()); |
| | | saleDetail.setMbId(otcMb.getId()); |
| | |
| | | if(StrUtil.isEmpty(reason)){ |
| | | return Result.fail("请填写申诉原因"); |
| | | } |
| | | String content = orderApealDto.getContent(); |
| | | if(StrUtil.isEmpty(content)){ |
| | | return Result.fail("请填写申诉内容"); |
| | | } |
| | | List<String> content = orderApealDto.getContent(); |
| | | OtcOrderAppeal otcOrderAppeal = new OtcOrderAppeal(); |
| | | otcOrderAppeal.setMemberId(memberId); |
| | | otcOrderAppeal.setOrderId(orderId); |
| | | otcOrderAppeal.setReason(reason); |
| | | otcOrderAppeal.setContent(content); |
| | | otcOrderAppeal.setContent(content.toString()); |
| | | otcOrderAppeal.setStatus(OtcOrderAppeal.STATUS_ONE); |
| | | otcOrderAppealDao.insert(otcOrderAppeal); |
| | | return Result.ok("成功"); |