|
|
@@ -125,21 +125,21 @@ public class JobService {
|
|
|
|
|
|
// 检查预付
|
|
|
CheckResult checkAdvancePay = checkAdvancePay(_yp, logisticsAndBuySellInfo, money);
|
|
|
+ _yp = checkAdvancePay.getBusinessNo();
|
|
|
if (!checkAdvancePay.isStatus()) {
|
|
|
- _yp = checkAdvancePay.getBusinessNo();
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
//检查清分
|
|
|
- CheckResult checkAgentPay = checkAgentPay(_qf, settlementLogisticsInfo, logisticsAndBuySellInfo, money);
|
|
|
+ CheckResult checkAgentPay = checkAgentPay(_qf, _yp, settlementLogisticsInfo, logisticsAndBuySellInfo, money);
|
|
|
+ _qf = checkAgentPay.getBusinessNo();
|
|
|
if (!checkAgentPay.isStatus()) {
|
|
|
- _qf = checkAgentPay.getBusinessNo();
|
|
|
continue;
|
|
|
}
|
|
|
//检查提现
|
|
|
CheckResult checkWithdrawTake = checkWithdrawTake(_tx, logisticsAndBuySellInfo, money);
|
|
|
+ _tx = checkWithdrawTake.getBusinessNo();
|
|
|
if (!checkWithdrawTake.isStatus()) {
|
|
|
- _tx = checkWithdrawTake.getBusinessNo();
|
|
|
continue;
|
|
|
}
|
|
|
//修改结算单状态
|
|
|
@@ -176,123 +176,268 @@ 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:检查充值订单
|
|
|
+ * @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);
|
|
|
+ CheckResult<PayOrder> checkResult = new CheckResult<>();
|
|
|
+
|
|
|
+ try {
|
|
|
+ // 直接查充值订单
|
|
|
+ LambdaQueryWrapper<PayOrder> payOrderLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ payOrderLambdaQueryWrapper.eq(PayOrder::getOrderNo, settlementLogisticsInfo.getSlOrderNo());
|
|
|
+ payOrderLambdaQueryWrapper.eq(PayOrder::getStatus, 1); // 已支付
|
|
|
+
|
|
|
+ PayOrder payOrder = payOrderMapper.selectOne(payOrderLambdaQueryWrapper);
|
|
|
+ if (payOrder == null) {
|
|
|
+ // 没有已支付的充值订单信息,不做处理
|
|
|
+ setCheckResult(checkResult, false, null, null);
|
|
|
+ } else {
|
|
|
+ setCheckResult(checkResult, true, payOrder.getOrderNo(), payOrder);
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("检查充值订单异常, settlementLogisticsInfo: {}", settlementLogisticsInfo, e);
|
|
|
+ setCheckResult(checkResult, false, null, null);
|
|
|
}
|
|
|
+
|
|
|
return checkResult;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @description:检查预付单状态
|
|
|
+ * @description: 检查预付单状态
|
|
|
* @author: xj
|
|
|
* @date: 2025/2/10 星期一 14:24
|
|
|
- * @param:
|
|
|
- * @return: null
|
|
|
- **/
|
|
|
- private CheckResult checkAdvancePay(String _yp, LedgerLogisticsAndBuySellInfo logisticsAndBuySellInfo, BigDecimal money) {
|
|
|
- CheckResult checkResult = new CheckResult();
|
|
|
- // 检查预付
|
|
|
- if (StringUtils.isBlank(_yp)) {
|
|
|
+ */
|
|
|
+ private CheckResult<PayMemberWalletAp> checkAdvancePay(String _yp, LedgerLogisticsAndBuySellInfo logisticsAndBuySellInfo, BigDecimal money) {
|
|
|
+ CheckResult<PayMemberWalletAp> checkResult = new CheckResult<>();
|
|
|
|
|
|
- try {
|
|
|
- //发起预付
|
|
|
+ try {
|
|
|
+ if (StringUtils.isBlank(_yp)) {
|
|
|
+ // 发起预付
|
|
|
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);
|
|
|
+ setCheckResult(checkResult, false, null, null);
|
|
|
return checkResult;
|
|
|
- } else {
|
|
|
- _yp = orderR.getData().getOrderNo();
|
|
|
}
|
|
|
- } catch (Exception e) {
|
|
|
- log.error("检查预付异常", e);
|
|
|
- checkResult.setStatus(false);
|
|
|
- return checkResult;
|
|
|
+ _yp = orderR.getData().getOrderNo();
|
|
|
}
|
|
|
+
|
|
|
+ LambdaQueryWrapper<PayMemberWalletAp> wrapper = new LambdaQueryWrapper<>();
|
|
|
+ wrapper.eq(PayMemberWalletAp::getApNo, _yp);
|
|
|
+ PayMemberWalletAp walletAp = payMemberWalletApMapper.selectOne(wrapper);
|
|
|
+ setCheckResult(checkResult, walletAp != null && walletAp.getStatus().equals(2), _yp, walletAp);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("检查预付异常, logisticsAndBuySellInfo: {}, money: {}", logisticsAndBuySellInfo, money, e);
|
|
|
+ setCheckResult(checkResult, false, null, null);
|
|
|
}
|
|
|
- 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:检查清分
|
|
|
+ * @description: 检查清分
|
|
|
* @author: xj
|
|
|
* @date: 2025/2/10 星期一 14:28
|
|
|
- * @param:
|
|
|
- * @return: null
|
|
|
- **/
|
|
|
- private CheckResult checkAgentPay(String _qf, KwpSettlementLogistics settlementLogisticsInfo, LedgerLogisticsAndBuySellInfo logisticsAndBuySellInfo, BigDecimal money) {
|
|
|
+ */
|
|
|
+ private CheckResult<PayOrderSub> checkAgentPay(String _qf, String _yp, KwpSettlementLogistics settlementLogisticsInfo, LedgerLogisticsAndBuySellInfo logisticsAndBuySellInfo, BigDecimal money) {
|
|
|
CheckResult<PayOrderSub> checkResult = new CheckResult<>();
|
|
|
|
|
|
- if (StringUtils.isBlank(_qf)) {
|
|
|
- // 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 {
|
|
|
- //清分
|
|
|
+ try {
|
|
|
+ // 根据预付单号查询清分单子
|
|
|
+ LambdaQueryWrapper<PayOrderSub> wrapper = new LambdaQueryWrapper<>();
|
|
|
+ wrapper.eq(PayOrderSub::getBusinessNo, _yp);
|
|
|
+ PayOrderSub orderSub = payOrderSubMapper.selectOne(wrapper);
|
|
|
+
|
|
|
+ if (orderSub == null) { // 没有清分单子,发起清分请求
|
|
|
+ List<PatchPay> list = new ArrayList<>();
|
|
|
+ PatchPay patchPay = new PatchPay();
|
|
|
+ patchPay.setUid(logisticsAndBuySellInfo.getSellUid());
|
|
|
+ patchPay.setMoney(MoneyChange.bigMoney(money));
|
|
|
+ patchPay.setRemark("对账单结算");
|
|
|
+ list.add(patchPay);
|
|
|
+
|
|
|
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);
|
|
|
+ setCheckResult(checkResult, false, null, null);
|
|
|
return checkResult;
|
|
|
}
|
|
|
_qf = businessNoR.getData().getBusinessNo();
|
|
|
- } catch (Exception e) {
|
|
|
- log.error("发起清分异常", e);
|
|
|
- checkResult.setStatus(false);
|
|
|
+ setCheckResult(checkResult, true, _qf, null);
|
|
|
return checkResult;
|
|
|
}
|
|
|
- }
|
|
|
- LambdaQueryWrapper<PayOrderSub> wrapper = new LambdaQueryWrapper<>();
|
|
|
- wrapper.eq(PayOrderSub::getSubNo, _qf);
|
|
|
|
|
|
- List<PayOrderSub> orderSubs = payOrderSubMapper.selectList(wrapper);
|
|
|
- if (orderSubs == null || orderSubs.isEmpty()) {
|
|
|
- checkResult.setStatus(false);
|
|
|
- return checkResult;
|
|
|
- } else {
|
|
|
- PayOrderSub orderSub = orderSubs.get(0);
|
|
|
- if (orderSub.getStatus().equals(1)) {
|
|
|
- checkResult.setStatus(true);
|
|
|
- } else {
|
|
|
- checkResult.setStatus(false);
|
|
|
- }
|
|
|
- checkResult.setBusinessNo(_qf);
|
|
|
- checkResult.setData(orderSubs.get(0));
|
|
|
+ setCheckResult(checkResult, orderSub.getStatus().equals(1), orderSub.getApNo(), orderSub);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("检查清分异常, settlementLogisticsInfo: {}, logisticsAndBuySellInfo: {}, money: {}", settlementLogisticsInfo, logisticsAndBuySellInfo, money, e);
|
|
|
+ setCheckResult(checkResult, false, null, null);
|
|
|
}
|
|
|
+
|
|
|
return checkResult;
|
|
|
}
|
|
|
|
|
|
@@ -300,38 +445,38 @@ public class JobService {
|
|
|
* @description: 检查提现
|
|
|
* @author: xj
|
|
|
* @date: 2025/2/10 星期一 14:56
|
|
|
- * @param:
|
|
|
- * @return: null
|
|
|
- **/
|
|
|
- private CheckResult checkWithdrawTake(String _tx, LedgerLogisticsAndBuySellInfo logisticsAndBuySellInfo, BigDecimal money) {
|
|
|
- CheckResult checkResult = new CheckResult();
|
|
|
+ */
|
|
|
+ private CheckResult<PayWalletWithdrawOrder> checkWithdrawTake(String _tx, LedgerLogisticsAndBuySellInfo logisticsAndBuySellInfo, BigDecimal money) {
|
|
|
+ CheckResult<PayWalletWithdrawOrder> checkResult = new CheckResult<>();
|
|
|
|
|
|
- if (StringUtils.isBlank(_tx)) {
|
|
|
- try {
|
|
|
- //提现
|
|
|
+ try {
|
|
|
+ if (StringUtils.isBlank(_tx)) {
|
|
|
+ // 提现
|
|
|
R<Order> withdrawTake = payCenterService.withdrawTake(logisticsAndBuySellInfo.getSellUid(), ChannelEnum.XW,
|
|
|
MoneyChange.bigMoney(money), "提现");
|
|
|
if (withdrawTake == null || !withdrawTake.getStatus() || withdrawTake.getData() == null) {
|
|
|
- checkResult.setStatus(false);
|
|
|
+ setCheckResult(checkResult, false, null, null);
|
|
|
return checkResult;
|
|
|
}
|
|
|
_tx = withdrawTake.getData().getOrderNo();
|
|
|
-
|
|
|
- } catch (Exception e) {
|
|
|
- checkResult.setStatus(false);
|
|
|
- return checkResult;
|
|
|
}
|
|
|
+
|
|
|
+ LambdaQueryWrapper<PayWalletWithdrawOrder> wrapper = new LambdaQueryWrapper<>();
|
|
|
+ wrapper.eq(PayWalletWithdrawOrder::getOrderNo, _tx);
|
|
|
+ PayWalletWithdrawOrder payWalletWithdrawOrder = payWalletWithdrawOrderMapper.selectOne(wrapper);
|
|
|
+ setCheckResult(checkResult, payWalletWithdrawOrder != null && payWalletWithdrawOrder.getStatus().equals(1), _tx, payWalletWithdrawOrder);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("检查提现异常, logisticsAndBuySellInfo: {}, money: {}", logisticsAndBuySellInfo, money, e);
|
|
|
+ setCheckResult(checkResult, false, null, null);
|
|
|
}
|
|
|
- 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;
|
|
|
}
|
|
|
+
|
|
|
+ // 辅助方法:设置 CheckResult 的状态、业务编号和数据
|
|
|
+ private <T> void setCheckResult(CheckResult<T> checkResult, boolean status, String businessNo, T data) {
|
|
|
+ checkResult.setStatus(status);
|
|
|
+ checkResult.setBusinessNo(businessNo);
|
|
|
+ checkResult.setData(data);
|
|
|
+ }
|
|
|
}
|