| | |
| | | import cc.mrbird.febs.mall.service.IApiMallMemberWalletService; |
| | | import cc.mrbird.febs.mall.service.IMallMoneyFlowService; |
| | | import cc.mrbird.febs.mall.vo.*; |
| | | import cc.mrbird.febs.pay.model.SinglePayDto; |
| | | import cc.mrbird.febs.pay.service.UnipayService; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | |
| | | private final MallShopApplyMapper mallShopApplyMapper; |
| | | |
| | | private final IMallMoneyFlowService mallMoneyFlowService; |
| | | private final UnipayService unipayService; |
| | | private final MallMemberBankMapper mallMemberBankMapper; |
| | | |
| | | @Override |
| | | public IPage<MallMember> getMallMemberList(MallMember mallMember, QueryRequest request) { |
| | |
| | | if(1 != mallMemberWithdraw.getStatus()){ |
| | | return new FebsResponse().fail().message("当前状态不是提现中"); |
| | | } |
| | | |
| | | Long wtihdrawTypeId = mallMemberWithdraw.getWtihdrawTypeId(); |
| | | MallMemberBank mallMemberBank = mallMemberBankMapper.selectById(wtihdrawTypeId); |
| | | /** |
| | | * 调用汇聚代付 |
| | | */ |
| | | SinglePayDto singlePayDto = new SinglePayDto(); |
| | | singlePayDto.setMerchantOrderNo(mallMemberWithdraw.getWithdrawNo()); |
| | | singlePayDto.setReceiverAccountNoEncBankNo(mallMemberBank.getBankNo()); |
| | | singlePayDto.setReceiverAccountNoEncName(mallMemberBank.getName()); |
| | | singlePayDto.setReceiverAccountType("201"); |
| | | BigDecimal paidAmount = mallMemberWithdraw.getAmount().subtract(mallMemberWithdraw.getAmountFee()).setScale(2, BigDecimal.ROUND_DOWN); |
| | | singlePayDto.setPaidAmount(paidAmount); |
| | | singlePayDto.setCurrency("201"); |
| | | singlePayDto.setIsChecked("202"); |
| | | singlePayDto.setPaidDesc("用户提现"); |
| | | singlePayDto.setPaidUse("202"); |
| | | String singlePayRep = unipayService.singlePay(singlePayDto); |
| | | if(!mallMemberWithdraw.getWithdrawNo().equals(singlePayRep)){ |
| | | return new FebsResponse().fail().message("提现失败,请联系技术人员"); |
| | | } |
| | | |
| | | mallMemberWithdraw.setStatus(2); |
| | | mallMemberWithdrawMapper.updateById(mallMemberWithdraw); |
| | | |
| | |
| | | if(1 != mallMemberWithdraw.getStatus()){ |
| | | return new FebsResponse().fail().message("当前状态不是提现中"); |
| | | } |
| | | |
| | | |
| | | mallMemberWithdraw.setStatus(3); |
| | | mallMemberWithdrawMapper.updateById(mallMemberWithdraw); |