From 8a82baca367e2fb25d8fa55d21f9b25f5ece74df Mon Sep 17 00:00:00 2001
From: wang-hao-jie <1550036656@qq.com>
Date: 星期二, 07 十二月 2021 11:13:24 +0800
Subject: [PATCH] 违章记录

---
 xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/StatisticScheduleImpl.java |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/StatisticScheduleImpl.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/StatisticScheduleImpl.java
index 1e62664..4728a4c 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/StatisticScheduleImpl.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/StatisticScheduleImpl.java
@@ -44,6 +44,7 @@
                 UserStatistic one = iUserStatisticService.getOne(wrapper);
                 if(one==null){
                     one = new UserStatistic();
+                    one.setUserId(user.getId());
                 }
                 //鍙告満
                 if(type2==0){
@@ -87,11 +88,12 @@
                     wrapper3.eq("user_id",user.getId());
                     Area area = iAreaService.getOne(wrapper3);
 
-                    QueryWrapper<Customer> wrapper4 = new QueryWrapper<>();
-                    wrapper4.eq("area_id",area.getId());
-                    int count3 = iCustomerService.count(wrapper4);
-
-                    one.setService(count3);
+                    if(area!=null){
+                        QueryWrapper<Customer> wrapper4 = new QueryWrapper<>();
+                        wrapper4.eq("area_id",area.getId());
+                        int count3 = iCustomerService.count(wrapper4);
+                        one.setService(count3);
+                    }
                 }
 
                 iUserStatisticService.saveOrUpdate(one);

--
Gitblit v1.9.1