Procházet zdrojové kódy

修改定时获取门禁记录信息

liu před 2 roky
rodič
revize
1b580ad096

+ 6 - 3
.idea/workspace.xml

@@ -6,8 +6,11 @@
   <component name="ChangeListManager">
   <component name="ChangeListManager">
     <list default="true" id="09eff92e-84e6-4825-81c9-523c173595c5" name="Changes" comment="">
     <list default="true" id="09eff92e-84e6-4825-81c9-523c173595c5" name="Changes" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst" beforeDir="false" afterPath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst" beforeDir="false" afterPath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/template/api/SmartEvaluateTeacherControllerAPI.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/template/api/SmartEvaluateTeacherControllerAPI.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/template/controller/SmartEvaluateTeacherController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/template/controller/SmartEvaluateTeacherController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/template/services/impl/SmartFaceDiscernServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/template/services/impl/SmartFaceDiscernServiceImpl.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/application-prod.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application-prod.yml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/target/classes/application-prod.yml" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/application-prod.yml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/target/mybatis_plus-0.0.1-SNAPSHOT.jar.original" beforeDir="false" afterPath="$PROJECT_DIR$/target/mybatis_plus-0.0.1-SNAPSHOT.jar.original" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/target/mybatis_plus-0.0.1-SNAPSHOT.jar.original" beforeDir="false" afterPath="$PROJECT_DIR$/target/mybatis_plus-0.0.1-SNAPSHOT.jar.original" afterDir="false" />
     </list>
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="SHOW_DIALOG" value="false" />
@@ -250,7 +253,7 @@
       <option name="presentableId" value="Default" />
       <option name="presentableId" value="Default" />
       <updated>1715735320475</updated>
       <updated>1715735320475</updated>
       <workItem from="1715735323482" duration="6840000" />
       <workItem from="1715735323482" duration="6840000" />
-      <workItem from="1715755513734" duration="841000" />
+      <workItem from="1715755513734" duration="10876000" />
     </task>
     </task>
     <servers />
     <servers />
   </component>
   </component>

+ 6 - 0
src/main/java/com/template/api/SmartEvaluateTeacherControllerAPI.java

@@ -54,4 +54,10 @@ public interface SmartEvaluateTeacherControllerAPI {
     @GetMapping(value = "queryTopSixTeacher")
     @GetMapping(value = "queryTopSixTeacher")
     @ApiOperation(value = "最受欢迎老师TOP6", notes = "最受欢迎老师TOP6", httpMethod = "GET")
     @ApiOperation(value = "最受欢迎老师TOP6", notes = "最受欢迎老师TOP6", httpMethod = "GET")
     CommonResult queryTopSixTeacher();
     CommonResult queryTopSixTeacher();
+
+    @GetMapping(value = "rankingList")
+    @ApiOperation(value = "排行榜", notes = "排行榜", httpMethod = "GET")
+    CommonResult rankingList(String cardNo);
+
+
 }
 }

+ 5 - 0
src/main/java/com/template/controller/SmartEvaluateTeacherController.java

@@ -351,4 +351,9 @@ public class SmartEvaluateTeacherController implements SmartEvaluateTeacherContr
 
 
         return CommonResult.ok(teachers);
         return CommonResult.ok(teachers);
     }
     }
+
+    @Override
+    public CommonResult rankingList(String cardNo) {
+        return null;
+    }
 }
 }

+ 237 - 97
src/main/java/com/template/services/impl/SmartFaceDiscernServiceImpl.java

@@ -14,6 +14,7 @@ import com.template.services.SmartFaceDiscernService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.template.services.SmartNotificationService;
 import com.template.services.SmartNotificationService;
 import com.template.services.SmartUserService;
 import com.template.services.SmartUserService;
+import com.tencentcloudapi.lighthouse.v20200324.models.TotalPrice;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.scheduling.annotation.Scheduled;
@@ -60,9 +61,9 @@ public class SmartFaceDiscernServiceImpl extends ServiceImpl<SmartFaceDiscernMap
     private Integer page = 1;
     private Integer page = 1;
     private Integer size = 50;
     private Integer size = 50;
 
 
