| | |
| | | import com.mzl.flower.mapper.supplier.SupplierMapper; |
| | | import com.mzl.flower.mapper.system.UserWechatMapper; |
| | | import com.mzl.flower.mapper.wallet.WalletBillRecordMapper; |
| | | import com.mzl.flower.mapper.wallet.WalletMapper; |
| | | import com.mzl.flower.mapper.wallet.WalletWithdrawRecordMapper; |
| | | import com.mzl.flower.service.payment.UserPaymentV3Service; |
| | | import com.mzl.flower.service.supplier.SupplierService; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | private final WalletBillRecordMapper walletBillRecordMapper; |
| | | |
| | | private final WalletBillRecordService walletBillRecordService; |
| | | |
| | | private final WalletMapper walletMapper; |
| | | |
| | | |
| | | @Autowired |
| | |
| | | walletBillRecordMapper.insert(walletBillRecordDO); |
| | | //不需要更新结算单了,此时提现的金额和计算单上的金额不一致 |
| | | } |
| | | |
| | | if (Constants.WALLET_APPROVE_STATE.REJECT.name().equals(walletWithdrawRecordDTO.getApproveState())) { |
| | | //更新钱包 |
| | | Supplier s = supplierMapper.selectById(withdrawRecordDO.getSupplierId()); |
| | | WalletDO walletDO = walletService.getBySupplierId(s.getId()); |
| | | if(!ObjectUtils.isEmpty(walletDO)){ |
| | | //提现中金额:审核失败体现中金额扣减 |
| | | walletDO.setWithdrawingAmount(walletDO.getWithdrawingAmount().subtract(withdrawRecordDO.getAmount())); |
| | | //可提现金额:审核失败可提现金额增加 |
| | | walletDO.setWithdrawableAmount(walletDO.getWithdrawableAmount().add(withdrawRecordDO.getAmount())); |
| | | walletMapper.updateById(walletDO); |
| | | } |
| | | } |
| | | } |
| | | public String format(LocalDateTime dateTime, String format) { |
| | | if (dateTime == null || format == null) { |