查询订单状态

This commit is contained in:
2025-03-01 14:39:10 +08:00
parent 73852f43d6
commit dd6915bd58
3 changed files with 19 additions and 5 deletions

View File

@@ -121,7 +121,7 @@ public class OrderPayController {
* 获取店铺订单支付URL
*/
@GetMapping("/shopPayApi/orderPayUrl")
public CzgResult<String> getOrderPayUrl(@RequestHeader Long shopId,@RequestParam(required = false) String extend,
public CzgResult<String> getOrderPayUrl(@RequestHeader Long shopId, @RequestParam(required = false) String extend,
CheckOrderPay checkOrderPay) {
AssertUtil.isNull(shopId, "店铺id不能为空");
AssertUtil.isNull(checkOrderPay, "订单信息不能为空");
@@ -151,9 +151,17 @@ public class OrderPayController {
return payService.js2PayOrder(ServletUtil.getClientIPByHeader(request), payParam);
}
/**
* 获取订单状态
* unpaid-待支付;in-production 制作中;wait-out 待取餐;;done-订单完成;refunding-申请退单;refund-退单;part-refund 部分退单;cancelled-取消订单
*/
@GetMapping("/queryOrderStatus")
public CzgResult<String> queryOrderStatus(Long orderId) {
return CzgResult.success(orderService.queryChain().select(OrderInfo::getStatus).eq(OrderInfo::getId, orderId).oneAs(String.class));
}
@GetMapping("/queryOrderPay")
public CzgResult<Map<String, Object>> queryOrderPay(Long orderId){
public CzgResult<Map<String, Object>> queryOrderPay(Long orderId) {
return payService.queryPayOrder(orderId);
}
}