fix:订单查询修改

This commit is contained in:
dzc committed 2025-03-06 20:02:07 +08:00
1 parent 694f4b43cb
commit 09d8c12ec5
1 file changed
+4 -1
@@ -78,8 +78,11 @@ public class HardCarController {
@GetMapping("/order-id")
@Operation(summary = "根据订单id查询购物车")
public R<Page<HardCarVo>> orderId(@ParameterObject Page page, @RequestParam Long orderId) {
if (ObjectUtil.isEmpty(orderId)) {
R.ok(null);
}
HardOrderEntity order = hardOrderService.getById(orderId);
if (ObjectUtil.isEmpty(order)) return null;
if (ObjectUtil.isEmpty(order) || ObjectUtil.isEmpty(order.getParentCarId())) return null;
HardCarDto dto = new HardCarDto();
dto.setParentCarId(order.getParentCarId());
return R.ok(hardCarService.pageJoin(page, dto));