|
@@ -769,8 +769,14 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
|
|
|
Integer deductionCount = tbOrder.getDeductionCount() + 1;
|
|
|
if (tbOrder.getRefundStatus() != 0) {
|
|
|
String tradeNo = tbOrder.getTradeNo();
|
|
|
- tradeNo = StrUtil.subBefore(tradeNo, "_", false);
|
|
|
- tbOrder.setTradeNo(tradeNo + "_" + deductionCount);
|
|
|
+ int len = tradeNo.length();
|
|
|
+ if (StrUtil.contains(tradeNo, "_")) {
|
|
|
+ tradeNo = tradeNo.substring(0, tradeNo.lastIndexOf("_"));
|
|
|
+ } else {
|
|
|
+ tradeNo = tradeNo.substring(0, len - 1);
|
|
|
+ }
|
|
|
+ tradeNo = tradeNo + deductionCount;
|
|
|
+ tbOrder.setTradeNo(tradeNo);
|
|
|
}
|
|
|
PaymentDto paymentDto = this.getPaymentData(tbOrder);
|
|
|
StaticLog.info("\n---订单补扣款---sendSXB010——PaymentDto——:{}", JSONUtil.toJsonStr(paymentDto));
|
|
@@ -782,6 +788,7 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
|
|
|
return super.updateById(tbOrder);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 订单补扣款——按车,并且未扣款
|
|
|
*/
|
|
@@ -797,8 +804,14 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
|
|
|
Integer deductionCount = tbOrder.getDeductionCount() + 1;
|
|
|
if (tbOrder.getRefundStatus() != 0) {
|
|
|
String tradeNo = tbOrder.getTradeNo();
|
|
|
- tradeNo = StrUtil.subBefore(tradeNo, "_", false);
|
|
|
- tbOrder.setTradeNo(tradeNo + "_" + deductionCount);
|
|
|
+ int len = tradeNo.length();
|
|
|
+ if (StrUtil.contains(tradeNo, "_")) {
|
|
|
+ tradeNo = tradeNo.substring(0, tradeNo.lastIndexOf("_"));
|
|
|
+ } else {
|
|
|
+ tradeNo = tradeNo.substring(0, len - 1);
|
|
|
+ }
|
|
|
+ tradeNo = tradeNo + deductionCount;
|
|
|
+ tbOrder.setTradeNo(tradeNo);
|
|
|
}
|
|
|
PaymentDto paymentDto = this.getPaymentData(tbOrder);
|
|
|
StaticLog.info("\n---订单补扣款——按车---sendSXB010——PaymentDto——:{}", JSONUtil.toJsonStr(paymentDto));
|