This commit is contained in:
wyn
2026-04-30 19:00:15 +08:00
parent a4edccc7de
commit 594c99b4dc
4 changed files with 22 additions and 8 deletions

View File

@@ -41,6 +41,7 @@ import com.peanut.modules.pay.weChatPay.service.WxpayService;
import com.peanut.modules.sys.entity.SysConfigEntity;
import com.peanut.modules.sys.service.SysConfigService;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.HttpException;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
@@ -676,6 +677,7 @@ public class BuyOrderController {
}
//设置状态为已退款
buyOrder.setOrderStatus(Constants.ORDER_STATUS_REFUNDING);
buyOrderService.updateById(buyOrder);
BigDecimal refundFee = buyOrder.getRealMoney();
BigDecimal shippingMoney = buyOrder.getShippingMoney()==null?BigDecimal.ZERO:buyOrder.getShippingMoney();
@@ -742,7 +744,11 @@ public class BuyOrderController {
} else if (buyOrder.getCome()==4) {
weChatRefundInfo.setAppName("thyy");
}
wxpayService.refund(weChatRefundInfo);
try {
wxpayService.refund(weChatRefundInfo);
} catch (Exception e) {
System.out.println("msg=" + e.getMessage()); // 👈 关键
}
}
}
// else if (Constants.PAYMENT_METHOD_ALI_PAY.equals(buyOrder.getPaymentMethod())) {