获取店铺订单支付URL

This commit is contained in:
2025-11-11 14:47:31 +08:00
parent b68f207eed
commit d33e177e29
2 changed files with 8 additions and 6 deletions

View File

@@ -142,17 +142,17 @@ public class OrderPayController {
/** /**
* 获取店铺订单支付URL * 获取店铺订单支付URL
*/ */
@GetMapping("/shopPayApi/orderPayUrl") @PostMapping("/shopPayApi/orderPayUrl")
@Debounce(value = "#checkOrderPay.orderId") @Debounce(value = "#checkOrderPay.orderId")
public CzgResult<String> getOrderPayUrl(@RequestHeader Long shopId, @RequestParam(required = false) String extend, public CzgResult<String> getOrderPayUrl(@RequestHeader Long shopId,
CheckOrderPay checkOrderPay) { @RequestBody CheckOrderPay checkOrderPay) {
AssertUtil.isNull(shopId, "店铺id不能为空"); AssertUtil.isNull(shopId, "店铺id不能为空");
AssertUtil.isNull(checkOrderPay, "订单信息不能为空"); AssertUtil.isNull(checkOrderPay, "订单信息不能为空");
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("shopId", shopId); map.put("shopId", shopId);
map.put("orderId", checkOrderPay.getOrderId()); map.put("orderId", checkOrderPay.getOrderId());
map.put("payAmount", checkOrderPay.getOrderAmount()); map.put("payAmount", checkOrderPay.getOrderAmount());
map.put("extend", StrUtil.isEmpty(extend) ? "" : extend); map.put("extend", StrUtil.isEmpty(checkOrderPay.getExtend()) ? "" : checkOrderPay.getExtend());
if (checkOrderPay.getOrderId() != null) { if (checkOrderPay.getOrderId() != null) {
OrderInfo orderInfo = orderInfoService.checkOrderPay(checkOrderPay); OrderInfo orderInfo = orderInfoService.checkOrderPay(checkOrderPay);
map.put("payAmount", orderInfo.getOrderAmount()); map.put("payAmount", orderInfo.getOrderAmount());

View File

@@ -118,6 +118,8 @@ public class CheckOrderPay implements Serializable {
private String remark; private String remark;
private String extend;
public Integer getSeatNum() { public Integer getSeatNum() {
return seatNum == null ? 0 : seatNum; return seatNum == null ? 0 : seatNum;
@@ -138,7 +140,7 @@ public class CheckOrderPay implements Serializable {
return newCustomerDiscountAmount == null ? BigDecimal.ZERO : newCustomerDiscountAmount; return newCustomerDiscountAmount == null ? BigDecimal.ZERO : newCustomerDiscountAmount;
} }
/** /**
* 满减活动抵扣金额 * 满减活动抵扣金额
*/ */
public BigDecimal getDiscountActAmount() { public BigDecimal getDiscountActAmount() {
@@ -165,7 +167,7 @@ public class CheckOrderPay implements Serializable {
return roundAmount == null ? BigDecimal.ZERO : roundAmount; return roundAmount == null ? BigDecimal.ZERO : roundAmount;
} }
public BigDecimal getVipDiscountAmount(){ public BigDecimal getVipDiscountAmount() {
return vipDiscountAmount == null ? BigDecimal.ZERO : vipDiscountAmount; return vipDiscountAmount == null ? BigDecimal.ZERO : vipDiscountAmount;
} }