-//    @Scheduled(cron = "0 0/50 * * * ? ")
     @Async
     @Async
-    @Scheduled(cron = "0 0/6 * * * ? ")
+//    @Scheduled(cron = "0 0/6 * * * ? ")
+    @Scheduled(cron = "0 0 0/1 * * ? ")
     public void baiS() {
     public void baiS() {
         if(scheduleConfig.getIsOpen().equals("1")){
         if(scheduleConfig.getIsOpen().equals("1")){
             try {
             try {
@@ -91,9 +92,13 @@ public class SmartFaceDiscernServiceImpl extends ServiceImpl<SmartFaceDiscernMap
 
 
 //        时间
 //        时间
         DateTimeFormatter dateTimeFormatter1 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
         DateTimeFormatter dateTimeFormatter1 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
-        LocalDateTime now = LocalDateTime.now();
-        LocalDateTime stateTime = now.withHour(0).withMinute(0).withSecond(0);
-        LocalDateTime endTime = now.withHour(23).withMinute(59).withSecond(59);
+//        LocalDateTime now = LocalDateTime.now();
+//        LocalDateTime stateTime = now.withHour(0).withMinute(0).withSecond(0);
+//        LocalDateTime endTime = now.withHour(23).withMinute(59).withSecond(59);
+        LocalDateTime endTime = LocalDateTime.now().withMinute(0).withSecond(0);
+        LocalDateTime stateTime = endTime.minusHours(1);
+
+
 //        开始时间
 //        开始时间
         data.put("record_begintime", stateTime.format(dateTimeFormatter1));
         data.put("record_begintime", stateTime.format(dateTimeFormatter1));
 //        data.put("record_begintime", "2024-01-22 00:00:00");
 //        data.put("record_begintime", "2024-01-22 00:00:00");
@@ -131,141 +136,276 @@ public class SmartFaceDiscernServiceImpl extends ServiceImpl<SmartFaceDiscernMap
 //            获取总数
 //            获取总数
                 Integer total = Integer.valueOf(jsonObject2.getString("total"));
                 Integer total = Integer.valueOf(jsonObject2.getString("total"));
  //               logger.info("total = " + total);
  //               logger.info("total = " + total);
-
-                if (total > pageindex * pagesize) {
+                Integer totalPage=total/pagesize+ 1;
+//                if (totalPage>=pageindex) {
+//                    page = pageindex + 1;
+//                } else {
+//                    page = pageindex - 1;
+//                }
+
+                if (totalPage>=pageindex) {
                     page = pageindex + 1;
                     page = pageindex + 1;
+                    save(jsonObject2);
+                    getFaceDiscern(page, size);
                 } else {
                 } else {
-                    page = pageindex - 1;
+                    page = 1;
                 }
                 }
 
 
+//                JSONArray data2 = jsonObject2.getJSONArray("data");
+////              去重
+//                HashSet<SmartFaceDiscern> smartFaceDiscerns = new HashSet<>();
+//                for (int i = 0; i < data2.size(); i++) {
+//                    JSONObject jsonObject3 = data2.getJSONObject(i);
+//                    SmartFaceDiscern smartFaceDiscern = new SmartFaceDiscern();
+//
+////                事件
+//                    String deviceName = jsonObject3.getString("device_name");
+//                    smartFaceDiscern.setType(deviceName);
+//
+////                地点
+//                    String deviceArea = jsonObject3.getString("device_area");
+//                    smartFaceDiscern.setLocation(deviceArea);
+//
+////                图片
+//                    String recordPhoto = jsonObject3.getString("record_photo");
+//                    smartFaceDiscern.setImage(recordPhoto);
+//
+////                时间
+//                    String recordAddtime = jsonObject3.getString("record_addtime");
+//                    smartFaceDiscern.setDateTime(recordAddtime);
+//
+////                名字
+//                    String student_name = jsonObject3.getString("student_name");
+//                    smartFaceDiscern.setName(student_name);
+////                 学号
+//                    String student_number = jsonObject3.getString("student_number");
+////                编号
+//                    String student_no = jsonObject3.getString("student_no");
+//
+//
+//                    LambdaQueryWrapper<SmartUser> wrapper = new LambdaQueryWrapper<>();
+//                    wrapper.eq(SmartUser::getBsStudentNo, student_no);
+//                    wrapper.eq(SmartUser::getName, student_name);
+//                    SmartUser smartUser = smartUserService.getOne(wrapper);
+//
+//                    if (ObjectUtils.isNotEmpty(smartUser)) {
+//                        smartFaceDiscern.setUserId(smartUser.getId());
+//                    } else {
+//                        smartFaceDiscern.setUserId(0);
+//                    }
+//
+//                    smartFaceDiscerns.add(smartFaceDiscern);
+//                }
+//
+//                for (SmartFaceDiscern smartFaceDiscern : smartFaceDiscerns) {
+//                    Integer userId = smartFaceDiscern.getUserId();
+//                    String deviceName = smartFaceDiscern.getType();
+//                    String deviceArea = smartFaceDiscern.getLocation();
+//                    String recordPhoto = smartFaceDiscern.getImage();
+//                    String recordAddtime = smartFaceDiscern.getDateTime();
+//                    String student_name = smartFaceDiscern.getName();
+//                    if (userId != 0) {
+//                        //                    判断是否已经添加
+//                        LambdaQueryWrapper<SmartFaceDiscern> wrapperFD = new LambdaQueryWrapper<>();
+//                        wrapperFD.eq(SmartFaceDiscern::getDateTime, smartFaceDiscern.getDateTime())
+//                                .eq(SmartFaceDiscern::getUserId, userId);
+//                        List<SmartFaceDiscern> list = this.list(wrapperFD);
+//
+//                        if (ObjectUtils.isEmpty(list) && list.size() == 0) {
+//                            this.save(smartFaceDiscern);
+//
+//
+////                        通过学生id找到关联的家长affiliate,并找到公众号,如果openid为空则不传
+//                            List<SmartUser> userList = smartUserService.getAffiliateList(userId);
+//                            if (ObjectUtils.isNotEmpty(userList) && userList.size() > 0) {
+//                                SmartUser smartUser = smartUserService.getById(userId);
+//
+//                                for (SmartUser user : userList) {
+//                                    String gzhOpenId = user.getGzhOpenId();
+//                                    if (ObjectUtils.isNotEmpty(gzhOpenId)) {
+//                                        String pushType = "";
+//                                        if (deviceName.contains("进校")) {
+//                                            pushType = "进入大门";
+//                                        } else if (deviceName.contains("出校")) {
+//                                            pushType = "离开大门";
+//                                        }
+//
+//                                        //                        时间格式是 yyyy-MM-dd HH:mm:ss,当前时间格式有问题
+//
+//                                        LocalDateTime date = LocalDateTime.now();
+//                                        String format = date.format(dateTimeFormatter1);
+//
+//                                        //                    公众号信息推送
+//                                        Message2.send(gzhOpenId, pushType, deviceArea, format);
+//
+//                                        SmartNotification smartNotification = new SmartNotification();
+//                                        smartNotification.setUserId(smartUser.getId());
+//                                        smartNotification.setUserName(smartUser.getName());
+//                                        smartNotification.setTypeName(pushType);
+//                                        smartNotification.setLocation(deviceArea);
+//                                        smartNotification.setImage(recordPhoto);
+//                                        smartNotification.setDateTime(recordAddtime);
+//                                        smartNotification.setType(2);
+//
+//                                        smartNotificationService.save(smartNotification);
+//
+//                                    }
+//
+//                                }
+//
+//                            }
+//
+//                        }
+//
+//                    } else {
+//
+//                        smartFaceDiscern.setUserId(0);
+//
+////                    判断是否已经添加
+//                        LambdaQueryWrapper<SmartFaceDiscern> wrapperFD = new LambdaQueryWrapper<>();
+//                        wrapperFD.eq(SmartFaceDiscern::getDateTime, recordAddtime)
+//                                .eq(SmartFaceDiscern::getName, student_name)
+//                                .eq(SmartFaceDiscern::getType, deviceName);
+//                        List<SmartFaceDiscern> list = this.list(wrapperFD);
+//
+//                        if (ObjectUtils.isEmpty(list) && list.size() == 0) {
+//                            this.save(smartFaceDiscern);
+//                        }
+//
+//                    }
+//                }
+
 
 
-                JSONArray data2 = jsonObject2.getJSONArray("data");
+            }
+
+        }
+    }
+
+
+    public void save(JSONObject jsonObject2) throws Exception {
+        DateTimeFormatter dateTimeFormatter1 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        JSONArray data2 = jsonObject2.getJSONArray("data");
 //              去重
 //              去重
-                HashSet<SmartFaceDiscern> smartFaceDiscerns = new HashSet<>();
-                for (int i = 0; i < data2.size(); i++) {
-                    JSONObject jsonObject3 = data2.getJSONObject(i);
-                    SmartFaceDiscern smartFaceDiscern = new SmartFaceDiscern();
+        HashSet<SmartFaceDiscern> smartFaceDiscerns = new HashSet<>();
+        for (int i = 0; i < data2.size(); i++) {
+            JSONObject jsonObject3 = data2.getJSONObject(i);
+            SmartFaceDiscern smartFaceDiscern = new SmartFaceDiscern();
 
 
 //                事件
 //                事件
-                    String deviceName = jsonObject3.getString("device_name");
-                    smartFaceDiscern.setType(deviceName);
+            String deviceName = jsonObject3.getString("device_name");
+            smartFaceDiscern.setType(deviceName);
 
 
 //                地点
 //                地点
-                    String deviceArea = jsonObject3.getString("device_area");
-                    smartFaceDiscern.setLocation(deviceArea);
+            String deviceArea = jsonObject3.getString("device_area");
+            smartFaceDiscern.setLocation(deviceArea);
 
 
 //                图片
 //                图片
-                    String recordPhoto = jsonObject3.getString("record_photo");
-                    smartFaceDiscern.setImage(recordPhoto);
+            String recordPhoto = jsonObject3.getString("record_photo");
+            smartFaceDiscern.setImage(recordPhoto);
 
 
 //                时间
 //                时间
-                    String recordAddtime = jsonObject3.getString("record_addtime");
-                    smartFaceDiscern.setDateTime(recordAddtime);
+            String recordAddtime = jsonObject3.getString("record_addtime");
+            smartFaceDiscern.setDateTime(recordAddtime);
 
 
 //                名字
 //                名字
-                    String student_name = jsonObject3.getString("student_name");
-                    smartFaceDiscern.setName(student_name);
+            String student_name = jsonObject3.getString("student_name");
+            smartFaceDiscern.setName(student_name);
 //                 学号
 //                 学号
-                    String student_number = jsonObject3.getString("student_number");
+            String student_number = jsonObject3.getString("student_number");
 //                编号
 //                编号
-                    String student_no = jsonObject3.getString("student_no");
+            String student_no = jsonObject3.getString("student_no");
 
 
 
 
-                    LambdaQueryWrapper<SmartUser> wrapper = new LambdaQueryWrapper<>();
-                    wrapper.eq(SmartUser::getBsStudentNo, student_no);
-                    wrapper.eq(SmartUser::getName, student_name);
-                    SmartUser smartUser = smartUserService.getOne(wrapper);
+            LambdaQueryWrapper<SmartUser> wrapper = new LambdaQueryWrapper<>();
+            wrapper.eq(SmartUser::getBsStudentNo, student_no);
+            wrapper.eq(SmartUser::getName, student_name);
+            SmartUser smartUser = smartUserService.getOne(wrapper);
 
 
-                    if (ObjectUtils.isNotEmpty(smartUser)) {
-                        smartFaceDiscern.setUserId(smartUser.getId());
-                    } else {
-                        smartFaceDiscern.setUserId(0);
-                    }
+            if (ObjectUtils.isNotEmpty(smartUser)) {
+                smartFaceDiscern.setUserId(smartUser.getId());
+            } else {
+                smartFaceDiscern.setUserId(0);
+            }
 
 
-                    smartFaceDiscerns.add(smartFaceDiscern);
-                }
+            smartFaceDiscerns.add(smartFaceDiscern);
+        }
 
 
-                for (SmartFaceDiscern smartFaceDiscern : smartFaceDiscerns) {
-                    Integer userId = smartFaceDiscern.getUserId();
-                    String deviceName = smartFaceDiscern.getType();
-                    String deviceArea = smartFaceDiscern.getLocation();
-                    String recordPhoto = smartFaceDiscern.getImage();
-                    String recordAddtime = smartFaceDiscern.getDateTime();
-                    String student_name = smartFaceDiscern.getName();
-                    if (userId != 0) {
-                        //                    判断是否已经添加
-                        LambdaQueryWrapper<SmartFaceDiscern> wrapperFD = new LambdaQueryWrapper<>();
-                        wrapperFD.eq(SmartFaceDiscern::getDateTime, smartFaceDiscern.getDateTime())
-                                .eq(SmartFaceDiscern::getUserId, userId);
-                        List<SmartFaceDiscern> list = this.list(wrapperFD);
+        for (SmartFaceDiscern smartFaceDiscern : smartFaceDiscerns) {
+            Integer userId = smartFaceDiscern.getUserId();
+            String deviceName = smartFaceDiscern.getType();
+            String deviceArea = smartFaceDiscern.getLocation();
+            String recordPhoto = smartFaceDiscern.getImage();
+            String recordAddtime = smartFaceDiscern.getDateTime();
+            String student_name = smartFaceDiscern.getName();
+            if (userId != 0) {
+                //                    判断是否已经添加
+                LambdaQueryWrapper<SmartFaceDiscern> wrapperFD = new LambdaQueryWrapper<>();
+                wrapperFD.eq(SmartFaceDiscern::getDateTime, smartFaceDiscern.getDateTime())
+                        .eq(SmartFaceDiscern::getUserId, userId);
+                List<SmartFaceDiscern> list = this.list(wrapperFD);
 
 
-                        if (ObjectUtils.isEmpty(list) && list.size() == 0) {
-                            this.save(smartFaceDiscern);
+                if (ObjectUtils.isEmpty(list) && list.size() == 0) {
+                    this.save(smartFaceDiscern);
 
 
 
 
 //                        通过学生id找到关联的家长affiliate,并找到公众号,如果openid为空则不传
 //                        通过学生id找到关联的家长affiliate,并找到公众号,如果openid为空则不传
-                            List<SmartUser> userList = smartUserService.getAffiliateList(userId);
-                            if (ObjectUtils.isNotEmpty(userList) && userList.size() > 0) {
-                                SmartUser smartUser = smartUserService.getById(userId);
-
-                                for (SmartUser user : userList) {
-                                    String gzhOpenId = user.getGzhOpenId();
-                                    if (ObjectUtils.isNotEmpty(gzhOpenId)) {
-                                        String pushType = "";
-                                        if (deviceName.contains("进校")) {
-                                            pushType = "进入大门";
-                                        } else if (deviceName.contains("出校")) {
-                                            pushType = "离开大门";
-                                        }
-
-                                        //                        时间格式是 yyyy-MM-dd HH:mm:ss,当前时间格式有问题
+                    List<SmartUser> userList = smartUserService.getAffiliateList(userId);
+                    if (ObjectUtils.isNotEmpty(userList) && userList.size() > 0) {
+                        SmartUser smartUser = smartUserService.getById(userId);
+
+                        for (SmartUser user : userList) {
+                            String gzhOpenId = user.getGzhOpenId();
+                            if (ObjectUtils.isNotEmpty(gzhOpenId)) {
+                                String pushType = "";
+                                if (deviceName.contains("进校")) {
+                                    pushType = "进入大门";
+                                } else if (deviceName.contains("出校")) {
+                                    pushType = "离开大门";
+                                }
 
 
-                                        LocalDateTime date = LocalDateTime.now();
-                                        String format = date.format(dateTimeFormatter1);
+                                //                        时间格式是 yyyy-MM-dd HH:mm:ss,当前时间格式有问题
 
 
-                                        //                    公众号信息推送
-                                        Message2.send(gzhOpenId, pushType, deviceArea, format);
+                                LocalDateTime date = LocalDateTime.now();
+                                String format = date.format(dateTimeFormatter1);
 
 
-                                        SmartNotification smartNotification = new SmartNotification();
-                                        smartNotification.setUserId(smartUser.getId());
-                                        smartNotification.setUserName(smartUser.getName());
-                                        smartNotification.setTypeName(pushType);
-                                        smartNotification.setLocation(deviceArea);
-                                        smartNotification.setImage(recordPhoto);
-                                        smartNotification.setDateTime(recordAddtime);
-                                        smartNotification.setType(2);
+                                //                    公众号信息推送
+                                Message2.send(gzhOpenId, pushType, deviceArea, format);
 
 
-                                        smartNotificationService.save(smartNotification);
+                                SmartNotification smartNotification = new SmartNotification();
+                                smartNotification.setUserId(smartUser.getId());
+                                smartNotification.setUserName(smartUser.getName());
+                                smartNotification.setTypeName(pushType);
+                                smartNotification.setLocation(deviceArea);
+                                smartNotification.setImage(recordPhoto);
+                                smartNotification.setDateTime(recordAddtime);
+                                smartNotification.setType(2);
 
 
-                                    }
-
-                                }
+                                smartNotificationService.save(smartNotification);
 
 
                             }
                             }
 
 
                         }
                         }
 
 
-                    } else {
+                    }
+
+                }
 
 
-                        smartFaceDiscern.setUserId(0);
+            } else {
 
 
-//                    判断是否已经添加
-                        LambdaQueryWrapper<SmartFaceDiscern> wrapperFD = new LambdaQueryWrapper<>();
-                        wrapperFD.eq(SmartFaceDiscern::getDateTime, recordAddtime)
-                                .eq(SmartFaceDiscern::getName, student_name)
-                                .eq(SmartFaceDiscern::getType, deviceName);
-                        List<SmartFaceDiscern> list = this.list(wrapperFD);
-
-                        if (ObjectUtils.isEmpty(list) && list.size() == 0) {
-                            this.save(smartFaceDiscern);
-                        }
+                smartFaceDiscern.setUserId(0);
 
 
-                    }
+//                    判断是否已经添加
+                LambdaQueryWrapper<SmartFaceDiscern> wrapperFD = new LambdaQueryWrapper<>();
+                wrapperFD.eq(SmartFaceDiscern::getDateTime, recordAddtime)
+                        .eq(SmartFaceDiscern::getName, student_name)
+                        .eq(SmartFaceDiscern::getType, deviceName);
+                List<SmartFaceDiscern> list = this.list(wrapperFD);
+
+                if (ObjectUtils.isEmpty(list) && list.size() == 0) {
+                    this.save(smartFaceDiscern);
                 }
                 }
 
 
-
             }
             }
-
         }
         }
     }
     }
 
 

+ 2 - 2
src/main/resources/application-prod.yml

@@ -37,9 +37,9 @@ mybatis-plus:
   mapper-locations: classpath:/mapper/template/*.xml
   mapper-locations: classpath:/mapper/template/*.xml
   configuration:
   configuration:
     #开启sql打印
     #开启sql打印
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  #  log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
     #    #关闭sql打印
     #    #关闭sql打印
-    #log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
+    log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
   global-config:
   global-config:
     db-config:
     db-config:
       logic-delete-value: 1
       logic-delete-value: 1

+ 2 - 2
target/classes/application-prod.yml

@@ -37,9 +37,9 @@ mybatis-plus:
   mapper-locations: classpath:/mapper/template/*.xml
   mapper-locations: classpath:/mapper/template/*.xml
   configuration:
   configuration:
     #开启sql打印
     #开启sql打印
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  #  log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
     #    #关闭sql打印
     #    #关闭sql打印
-    #log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
+    log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
   global-config:
   global-config:
     db-config:
     db-config:
       logic-delete-value: 1
       logic-delete-value: 1

binární
target/mybatis_plus-0.0.1-SNAPSHOT.jar.original