fix:订单查询修改
This commit is contained in:
1 parent
694f4b43cb
commit
09d8c12ec5
1 file changed
+4
-1
+4
-1
@@ -78,8 +78,11 @@ public class HardCarController {
|
|||||||
@GetMapping("/order-id")
|
@GetMapping("/order-id")
|
||||||
@Operation(summary = "根据订单id查询购物车")
|
@Operation(summary = "根据订单id查询购物车")
|
||||||
public R<Page<HardCarVo>> orderId(@ParameterObject Page page, @RequestParam Long orderId) {
|
public R<Page<HardCarVo>> orderId(@ParameterObject Page page, @RequestParam Long orderId) {
|
||||||
|
if (ObjectUtil.isEmpty(orderId)) {
|
||||||
|
R.ok(null);
|
||||||
|
}
|
||||||
HardOrderEntity order = hardOrderService.getById(orderId);
|
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();
|
HardCarDto dto = new HardCarDto();
|
||||||
dto.setParentCarId(order.getParentCarId());
|
dto.setParentCarId(order.getParentCarId());
|
||||||
return R.ok(hardCarService.pageJoin(page, dto));
|
return R.ok(hardCarService.pageJoin(page, dto));
|
||||||
|
|||||||
Reference in new issue
Block a user