|
|
@@ -171,167 +171,6 @@ public class JobService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// /**
|
|
|
-// * @description:检查充值订单
|
|
|
-// * @author: xj
|
|
|
-// * @date: 2025/2/10 星期一 14:17
|
|
|
-// * @param:
|
|
|
-// * @return:
|
|
|
-// **/
|
|
|
-// private CheckResult<PayOrder> checkPayOrder(String _cz, KwpSettlementLogistics settlementLogisticsInfo) {
|
|
|
-// CheckResult<PayOrder> checkResult = new CheckResult<PayOrder>();
|
|
|
-// //直接查充值订单
|
|
|
-// LambdaQueryWrapper<PayOrder> payOrderLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
-// payOrderLambdaQueryWrapper.eq(PayOrder::getOrderNo, settlementLogisticsInfo.getSlOrderNo());
|
|
|
-// payOrderLambdaQueryWrapper.eq(PayOrder::getStatus, 1);//已支付
|
|
|
-// List<PayOrder> payOrders = payOrderMapper.selectList(payOrderLambdaQueryWrapper);
|
|
|
-// if (payOrders == null || payOrders.isEmpty()) {
|
|
|
-// //没有已支付的充值订单信息,不做处理
|
|
|
-// checkResult.setStatus(false);
|
|
|
-// } else {
|
|
|
-// PayOrder details = payOrders.get(0);
|
|
|
-// checkResult.setStatus(true);
|
|
|
-// checkResult.setBusinessNo(details.getOrderNo());
|
|
|
-// checkResult.setData(details);
|
|
|
-// }
|
|
|
-// return checkResult;
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * @description:检查预付单状态
|
|
|
-// * @author: xj
|
|
|
-// * @date: 2025/2/10 星期一 14:24
|
|
|
-// * @param:
|
|
|
-// * @return: null
|
|
|
-// **/
|
|
|
-// private CheckResult<PayMemberWalletAp> checkAdvancePay(String _yp, LedgerLogisticsAndBuySellInfo logisticsAndBuySellInfo, BigDecimal money) {
|
|
|
-// CheckResult<PayMemberWalletAp> checkResult = new CheckResult();
|
|
|
-// // 检查预付
|
|
|
-// if (StringUtils.isBlank(_yp)) {
|
|
|
-//
|
|
|
-// try {
|
|
|
-// //发起预付
|
|
|
-// R<Order> orderR = payCenterService.advancePayApply(logisticsAndBuySellInfo.getBuyUid(), ChannelEnum.XW,
|
|
|
-// logisticsAndBuySellInfo.getSellUid(), MoneyChange.bigMoney(money));
|
|
|
-// if (orderR == null || !orderR.getStatus() || orderR.getData() == null) {
|
|
|
-// checkResult.setStatus(false);
|
|
|
-// return checkResult;
|
|
|
-// } else {
|
|
|
-// _yp = orderR.getData().getOrderNo();
|
|
|
-// }
|
|
|
-// } catch (Exception e) {
|
|
|
-// log.error("检查预付异常", e);
|
|
|
-// checkResult.setStatus(false);
|
|
|
-// return checkResult;
|
|
|
-// }
|
|
|
-// }
|
|
|
-// LambdaQueryWrapper<PayMemberWalletAp> wrapper = new LambdaQueryWrapper<>();
|
|
|
-// wrapper.eq(PayMemberWalletAp::getApNo, _yp);
|
|
|
-// PayMemberWalletAp walletAp = payMemberWalletApMapper.selectOne(wrapper);
|
|
|
-// checkResult.setBusinessNo(_yp);
|
|
|
-// if (walletAp.getStatus().equals(2)) {
|
|
|
-// checkResult.setStatus(true);
|
|
|
-// } else {
|
|
|
-// checkResult.setStatus(false);
|
|
|
-// }
|
|
|
-// return checkResult;
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * @description:检查清分
|
|
|
-// * @author: xj
|
|
|
-// * @date: 2025/2/10 星期一 14:28
|
|
|
-// * @param:
|
|
|
-// * @return: null
|
|
|
-// **/
|
|
|
-// private CheckResult checkAgentPay(String _qf, String _yp, KwpSettlementLogistics settlementLogisticsInfo, LedgerLogisticsAndBuySellInfo logisticsAndBuySellInfo, BigDecimal money) {
|
|
|
-// CheckResult<PayOrderSub> checkResult = new CheckResult<>();
|
|
|
-//
|
|
|
-// //根据预付单号查询清分单子
|
|
|
-// LambdaQueryWrapper<PayOrderSub> wrapper = new LambdaQueryWrapper<>();
|
|
|
-// wrapper.eq(PayOrderSub::getBusinessNo, _yp);
|
|
|
-// PayOrderSub orderSub = payOrderSubMapper.selectOne(wrapper);
|
|
|
-//
|
|
|
-// if (orderSub == null) {//已有清分单子,直接返回 不在发起清分请求
|
|
|
-// // 1.记账
|
|
|
-// List<PatchPay> list = new ArrayList<>();
|
|
|
-// PatchPay patchPay = new PatchPay();
|
|
|
-// patchPay.setUid(logisticsAndBuySellInfo.getSellUid());
|
|
|
-// patchPay.setMoney(MoneyChange.bigMoney(money));
|
|
|
-// patchPay.setRemark("对账单结算");
|
|
|
-// list.add(patchPay);
|
|
|
-// try {
|
|
|
-// //清分
|
|
|
-// R<BusinessNo> businessNoR = payCenterService.payAgentPayV2(logisticsAndBuySellInfo.getBuyUid(), logisticsAndBuySellInfo.getSellUid(), ChannelEnum.XW,
|
|
|
-// MoneyChange.bigMoney(money), list, settlementLogisticsInfo.getSlOrderNo(), "1");
|
|
|
-// log.info("发起清分结果->{}", businessNoR);
|
|
|
-// if (businessNoR == null || !businessNoR.getStatus() || businessNoR.getData() == null) {
|
|
|
-// checkResult.setStatus(false);
|
|
|
-// return checkResult;
|
|
|
-// }
|
|
|
-// _qf = businessNoR.getData().getBusinessNo();
|
|
|
-// checkResult.setBusinessNo(_qf);
|
|
|
-// checkResult.setStatus(true);
|
|
|
-// return checkResult;
|
|
|
-// } catch (Exception e) {
|
|
|
-// log.error("发起清分异常", e);
|
|
|
-// checkResult.setStatus(false);
|
|
|
-// return checkResult;
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// if (orderSub.getStatus().equals(1)) {
|
|
|
-// checkResult.setStatus(true);
|
|
|
-// } else {
|
|
|
-// checkResult.setStatus(false);
|
|
|
-// }
|
|
|
-// checkResult.setBusinessNo(orderSub.getApNo());
|
|
|
-// checkResult.setData(orderSub);
|
|
|
-//
|
|
|
-//
|
|
|
-// return checkResult;
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * @description: 检查提现
|
|
|
-// * @author: xj
|
|
|
-// * @date: 2025/2/10 星期一 14:56
|
|
|
-// * @param:
|
|
|
-// * @return: null
|
|
|
-// **/
|
|
|
-// private CheckResult<PayWalletWithdrawOrder> checkWithdrawTake(String _tx, LedgerLogisticsAndBuySellInfo logisticsAndBuySellInfo, BigDecimal money) {
|
|
|
-// CheckResult<PayWalletWithdrawOrder> checkResult = new CheckResult<>();
|
|
|
-//
|
|
|
-// if (StringUtils.isBlank(_tx)) {
|
|
|
-// try {
|
|
|
-// //提现
|
|
|
-// R<Order> withdrawTake = payCenterService.withdrawTake(logisticsAndBuySellInfo.getSellUid(), ChannelEnum.XW,
|
|
|
-// MoneyChange.bigMoney(money), "提现");
|
|
|
-// if (withdrawTake == null || !withdrawTake.getStatus() || withdrawTake.getData() == null) {
|
|
|
-// checkResult.setStatus(false);
|
|
|
-// return checkResult;
|
|
|
-// }
|
|
|
-// _tx = withdrawTake.getData().getOrderNo();
|
|
|
-//
|
|
|
-// } catch (Exception e) {
|
|
|
-// checkResult.setStatus(false);
|
|
|
-// return checkResult;
|
|
|
-// }
|
|
|
-// }
|
|
|
-// checkResult.setBusinessNo(_tx);
|
|
|
-// LambdaQueryWrapper<PayWalletWithdrawOrder> wrapper = new LambdaQueryWrapper<>();
|
|
|
-// wrapper.eq(PayWalletWithdrawOrder::getOrderNo, _tx);
|
|
|
-// PayWalletWithdrawOrder payWalletWithdrawOrder = payWalletWithdrawOrderMapper.selectOne(wrapper);
|
|
|
-// checkResult.setData(payWalletWithdrawOrder);
|
|
|
-// if (payWalletWithdrawOrder.getStatus().equals(1)) {
|
|
|
-// checkResult.setStatus(true);
|
|
|
-// } else {
|
|
|
-// checkResult.setStatus(false);
|
|
|
-// }
|
|
|
-// return checkResult;
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* @description: 检查充值订单
|
|
|
* @author: xj
|
|
|
@@ -405,7 +244,7 @@ public class JobService {
|
|
|
if (StringUtils.isBlank(_qf)) { // 没有清分单子,发起清分请求
|
|
|
List<PatchPay> list = new ArrayList<>();
|
|
|
PatchPay patchPay = new PatchPay();
|
|
|
- patchPay.setUid(logisticsAndBuySellInfo.getBuyUid());
|
|
|
+ patchPay.setUid(logisticsAndBuySellInfo.getSellUid());
|
|
|
patchPay.setMoney(MoneyChange.bigMoney(money));
|
|
|
patchPay.setRemark("对账单结算");
|
|
|
list.add(patchPay);
|
|
|
@@ -425,7 +264,7 @@ public class JobService {
|
|
|
wrapper.eq(PayBatchAgentPay::getBusinessNo, _qf);
|
|
|
PayBatchAgentPay orderSub = payBatchAgentPayMapper.selectOne(wrapper);
|
|
|
|
|
|
- setCheckResult(checkResult, orderSub.getStatus().equals(1), orderSub.getBusinessNo(), orderSub);
|
|
|
+ setCheckResult(checkResult, true, orderSub.getBusinessNo(), orderSub);
|
|
|
} catch (Exception e) {
|
|
|
log.error("检查清分异常, settlementLogisticsInfo: {}, logisticsAndBuySellInfo: {}, money: {}", settlementLogisticsInfo, logisticsAndBuySellInfo, money, e);
|
|
|
setCheckResult(checkResult, false, null, null);
|