订单详情

This commit is contained in:
2025-03-04 14:28:46 +08:00
parent d5ae0ce0f6
commit af674e25a0
5 changed files with 43 additions and 5 deletions

View File

@@ -16,6 +16,8 @@ import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 订单管理
@@ -41,6 +43,11 @@ public class AdminOrderController {
return CzgResult.success(orderInfoService.getOrderByPage(queryDTO));
}
@GetMapping("/getOrderById")
public CzgResult<Map<String, Object>> getOrderById(Long orderId) {
return orderInfoService.getOrderDetails(orderId);
}
@GetMapping("/historyOrder")
public CzgResult<HistoryOrderVo> historyOrder(
@RequestParam(required = false) Long orderId,
@@ -59,7 +66,7 @@ public class AdminOrderController {
/**
* 订单全额退款 只传订单id
* 部分退款 传参refundDetailMap {"详情id":"数量","详情id":"数量"}
* 部分退款 传参refundDetail
*/
@PostMapping("/refundOrder")
public CzgResult<Object> refundOrder(@Validated @RequestBody OrderInfoRefundDTO refundDTO) {

View File

@@ -14,6 +14,8 @@ import com.mybatisflex.core.paginate.Page;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 订单管理
@@ -38,6 +40,11 @@ public class UserOrderController {
return CzgResult.success(orderInfoService.getOrderByPage(queryDTO));
}
@GetMapping("/getOrderById")
public CzgResult<Map<String, Object>> getOrderById(Long orderId) {
return orderInfoService.getOrderDetails(orderId);
}
@GetMapping("/historyOrder")
public CzgResult<HistoryOrderVo> historyOrder(
@RequestParam(required = false) Long orderId,