获取店铺订单支付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
*/
@GetMapping("/shopPayApi/orderPayUrl")
@PostMapping("/shopPayApi/orderPayUrl")
@Debounce(value = "#checkOrderPay.orderId")
public CzgResult<String> getOrderPayUrl(@RequestHeader Long shopId, @RequestParam(required = false) String extend,
CheckOrderPay checkOrderPay) {
public CzgResult<String> getOrderPayUrl(@RequestHeader Long shopId,
@RequestBody CheckOrderPay checkOrderPay) {
AssertUtil.isNull(shopId, "店铺id不能为空");
AssertUtil.isNull(checkOrderPay, "订单信息不能为空");
Map<String, Object> map = new HashMap<>();
map.put("shopId", shopId);
map.put("orderId", checkOrderPay.getOrderId());
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) {
OrderInfo orderInfo = orderInfoService.checkOrderPay(checkOrderPay);
map.put("payAmount", orderInfo.getOrderAmount());