This commit is contained in:
2025-12-19 15:15:24 +08:00
parent 31caa37053
commit 496884d2c2
3 changed files with 11 additions and 6 deletions

View File

@@ -85,6 +85,9 @@ public class GbOrderServiceImpl extends ServiceImpl<GbOrderMapper, GbOrder> impl
boolean update = shopConfigService.update(shopConfig, query().eq(ShopConfig::getId, shopId)); boolean update = shopConfigService.update(shopConfig, query().eq(ShopConfig::getId, shopId));
if (update && status == 0) { if (update && status == 0) {
shopDownRefund(shopId); shopDownRefund(shopId);
GbWare upWare = new GbWare();
upWare.setOnlineStatus(SystemConstants.OneZero.ZERO);
wareService.update(upWare, query().eq(GbWare::getShopId, shopId));
} }
return update; return update;
} }

View File

@@ -857,11 +857,11 @@ public class PayServiceImpl implements PayService {
CzgResult<CzgRefundResp> refund = refund(shopId, new CzgRefundReq(refPayOrderNo, refundReason, refundAmount.multiply(MONEY_RATE).longValue(), CzgResult<CzgRefundResp> refund = refund(shopId, new CzgRefundReq(refPayOrderNo, refundReason, refundAmount.multiply(MONEY_RATE).longValue(),
payment.getOrderNo(), "")); payment.getOrderNo(), ""));
OrderPayment uOrderPayment = new OrderPayment(); OrderPayment uOrderPayment = new OrderPayment();
uOrderPayment.setTradeNumber(refund.getData().getRefundOrderId());
uOrderPayment.setRespJson(JSONObject.toJSONString(refund.getData())); uOrderPayment.setRespJson(JSONObject.toJSONString(refund.getData()));
if (refund.getCode() != 200 || refund.getData() == null || !"SUCCESS".equals(refund.getData().getState())) { if (refund.getCode() != 200 || refund.getData() == null || !"SUCCESS".equals(refund.getData().getState())) {
uOrderPayment.setPayStatus(PayTypeConstants.PayStatus.FAIL); uOrderPayment.setPayStatus(PayTypeConstants.PayStatus.FAIL);
} else { } else {
uOrderPayment.setTradeNumber(refund.getData().getRefundOrderId());
uOrderPayment.setPayStatus(PayTypeConstants.PayStatus.SUCCESS); uOrderPayment.setPayStatus(PayTypeConstants.PayStatus.SUCCESS);
uOrderPayment.setPayTime(LocalDateTimeUtil.parse(refund.getData().getRefundTime(), "yyyy-MM-dd HH:mm:ss")); uOrderPayment.setPayTime(LocalDateTimeUtil.parse(refund.getData().getRefundTime(), "yyyy-MM-dd HH:mm:ss"));
} }

View File

@@ -20,11 +20,13 @@
<if test="param.groupOrderNo != null"> <if test="param.groupOrderNo != null">
AND detail.group_order_no = #{param.groupOrderNo} AND detail.group_order_no = #{param.groupOrderNo}
</if> </if>
<if test='param.status == "退款"'> <if test="param.status != null">
AND (detail.STATUS = '退款中' or detail.STATUS = '退款') <if test="param.status == '退款'">
</if> AND (detail.STATUS = '退款中' or detail.STATUS = '已退款')
<if test='param.status != "退款"'> </if>
AND detail.STATUS = #{param.status} <if test="param.status != '退款'">
AND detail.STATUS = #{param.status}
</if>
</if> </if>
<if test="param.userId != null"> <if test="param.userId != null">
AND detail.user_id = #{param.userId} AND detail.user_id = #{param.userId}