瀏覽代碼

Merge branch 'fu-dev' of uskycloud/usky-modules into server-165

fuyuchuan 1 年之前
父節點
當前提交
88b5d954c4

+ 6 - 2
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/PatrolInspectionPersonnelServiceImpl.java

@@ -232,9 +232,13 @@ public class PatrolInspectionPersonnelServiceImpl extends AbstractCrudService<Pa
      */
     public PatrolInspectionPersonnel getStatus(){
         LambdaQueryWrapper<PatrolInspectionPersonnel> wrapper = Wrappers.lambdaQuery();
-        wrapper.eq(PatrolInspectionPersonnel::getUserId,SecurityUtils.getUserId())
-                .last("LIMIT 1");
+        wrapper.eq(PatrolInspectionPersonnel::getUserId,SecurityUtils.getUserId());
+        if (baseMapper.selectOne(wrapper)==null) {
+            throw new BusinessException("您不是巡检人员,无法进行此操作!");
+        }else {
+            wrapper.last("LIMIT 1");
         return baseMapper.selectOne(wrapper);
+        }
     }