Kaynağa Gözat

租户列表优化

dongxin 1 yıl önce
ebeveyn
işleme
30fb167dec

+ 1 - 1
platform/src/main/java/com/jzg/controller/SysSystemController.java

@@ -119,7 +119,7 @@ public class SysSystemController {
      * @return
      */
     @GetMapping(value = { "/userGet"})
-    @Operation(summary = "租户信息查询")
+    @Operation(summary = "根据手机号获取用户信息")
     public HttpResult userGet(String mobile) {
         return HttpResult.ok(sysUserService.list(new LambdaQueryWrapper<SysUser>()
                 .eq(SysUser::getMobile, mobile)));

+ 4 - 9
platform/src/main/java/com/jzg/service/impl/SysSystemServiceImpl.java

@@ -58,8 +58,6 @@ public class SysSystemServiceImpl extends ServiceImpl<SysSystemMapper, SysSystem
     private SysConfigMapper sysConfigMapper;
     @Autowired
     private SysUserJzgInfoMapper sysUserJzgInfoMapper;
-    @Autowired
-    private SysUserPlateInfoMapper sysUserPlateInfoMapper;
     @Value("${minio.bucket-name}")
     private String bucketName;
     @Autowired
@@ -208,12 +206,13 @@ public class SysSystemServiceImpl extends ServiceImpl<SysSystemMapper, SysSystem
     }
 
     @Override
+    @IgnoreTenant
     public Page<SysSystemVo> queryPage(Page page, SysSystemParam param) {
         Page<SysSystemVo> sysPage = baseMapper.queryPage(page, param);
         List<SysSystemVo> sysSystemList = sysPage.getRecords();
         if(CollUtil.isNotEmpty(sysSystemList)){
             // 查询所有机构
-            List<SysDept> deptList = sysDeptMapper.selectList(new LambdaQueryWrapper<>());
+            List<SysDept> deptList = sysDeptMapper.selectList(null);
             Map<String,List<SysDept>> deptMap = deptList.stream()
                     .collect(Collectors.groupingBy(SysDept::getSystemCode));
             sysSystemList.forEach(sysSystem->{
@@ -297,13 +296,9 @@ public class SysSystemServiceImpl extends ServiceImpl<SysSystemMapper, SysSystem
             user = new SysUser(param);
             // 用户名和手机号不允许重复
             boolean mobileExists = this.isExistsMobile(user.getMobile());
-            if(mobileExists){
-                throw new SystemException("管理员手机号重复!");
-            }
+            if(mobileExists){throw new SystemException("管理员手机号重复!");}
             boolean nameExists = this.isExistsUserName(user.getUsername());
-            if(nameExists){
-                throw new SystemException("管理员用户名重复!");
-            }
+            if(nameExists){throw new SystemException("管理员用户名重复!");}
             sysUserMapper.insert(user);
         }