| | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.date.DateUnit; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | 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.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.service.OtcOrderService; |
| | | import com.xcong.excoin.modules.otc.vo.BuyOrderDetailVo; |
| | | import com.xcong.excoin.modules.otc.vo.OrderListVo; |
| | |
| | | |
| | | private final OtcMarketBussinessDao otcMarketBussinessDao; |
| | | private final OtcEntrustOrderDao otcEntrustOrderDao; |
| | | private final OtcOrderAppealDao otcOrderAppealDao; |
| | | private final CommonService commonService; |
| | | private final MemberWalletCoinDao memberWalletCoinDao; |
| | | private final MemberDao memberDao; |
| | |
| | | otcEntrustOrderDao.updateRemainAmount(otcOrder.getEntrustOrderId(), otcOrder.getCoinAmount()); |
| | | this.baseMapper.updateOrderStatusByOrderNo(OtcOrder.STATUS_CANCEL, null, otcOrder.getOrderNo()); |
| | | } |
| | | |
| | | @Override |
| | | public Result orderApeal(OrderApealDto orderApealDto) { |
| | | MemberEntity member = LoginUserUtils.getAppLoginUser(); |
| | | Long memberId = member.getId(); |
| | | // long memberId = 446L; |
| | | Long orderId = orderApealDto.getOrderId(); |
| | | OtcOrder otcOrder = this.baseMapper.selectById(orderId); |
| | | if(ObjectUtil.isEmpty(otcOrder)){ |
| | | return Result.fail("订单不存在"); |
| | | } |
| | | String reason = orderApealDto.getReason(); |
| | | if(StrUtil.isEmpty(reason)){ |
| | | return Result.fail("请填写申诉原因"); |
| | | } |
| | | String content = orderApealDto.getContent(); |
| | | if(StrUtil.isEmpty(content)){ |
| | | return Result.fail("请填写申诉内容"); |
| | | } |
| | | OtcOrderAppeal otcOrderAppeal = new OtcOrderAppeal(); |
| | | otcOrderAppeal.setMemberId(memberId); |
| | | otcOrderAppeal.setOrderId(orderId); |
| | | otcOrderAppeal.setReason(reason); |
| | | otcOrderAppeal.setContent(content); |
| | | otcOrderAppeal.setStatus(OtcOrderAppeal.STATUS_ONE); |
| | | otcOrderAppealDao.insert(otcOrderAppeal); |
| | | return Result.ok("成功"); |
| | | } |
| | | } |