From c59fcb1ddbc2fcc48817a66e49d19f5fdf700558 Mon Sep 17 00:00:00 2001
From: wang-hao-jie <1550036656@qq.com>
Date: 星期四, 02 十二月 2021 15:37:13 +0800
Subject: [PATCH] 违章记录

---
 xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTaskController.java |   19 ++++++++++++++-----
 xboot-modules/xboot-your/pom.xml                                                                |   12 ++++++++++++
 2 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/xboot-modules/xboot-your/pom.xml b/xboot-modules/xboot-your/pom.xml
index 907f247..4714278 100644
--- a/xboot-modules/xboot-your/pom.xml
+++ b/xboot-modules/xboot-your/pom.xml
@@ -17,5 +17,17 @@
             <artifactId>artemis-http-client</artifactId>
             <version>1.1.2</version>
         </dependency>
+
+        <dependency>
+            <groupId>org.eclipse.paho</groupId>
+            <artifactId>org.eclipse.paho.client.mqttv3</artifactId>
+            <version>1.2.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.rabbitmq</groupId>
+            <artifactId>amqp-client</artifactId>
+            <version>5.7.0</version>
+        </dependency>
     </dependencies>
 </project>
\ No newline at end of file
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTaskController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTaskController.java
index 4e8a104..0cdd96a 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTaskController.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTaskController.java
@@ -7,10 +7,7 @@
 import cn.exrick.xboot.core.common.vo.Result;
 import cn.exrick.xboot.core.entity.User;
 import cn.exrick.xboot.core.service.UserService;
-import cn.exrick.xboot.your.entity.Area;
-import cn.exrick.xboot.your.entity.AreaSection;
-import cn.exrick.xboot.your.entity.OrderDetail;
-import cn.exrick.xboot.your.entity.OrderTask;
+import cn.exrick.xboot.your.entity.*;
 import cn.exrick.xboot.your.service.*;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.StrUtil;
@@ -59,6 +56,9 @@
     @Autowired
     private IAreaSectionService iAreaSectionService;
 
+    @Autowired
+    private ICarService iCarService;
+
     @RequestMapping(value = "/get/{id}", method = RequestMethod.GET)
     @ApiOperation(value = "閫氳繃id鑾峰彇")
     public Result<OrderTask> get(@PathVariable String id) {
@@ -74,7 +74,16 @@
         wrapper.eq("user_id",securityUtil.getCurrUser().getId());
         Area area = iAreaService.getOne(wrapper);
         if(area==null){
-            return ResultUtil.error("璇疯仈绯荤鐞嗗憳缁戝畾鐗囧尯閰嶉�佸憳");
+            QueryWrapper<Car> carQueryWrapper = new QueryWrapper<Car>();
+            carQueryWrapper.eq("user_id",securityUtil.getCurrUser().getId());
+            Car one = iCarService.getOne(carQueryWrapper);
+
+            QueryWrapper<Area> wrapper3 = new QueryWrapper<Area>();
+            wrapper3.eq("user_id",one.getFollowUserId());
+            area = iAreaService.getOne(wrapper);
+            if(area==null){
+                return ResultUtil.error("璇疯仈绯荤鐞嗗憳缁戝畾鐗囧尯閰嶉�佸憳");
+            }
         }
 
         QueryWrapper<OrderTask> wrapper2 = new QueryWrapper<OrderTask>();

--
Gitblit v1.9.1