From 3c2324160bdab823c5d0ab2c06abbef936f8c776 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期三, 18 十二月 2024 15:41:00 +0800
Subject: [PATCH] 合并代码

---
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java |   52 ++++++++++++++++++++++++++++++----------------------
 1 files changed, 30 insertions(+), 22 deletions(-)

diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
index 1f95358..701cf9d 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -19,9 +19,11 @@
 import com.ruoyi.other.api.feignClient.BaseSettingClient;
 import com.ruoyi.system.api.model.LoginUser;
 import io.swagger.annotations.*;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.validation.constraints.NotBlank;
 import java.time.LocalDateTime;
 import java.util.List;
 
@@ -212,50 +214,56 @@
     }
 
 
-    
-    
-    @ResponseBody
-    @GetMapping("/getOrderPageList")
-    @ApiOperation(value = "获取订单列表", tags = {"管理后台-订单管理", "门店后台-订单管理"})
-    public TableDataInfo<OrderPageListVo> getOrderPageList(OrderPageList orderPageList){
-        startPage();
-        List<OrderPageListVo> list = orderService.getOrderPageList(orderPageList);
-        return getDataTable(list);
+    @PostMapping("/byUserId")
+    public R<List<Order>> byUserId(@RequestParam("appUserId") Long appUserId){
+        return R.ok(orderService.lambdaQuery().eq(Order::getAppUserId, appUserId).list());
     }
-    
-    
-    @ResponseBody
+    @PostMapping("/byShopId")
+    public R<List<Order>> byShopId(@RequestParam("shopId") Integer shopId){
+        return R.ok(orderService.lambdaQuery().isNotNull(Order::getEndTime).eq(Order::getShopId, shopId).groupBy(Order::getAppUserId).list());
+    }
+
+
+
+
+
     @PutMapping("/confirmDelivery/{orderId}")
     @ApiOperation(value = "已发货操作", tags = {"管理后台-订单管理"})
     public R confirmDelivery(@PathVariable("orderId") String orderId, String code){
         return orderService.confirmDelivery(orderId, code);
     }
-    
-    
+
+
     @ResponseBody
     @PutMapping("/cancelOrder/{orderId}")
     @ApiOperation(value = "取消订单操作", tags = {"管理后台-订单管理"})
     public R cancelOrder(@PathVariable("orderId") Long orderId){
         return orderService.cancelOrder(orderId);
     }
-    
-    @ResponseBody
+
+
     @PutMapping("/receivingOperation/{orderId}")
     @ApiOperation(value = "收货操作", tags = {"管理后台-订单管理"})
     public R receivingOperation(@PathVariable("orderId") Long orderId){
         return orderService.receivingOperation(orderId);
     }
-    
-    
-    @ResponseBody
+
+
+
     @GetMapping("/getOrderInfo/{orderId}")
     @ApiOperation(value = "查询订单详情", tags = {"管理后台-订单管理"})
     public R<OrderInfoVo> getOrderInfo(@PathVariable("orderId") Long orderId){
         OrderInfoVo orderInfo = orderService.getOrderInfo(orderId);
         return R.ok(orderInfo);
     }
-    
-    
-    
+
+    @GetMapping("/getOrderPageList")
+//    @ApiOperation(value = "获取订单列表", tags = {"管理后台-订单管理", "门店后台-订单管理"})
+    public TableDataInfo<OrderPageListVo> getOrderPageList(OrderPageList orderPageList){
+        startPage();
+        List<OrderPageListVo> list = orderService.getOrderPageList(orderPageList);
+        return getDataTable(list);
+    }
+
 }
 

--
Gitblit v1.7.1