Browse Source

Merge branch 'release' of uskycloud/usky-cloud into master

gez 2 years ago
parent
commit
072f1b9fbe
100 changed files with 992 additions and 7153 deletions
  1. 0 4
      base-common/pom.xml
  2. 0 1
      base-common/ruoyi-common-core/pom.xml
  3. 4 6
      base-common/ruoyi-common-datascope/pom.xml
  4. 150 150
      base-common/ruoyi-common-datascope/src/main/java/com/ruoyi/common/datascope/aspect/DataScopeAspect.java
  5. 1 1
      base-common/ruoyi-common-datasource/pom.xml
  6. 2 2
      base-common/ruoyi-common-log/pom.xml
  7. 212 211
      base-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/aspect/LogAspect.java
  8. 29 29
      base-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/service/AsyncLogService.java
  9. 2 2
      base-common/ruoyi-common-redis/pom.xml
  10. 1 1
      base-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/configure/FastJson2JsonRedisSerializer.java
  11. 1 1
      base-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/configure/RedisConfig.java
  12. 2 2
      base-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/service/RedisService.java
  13. 1 1
      base-common/ruoyi-common-redis/src/main/resources/META-INF/spring.factories
  14. 9 4
      base-common/ruoyi-common-security/pom.xml
  15. 2 1
      base-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/auth/AuthLogic.java
  16. 1 1
      base-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/auth/AuthUtil.java
  17. 136 136
      base-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/handler/GlobalExceptionHandler.java
  18. 1 1
      base-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/interceptor/HeaderInterceptor.java
  19. 11 7
      base-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/service/TokenService.java
  20. 9 9
      base-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/DictUtils.java
  21. 2 1
      base-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/SecurityUtils.java
  22. 1 2
      base-common/ruoyi-common-security/src/main/resources/META-INF/spring.factories
  23. 1 1
      base-common/ruoyi-common-swagger/pom.xml
  24. 6 6
      base-components/gateway/pom.xml
  25. 82 0
      base-components/gateway/src/main/resources/application-dev.yml.bak
  26. 0 10
      base-components/gateway/src/main/resources/banner.txt
  27. 2 17
      base-components/gateway/src/main/resources/bootstrap.yml
  28. 0 2
      base-modules/pom.xml
  29. 0 74
      base-modules/service-auth/pom.xml
  30. 0 21
      base-modules/service-auth/src/main/java/com/ruoyi/auth/RuoYiAuthApplication.java
  31. 0 87
      base-modules/service-auth/src/main/java/com/ruoyi/auth/controller/TokenController.java
  32. 0 39
      base-modules/service-auth/src/main/java/com/ruoyi/auth/form/LoginBody.java
  33. 0 11
      base-modules/service-auth/src/main/java/com/ruoyi/auth/form/RegisterBody.java
  34. 0 160
      base-modules/service-auth/src/main/java/com/ruoyi/auth/service/SysLoginService.java
  35. 0 10
      base-modules/service-auth/src/main/resources/banner.txt
  36. 0 25
      base-modules/service-auth/src/main/resources/bootstrap.yml
  37. 0 74
      base-modules/service-auth/src/main/resources/logback.xml
  38. 2 2
      base-modules/service-file/pom.xml
  39. 48 48
      base-modules/service-file/src/main/java/com/ruoyi/file/controller/SysFileController.java
  40. 50 50
      base-modules/service-file/src/main/java/com/ruoyi/file/service/LocalSysFileServiceImpl.java
  41. 45 45
      base-modules/service-file/src/main/java/com/ruoyi/file/service/MinioSysFileServiceImpl.java
  42. 174 179
      base-modules/service-file/src/main/java/com/ruoyi/file/utils/FileUploadUtils.java
  43. 2 2
      base-modules/service-gen/pom.xml
  44. 3 3
      base-modules/service-job/pom.xml
  45. BIN
      base-modules/service-system/.DS_Store
  46. 0 23
      base-modules/service-system/pom.xml
  47. 0 27
      base-modules/service-system/service-system-api/pom.xml
  48. 0 29
      base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/RemoteFileService.java
  49. 0 41
      base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/RemoteLogService.java
  50. 0 43
      base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/RemoteUserService.java
  51. 0 202
      base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/domain/SysDept.java
  52. 0 176
      base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/domain/SysDictData.java
  53. 0 94
      base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/domain/SysDictType.java
  54. 0 50
      base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/domain/SysFile.java
  55. 0 102
      base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/domain/SysLogininfor.java
  56. 0 241
      base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/domain/SysOperLog.java
  57. 0 226
      base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/domain/SysRole.java
  58. 0 337
      base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/domain/SysUser.java
  59. 0 35
      base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/factory/RemoteFileFallbackFactory.java
  60. 0 42
      base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/factory/RemoteLogFallbackFactory.java
  61. 0 41
      base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/factory/RemoteUserFallbackFactory.java
  62. 0 160
      base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/model/LoginUser.java
  63. 0 4
      base-modules/service-system/service-system-api/src/main/resources/META-INF/spring.factories
  64. 0 47
      base-modules/service-system/service-system-biz/pom.xml
  65. BIN
      base-modules/service-system/service-system-biz/src/.DS_Store
  66. 0 44
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/RuoYiSystemApplication.java
  67. 0 134
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysConfigController.java
  68. 0 166
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysDeptController.java
  69. 0 122
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysDictDataController.java
  70. 0 133
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysDictTypeController.java
  71. 0 85
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysLoginController.java
  72. 0 78
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysLogininforController.java
  73. 0 159
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysMenuController.java
  74. 0 92
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysNoticeController.java
  75. 0 78
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysOperlogController.java
  76. 0 106
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysPlatformController.java
  77. 0 106
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysPlatformMenuController.java
  78. 0 131
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysPostController.java
  79. 0 152
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysProfileController.java
  80. 0 222
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysRoleController.java
  81. 0 101
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysTenantController.java
  82. 0 105
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysTenantMenuController.java
  83. 0 287
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysUserController.java
  84. 0 92
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysUserOnlineController.java
  85. 0 44
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/api/RemoteUserApi.java
  86. 0 111
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysConfig.java
  87. 0 259
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysMenu.java
  88. 0 102
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysNotice.java
  89. 0 84
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysPlatform.java
  90. 0 50
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysPlatformMenu.java
  91. 0 123
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysPost.java
  92. 0 46
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysRoleDept.java
  93. 0 46
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysRoleMenu.java
  94. 0 182
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysTenant.java
  95. 0 64
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysTenantMenu.java
  96. 0 100
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysUserOnline.java
  97. 0 46
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysUserPost.java
  98. 0 46
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysUserRole.java
  99. 0 59
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/vo/ConfigDomainVo.java
  100. 0 39
      base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/vo/LoginBody.java

+ 0 - 4
base-common/pom.xml

@@ -56,10 +56,6 @@
         <module>ruoyi-common-security</module>
         <module>ruoyi-common-datascope</module>
 		<module>ruoyi-common-datasource</module>
-        <module>common-cloud-starter</module>
-        <module>usky-common-core</module>
-        <module>usky-common-mvc</module>
-        <module>usky-common-spring</module>
     </modules>
 
 

+ 0 - 1
base-common/ruoyi-common-core/pom.xml

@@ -16,7 +16,6 @@
     </description>
 
     <dependencies>
-
         <!-- SpringCloud Openfeign -->
         <dependency>
             <groupId>org.springframework.cloud</groupId>

+ 4 - 6
base-common/ruoyi-common-datascope/pom.xml

@@ -8,20 +8,18 @@
         <version>0.0.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
-    
+
     <artifactId>ruoyi-common-datascope</artifactId>
-	
+
     <description>
         ruoyi-common-datascope权限范围
     </description>
 
     <dependencies>
-		
-        <!-- RuoYi Common Security -->
+       <!-- RuoYi Common Security-->
         <dependency>
-            <groupId>com.ruoyi</groupId>
+            <groupId>com.usky</groupId>
             <artifactId>ruoyi-common-security</artifactId>
         </dependency>
-        
     </dependencies>
 </project>

+ 150 - 150
base-common/ruoyi-common-datascope/src/main/java/com/ruoyi/common/datascope/aspect/DataScopeAspect.java

@@ -1,150 +1,150 @@
-package com.ruoyi.common.datascope.aspect;
-
-import org.aspectj.lang.JoinPoint;
-import org.aspectj.lang.annotation.Aspect;
-import org.aspectj.lang.annotation.Before;
-import org.springframework.stereotype.Component;
-import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.common.core.web.domain.BaseEntity;
-import com.ruoyi.common.datascope.annotation.DataScope;
-import com.ruoyi.common.security.utils.SecurityUtils;
-import com.ruoyi.system.api.domain.SysRole;
-import com.ruoyi.system.api.domain.SysUser;
-import com.ruoyi.system.api.model.LoginUser;
-
-/**
- * 数据过滤处理
- * 
- * @author ruoyi
- */
-@Aspect
-@Component
-public class DataScopeAspect
-{
-    /**
-     * 全部数据权限
-     */
-    public static final String DATA_SCOPE_ALL = "1";
-
-    /**
-     * 自定数据权限
-     */
-    public static final String DATA_SCOPE_CUSTOM = "2";
-
-    /**
-     * 部门数据权限
-     */
-    public static final String DATA_SCOPE_DEPT = "3";
-
-    /**
-     * 部门及以下数据权限
-     */
-    public static final String DATA_SCOPE_DEPT_AND_CHILD = "4";
-
-    /**
-     * 仅本人数据权限
-     */
-    public static final String DATA_SCOPE_SELF = "5";
-
-    /**
-     * 数据权限过滤关键字
-     */
-    public static final String DATA_SCOPE = "dataScope";
-
-    @Before("@annotation(controllerDataScope)")
-    public void doBefore(JoinPoint point, DataScope controllerDataScope) throws Throwable
-    {
-        clearDataScope(point);
-        handleDataScope(point, controllerDataScope);
-    }
-
-    protected void handleDataScope(final JoinPoint joinPoint, DataScope controllerDataScope)
-    {
-        // 获取当前的用户
-        LoginUser loginUser = SecurityUtils.getLoginUser();
-        if (StringUtils.isNotNull(loginUser))
-        {
-            SysUser currentUser = loginUser.getSysUser();
-            // 如果是超级管理员,则不过滤数据
-            if (StringUtils.isNotNull(currentUser) && !currentUser.isAdmin())
-            {
-                dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(),
-                        controllerDataScope.userAlias());
-            }
-        }
-    }
-
-    /**
-     * 数据范围过滤
-     * 
-     * @param joinPoint 切点
-     * @param user 用户
-     * @param deptAlias 部门别名
-     * @param userAlias 用户别名
-     */
-    public static void dataScopeFilter(JoinPoint joinPoint, SysUser user, String deptAlias, String userAlias)
-    {
-        StringBuilder sqlString = new StringBuilder();
-
-        for (SysRole role : user.getRoles())
-        {
-            String dataScope = role.getDataScope();
-            if (DATA_SCOPE_ALL.equals(dataScope))
-            {
-                sqlString = new StringBuilder();
-                break;
-            }
-            else if (DATA_SCOPE_CUSTOM.equals(dataScope))
-            {
-                sqlString.append(StringUtils.format(
-                        " OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", deptAlias,
-                        role.getRoleId()));
-            }
-            else if (DATA_SCOPE_DEPT.equals(dataScope))
-            {
-                sqlString.append(StringUtils.format(" OR {}.dept_id = {} ", deptAlias, user.getDeptId()));
-            }
-            else if (DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope))
-            {
-                sqlString.append(StringUtils.format(
-                        " OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )",
-                        deptAlias, user.getDeptId(), user.getDeptId()));
-            }
-            else if (DATA_SCOPE_SELF.equals(dataScope))
-            {
-                if (StringUtils.isNotBlank(userAlias))
-                {
-                    sqlString.append(StringUtils.format(" OR {}.user_id = {} ", userAlias, user.getUserId()));
-                }
-                else
-                {
-                    // 数据权限为仅本人且没有userAlias别名不查询任何数据
-                    sqlString.append(" OR 1=0 ");
-                }
-            }
-        }
-
-        if (StringUtils.isNotBlank(sqlString.toString()))
-        {
-            Object params = joinPoint.getArgs()[0];
-            if (StringUtils.isNotNull(params) && params instanceof BaseEntity)
-            {
-                BaseEntity baseEntity = (BaseEntity) params;
-                baseEntity.getParams().put(DATA_SCOPE, " AND (" + sqlString.substring(4) + ")");
-            }
-        }
-    }
-
-    /**
-     * 拼接权限sql前先清空params.dataScope参数防止注入
-     */
-    private void clearDataScope(final JoinPoint joinPoint)
-    {
-        Object params = joinPoint.getArgs()[0];
-        if (StringUtils.isNotNull(params) && params instanceof BaseEntity)
-        {
-            BaseEntity baseEntity = (BaseEntity) params;
-            baseEntity.getParams().put(DATA_SCOPE, "");
-        }
-    }
-}
+//package com.ruoyi.common.datascope.aspect;
+//
+//import org.aspectj.lang.JoinPoint;
+//import org.aspectj.lang.annotation.Aspect;
+//import org.aspectj.lang.annotation.Before;
+//import org.springframework.stereotype.Component;
+//import com.ruoyi.common.core.utils.StringUtils;
+//import com.ruoyi.common.core.web.domain.BaseEntity;
+//import com.ruoyi.common.datascope.annotation.DataScope;
+//import com.ruoyi.common.security.utils.SecurityUtils;
+//import com.ruoyi.system.api.domain.SysRole;
+//import com.ruoyi.system.api.domain.SysUser;
+//import com.ruoyi.system.api.model.LoginUser;
+//
+///**
+// * 数据过滤处理
+// *
+// * @author ruoyi
+// */
+//@Aspect
+//@Component
+//public class DataScopeAspect
+//{
+//    /**
+//     * 全部数据权限
+//     */
+//    public static final String DATA_SCOPE_ALL = "1";
+//
+//    /**
+//     * 自定数据权限
+//     */
+//    public static final String DATA_SCOPE_CUSTOM = "2";
+//
+//    /**
+//     * 部门数据权限
+//     */
+//    public static final String DATA_SCOPE_DEPT = "3";
+//
+//    /**
+//     * 部门及以下数据权限
+//     */
+//    public static final String DATA_SCOPE_DEPT_AND_CHILD = "4";
+//
+//    /**
+//     * 仅本人数据权限
+//     */
+//    public static final String DATA_SCOPE_SELF = "5";
+//
+//    /**
+//     * 数据权限过滤关键字
+//     */
+//    public static final String DATA_SCOPE = "dataScope";
+//
+//    @Before("@annotation(controllerDataScope)")
+//    public void doBefore(JoinPoint point, DataScope controllerDataScope) throws Throwable
+//    {
+//        clearDataScope(point);
+//        handleDataScope(point, controllerDataScope);
+//    }
+//
+//    protected void handleDataScope(final JoinPoint joinPoint, DataScope controllerDataScope)
+//    {
+//        // 获取当前的用户
+//        LoginUser loginUser = SecurityUtils.getLoginUser();
+//        if (StringUtils.isNotNull(loginUser))
+//        {
+//            SysUser currentUser = loginUser.getSysUser();
+//            // 如果是超级管理员,则不过滤数据
+//            if (StringUtils.isNotNull(currentUser) && !currentUser.isAdmin())
+//            {
+//                dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(),
+//                        controllerDataScope.userAlias());
+//            }
+//        }
+//    }
+//
+//    /**
+//     * 数据范围过滤
+//     *
+//     * @param joinPoint 切点
+//     * @param user 用户
+//     * @param deptAlias 部门别名
+//     * @param userAlias 用户别名
+//     */
+//    public static void dataScopeFilter(JoinPoint joinPoint, SysUser user, String deptAlias, String userAlias)
+//    {
+//        StringBuilder sqlString = new StringBuilder();
+//
+//        for (SysRole role : user.getRoles())
+//        {
+//            String dataScope = role.getDataScope();
+//            if (DATA_SCOPE_ALL.equals(dataScope))
+//            {
+//                sqlString = new StringBuilder();
+//                break;
+//            }
+//            else if (DATA_SCOPE_CUSTOM.equals(dataScope))
+//            {
+//                sqlString.append(StringUtils.format(
+//                        " OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", deptAlias,
+//                        role.getRoleId()));
+//            }
+//            else if (DATA_SCOPE_DEPT.equals(dataScope))
+//            {
+//                sqlString.append(StringUtils.format(" OR {}.dept_id = {} ", deptAlias, user.getDeptId()));
+//            }
+//            else if (DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope))
+//            {
+//                sqlString.append(StringUtils.format(
+//                        " OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )",
+//                        deptAlias, user.getDeptId(), user.getDeptId()));
+//            }
+//            else if (DATA_SCOPE_SELF.equals(dataScope))
+//            {
+//                if (StringUtils.isNotBlank(userAlias))
+//                {
+//                    sqlString.append(StringUtils.format(" OR {}.user_id = {} ", userAlias, user.getUserId()));
+//                }
+//                else
+//                {
+//                    // 数据权限为仅本人且没有userAlias别名不查询任何数据
+//                    sqlString.append(" OR 1=0 ");
+//                }
+//            }
+//        }
+//
+//        if (StringUtils.isNotBlank(sqlString.toString()))
+//        {
+//            Object params = joinPoint.getArgs()[0];
+//            if (StringUtils.isNotNull(params) && params instanceof BaseEntity)
+//            {
+//                BaseEntity baseEntity = (BaseEntity) params;
+//                baseEntity.getParams().put(DATA_SCOPE, " AND (" + sqlString.substring(4) + ")");
+//            }
+//        }
+//    }
+//
+//    /**
+//     * 拼接权限sql前先清空params.dataScope参数防止注入
+//     */
+//    private void clearDataScope(final JoinPoint joinPoint)
+//    {
+//        Object params = joinPoint.getArgs()[0];
+//        if (StringUtils.isNotNull(params) && params instanceof BaseEntity)
+//        {
+//            BaseEntity baseEntity = (BaseEntity) params;
+//            baseEntity.getParams().put(DATA_SCOPE, "");
+//        }
+//    }
+//}

+ 1 - 1
base-common/ruoyi-common-datasource/pom.xml

@@ -8,7 +8,7 @@
         <version>0.0.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
-    
+
     <artifactId>ruoyi-common-datasource</artifactId>
 	
     <description>

+ 2 - 2
base-common/ruoyi-common-log/pom.xml

@@ -8,7 +8,7 @@
         <version>0.0.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
-    
+
     <artifactId>ruoyi-common-log</artifactId>
 	
     <description>
@@ -18,7 +18,7 @@
     <dependencies>
         <!-- RuoYi Common Security -->
         <dependency>
-            <groupId>com.ruoyi</groupId>
+            <groupId>com.usky</groupId>
             <artifactId>ruoyi-common-security</artifactId>
         </dependency>
         

+ 212 - 211
base-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/aspect/LogAspect.java

@@ -1,211 +1,212 @@
-package com.ruoyi.common.log.aspect;
-
-import java.util.Collection;
-import java.util.Map;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.aspectj.lang.JoinPoint;
-import org.aspectj.lang.annotation.AfterReturning;
-import org.aspectj.lang.annotation.AfterThrowing;
-import org.aspectj.lang.annotation.Aspect;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
-import org.springframework.stereotype.Component;
-import org.springframework.validation.BindingResult;
-import org.springframework.web.multipart.MultipartFile;
-import com.alibaba.fastjson.JSON;
-import com.ruoyi.common.core.utils.ServletUtils;
-import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.common.core.utils.ip.IpUtils;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessStatus;
-import com.ruoyi.common.log.service.AsyncLogService;
-import com.ruoyi.common.security.utils.SecurityUtils;
-import com.ruoyi.system.api.domain.SysOperLog;
-
-/**
- * 操作日志记录处理
- * 
- * @author ruoyi
- */
-@Aspect
-@Component
-public class LogAspect
-{
-    private static final Logger log = LoggerFactory.getLogger(LogAspect.class);
-    
-    @Autowired
-    private AsyncLogService asyncLogService;
-
-    /**
-     * 处理完请求后执行
-     *
-     * @param joinPoint 切点
-     */
-    @AfterReturning(pointcut = "@annotation(controllerLog)", returning = "jsonResult")
-    public void doAfterReturning(JoinPoint joinPoint, Log controllerLog, Object jsonResult)
-    {
-        handleLog(joinPoint, controllerLog, null, jsonResult);
-    }
-
-    /**
-     * 拦截异常操作
-     * 
-     * @param joinPoint 切点
-     * @param e 异常
-     */
-    @AfterThrowing(value = "@annotation(controllerLog)", throwing = "e")
-    public void doAfterThrowing(JoinPoint joinPoint, Log controllerLog, Exception e)
-    {
-        handleLog(joinPoint, controllerLog, e, null);
-    }
-
-    protected void handleLog(final JoinPoint joinPoint, Log controllerLog, final Exception e, Object jsonResult)
-    {
-        try
-        {
-            // *========数据库日志=========*//
-            SysOperLog operLog = new SysOperLog();
-            operLog.setStatus(BusinessStatus.SUCCESS.ordinal());
-            // 请求的地址
-            String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
-            operLog.setOperIp(ip);
-            operLog.setOperUrl(ServletUtils.getRequest().getRequestURI());
-            String username = SecurityUtils.getUsername();
-            if (StringUtils.isNotBlank(username))
-            {
-                operLog.setOperName(username);
-            }
-
-            if (e != null)
-            {
-                operLog.setStatus(BusinessStatus.FAIL.ordinal());
-                operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 2000));
-            }
-            // 设置方法名称
-            String className = joinPoint.getTarget().getClass().getName();
-            String methodName = joinPoint.getSignature().getName();
-            operLog.setMethod(className + "." + methodName + "()");
-            // 设置请求方式
-            operLog.setRequestMethod(ServletUtils.getRequest().getMethod());
-            // 处理设置注解上的参数
-            getControllerMethodDescription(joinPoint, controllerLog, operLog, jsonResult);
-            // 保存数据库
-            asyncLogService.saveSysLog(operLog);
-        }
-        catch (Exception exp)
-        {
-            // 记录本地异常日志
-            log.error("==前置通知异常==");
-            log.error("异常信息:{}", exp.getMessage());
-            exp.printStackTrace();
-        }
-    }
-
-    /**
-     * 获取注解中对方法的描述信息 用于Controller层注解
-     * 
-     * @param log 日志
-     * @param operLog 操作日志
-     * @throws Exception
-     */
-    public void getControllerMethodDescription(JoinPoint joinPoint, Log log, SysOperLog operLog, Object jsonResult) throws Exception
-    {
-        // 设置action动作
-        operLog.setBusinessType(log.businessType().ordinal());
-        // 设置标题
-        operLog.setTitle(log.title());
-        // 设置操作人类别
-        operLog.setOperatorType(log.operatorType().ordinal());
-        // 是否需要保存request,参数和值
-        if (log.isSaveRequestData())
-        {
-            // 获取参数的信息,传入到数据库中。
-            setRequestValue(joinPoint, operLog);
-        }
-        // 是否需要保存response,参数和值
-        if (log.isSaveResponseData() && StringUtils.isNotNull(jsonResult))
-        {
-            operLog.setJsonResult(StringUtils.substring(JSON.toJSONString(jsonResult), 0, 2000));
-        }
-    }
-
-    /**
-     * 获取请求的参数,放到log中
-     * 
-     * @param operLog 操作日志
-     * @throws Exception 异常
-     */
-    private void setRequestValue(JoinPoint joinPoint, SysOperLog operLog) throws Exception
-    {
-        String requestMethod = operLog.getRequestMethod();
-        if (HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod))
-        {
-            String params = argsArrayToString(joinPoint.getArgs());
-            operLog.setOperParam(StringUtils.substring(params, 0, 2000));
-        }
-    }
-
-    /**
-     * 参数拼装
-     */
-    private String argsArrayToString(Object[] paramsArray)
-    {
-        String params = "";
-        if (paramsArray != null && paramsArray.length > 0)
-        {
-            for (Object o : paramsArray)
-            {
-                if (StringUtils.isNotNull(o) && !isFilterObject(o))
-                {
-                    try
-                    {
-                        Object jsonObj = JSON.toJSON(o);
-                        params += jsonObj.toString() + " ";
-                    }
-                    catch (Exception e)
-                    {
-                    }
-                }
-            }
-        }
-        return params.trim();
-    }
-
-    /**
-     * 判断是否需要过滤的对象。
-     * 
-     * @param o 对象信息。
-     * @return 如果是需要过滤的对象,则返回true;否则返回false。
-     */
-    @SuppressWarnings("rawtypes")
-    public boolean isFilterObject(final Object o)
-    {
-        Class<?> clazz = o.getClass();
-        if (clazz.isArray())
-        {
-            return clazz.getComponentType().isAssignableFrom(MultipartFile.class);
-        }
-        else if (Collection.class.isAssignableFrom(clazz))
-        {
-            Collection collection = (Collection) o;
-            for (Object value : collection)
-            {
-                return value instanceof MultipartFile;
-            }
-        }
-        else if (Map.class.isAssignableFrom(clazz))
-        {
-            Map map = (Map) o;
-            for (Object value : map.entrySet())
-            {
-                Map.Entry entry = (Map.Entry) value;
-                return entry.getValue() instanceof MultipartFile;
-            }
-        }
-        return o instanceof MultipartFile || o instanceof HttpServletRequest || o instanceof HttpServletResponse
-                || o instanceof BindingResult;
-    }
-}
+//package com.ruoyi.common.log.aspect;
+//
+//import java.util.Collection;
+//import java.util.Map;
+//import javax.servlet.http.HttpServletRequest;
+//import javax.servlet.http.HttpServletResponse;
+//
+//import com.usky.system.domain.SysOperLogVO;
+//import org.aspectj.lang.JoinPoint;
+//import org.aspectj.lang.annotation.AfterReturning;
+//import org.aspectj.lang.annotation.AfterThrowing;
+//import org.aspectj.lang.annotation.Aspect;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.http.HttpMethod;
+//import org.springframework.stereotype.Component;
+//import org.springframework.validation.BindingResult;
+//import org.springframework.web.multipart.MultipartFile;
+//import com.alibaba.fastjson.JSON;
+//import com.ruoyi.common.core.utils.ServletUtils;
+//import com.ruoyi.common.core.utils.StringUtils;
+//import com.ruoyi.common.core.utils.ip.IpUtils;
+//import com.ruoyi.common.log.annotation.Log;
+//import com.ruoyi.common.log.enums.BusinessStatus;
+//import com.ruoyi.common.log.service.AsyncLogService;
+//import com.ruoyi.common.security.utils.SecurityUtils;
+//
+///**
+// * 操作日志记录处理
+// *
+// * @author ruoyi
+// */
+//@Aspect
+//@Component
+//public class LogAspect
+//{
+//    private static final Logger log = LoggerFactory.getLogger(LogAspect.class);
+//
+//    @Autowired
+//    private AsyncLogService asyncLogService;
+//
+//    /**
+//     * 处理完请求后执行
+//     *
+//     * @param joinPoint 切点
+//     */
+//    @AfterReturning(pointcut = "@annotation(controllerLog)", returning = "jsonResult")
+//    public void doAfterReturning(JoinPoint joinPoint, Log controllerLog, Object jsonResult)
+//    {
+//        handleLog(joinPoint, controllerLog, null, jsonResult);
+//    }
+//
+//    /**
+//     * 拦截异常操作
+//     *
+//     * @param joinPoint 切点
+//     * @param e 异常
+//     */
+//    @AfterThrowing(value = "@annotation(controllerLog)", throwing = "e")
+//    public void doAfterThrowing(JoinPoint joinPoint, Log controllerLog, Exception e)
+//    {
+//        handleLog(joinPoint, controllerLog, e, null);
+//    }
+//
+//    protected void handleLog(final JoinPoint joinPoint, Log controllerLog, final Exception e, Object jsonResult)
+//    {
+//        try
+//        {
+//            // *========数据库日志=========*//
+//            SysOperLogVO operLog = new SysOperLogVO();
+//            operLog.setStatus(BusinessStatus.SUCCESS.ordinal());
+//            // 请求的地址
+//            String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
+//            operLog.setOperIp(ip);
+//            operLog.setOperUrl(ServletUtils.getRequest().getRequestURI());
+//            String username = SecurityUtils.getUsername();
+//            if (StringUtils.isNotBlank(username))
+//            {
+//                operLog.setOperName(username);
+//            }
+//
+//            if (e != null)
+//            {
+//                operLog.setStatus(BusinessStatus.FAIL.ordinal());
+//                operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 2000));
+//            }
+//            // 设置方法名称
+//            String className = joinPoint.getTarget().getClass().getName();
+//            String methodName = joinPoint.getSignature().getName();
+//            operLog.setMethod(className + "." + methodName + "()");
+//            // 设置请求方式
+//            operLog.setRequestMethod(ServletUtils.getRequest().getMethod());
+//            // 处理设置注解上的参数
+//            getControllerMethodDescription(joinPoint, controllerLog, operLog, jsonResult);
+//            // 保存数据库
+//            asyncLogService.saveSysLog(operLog);
+//        }
+//        catch (Exception exp)
+//        {
+//            // 记录本地异常日志
+//            log.error("==前置通知异常==");
+//            log.error("异常信息:{}", exp.getMessage());
+//            exp.printStackTrace();
+//        }
+//    }
+//
+//    /**
+//     * 获取注解中对方法的描述信息 用于Controller层注解
+//     *
+//     * @param log 日志
+//     * @param operLog 操作日志
+//     * @throws Exception
+//     */
+//    public void getControllerMethodDescription(JoinPoint joinPoint, Log log, SysOperLogVO operLog, Object jsonResult) throws Exception
+//    {
+//        // 设置action动作
+//        operLog.setBusinessType(log.businessType().ordinal());
+//        // 设置标题
+//        operLog.setTitle(log.title());
+//        // 设置操作人类别
+//        operLog.setOperatorType(log.operatorType().ordinal());
+//        // 是否需要保存request,参数和值
+//        if (log.isSaveRequestData())
+//        {
+//            // 获取参数的信息,传入到数据库中。
+//            setRequestValue(joinPoint, operLog);
+//        }
+//        // 是否需要保存response,参数和值
+//        if (log.isSaveResponseData() && StringUtils.isNotNull(jsonResult))
+//        {
+//            operLog.setJsonResult(StringUtils.substring(JSON.toJSONString(jsonResult), 0, 2000));
+//        }
+//    }
+//
+//    /**
+//     * 获取请求的参数,放到log中
+//     *
+//     * @param operLog 操作日志
+//     * @throws Exception 异常
+//     */
+//    private void setRequestValue(JoinPoint joinPoint, SysOperLogVO operLog) throws Exception
+//    {
+//        String requestMethod = operLog.getRequestMethod();
+//        if (HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod))
+//        {
+//            String params = argsArrayToString(joinPoint.getArgs());
+//            operLog.setOperParam(StringUtils.substring(params, 0, 2000));
+//        }
+//    }
+//
+//    /**
+//     * 参数拼装
+//     */
+//    private String argsArrayToString(Object[] paramsArray)
+//    {
+//        String params = "";
+//        if (paramsArray != null && paramsArray.length > 0)
+//        {
+//            for (Object o : paramsArray)
+//            {
+//                if (StringUtils.isNotNull(o) && !isFilterObject(o))
+//                {
+//                    try
+//                    {
+//                        Object jsonObj = JSON.toJSON(o);
+//                        params += jsonObj.toString() + " ";
+//                    }
+//                    catch (Exception e)
+//                    {
+//                    }
+//                }
+//            }
+//        }
+//        return params.trim();
+//    }
+//
+//    /**
+//     * 判断是否需要过滤的对象。
+//     *
+//     * @param o 对象信息。
+//     * @return 如果是需要过滤的对象,则返回true;否则返回false。
+//     */
+//    @SuppressWarnings("rawtypes")
+//    public boolean isFilterObject(final Object o)
+//    {
+//        Class<?> clazz = o.getClass();
+//        if (clazz.isArray())
+//        {
+//            return clazz.getComponentType().isAssignableFrom(MultipartFile.class);
+//        }
+//        else if (Collection.class.isAssignableFrom(clazz))
+//        {
+//            Collection collection = (Collection) o;
+//            for (Object value : collection)
+//            {
+//                return value instanceof MultipartFile;
+//            }
+//        }
+//        else if (Map.class.isAssignableFrom(clazz))
+//        {
+//            Map map = (Map) o;
+//            for (Object value : map.entrySet())
+//            {
+//                Map.Entry entry = (Map.Entry) value;
+//                return entry.getValue() instanceof MultipartFile;
+//            }
+//        }
+//        return o instanceof MultipartFile || o instanceof HttpServletRequest || o instanceof HttpServletResponse
+//                || o instanceof BindingResult;
+//    }
+//}

+ 29 - 29
base-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/service/AsyncLogService.java

@@ -1,29 +1,29 @@
-package com.ruoyi.common.log.service;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.annotation.Async;
-import org.springframework.stereotype.Service;
-import com.ruoyi.common.core.constant.SecurityConstants;
-import com.ruoyi.system.api.RemoteLogService;
-import com.ruoyi.system.api.domain.SysOperLog;
-
-/**
- * 异步调用日志服务
- * 
- * @author ruoyi
- */
-@Service
-public class AsyncLogService
-{
-    @Autowired
-    private RemoteLogService remoteLogService;
-
-    /**
-     * 保存系统日志记录
-     */
-    @Async
-    public void saveSysLog(SysOperLog sysOperLog)
-    {
-        remoteLogService.saveLog(sysOperLog, SecurityConstants.INNER);
-    }
-}
+//package com.ruoyi.common.log.service;
+//
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.scheduling.annotation.Async;
+//import org.springframework.stereotype.Service;
+//import com.ruoyi.common.core.constant.SecurityConstants;
+//import com.ruoyi.system.api.RemoteLogService;
+//import com.ruoyi.system.api.domain.SysOperLog;
+//
+///**
+// * 异步调用日志服务
+// *
+// * @author ruoyi
+// */
+//@Service
+//public class AsyncLogService
+//{
+//    @Autowired
+//    private RemoteLogService remoteLogService;
+//
+//    /**
+//     * 保存系统日志记录
+//     */
+//    @Async
+//    public void saveSysLog(SysOperLog sysOperLog)
+//    {
+//        remoteLogService.saveLog(sysOperLog, SecurityConstants.INNER);
+//    }
+//}

+ 2 - 2
base-common/ruoyi-common-redis/pom.xml

@@ -8,7 +8,7 @@
         <version>0.0.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
-    
+
     <artifactId>ruoyi-common-redis</artifactId>
 	
     <description>
@@ -25,7 +25,7 @@
         
         <!-- RuoYi Common Core-->
         <dependency>
-            <groupId>com.ruoyi</groupId>
+            <groupId>com.usky</groupId>
             <artifactId>ruoyi-common-core</artifactId>
         </dependency>
         

+ 1 - 1
base-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/configure/FastJson2JsonRedisSerializer.java

@@ -13,7 +13,7 @@ import java.nio.charset.Charset;
 
 /**
  * Redis使用FastJson序列化
- * 
+ *
  * @author ruoyi
  */
 public class FastJson2JsonRedisSerializer<T> implements RedisSerializer<T>

+ 1 - 1
base-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/configure/RedisConfig.java

@@ -15,7 +15,7 @@ import com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator
 
 /**
  * redis配置
- * 
+ *
  * @author ruoyi
  */
 @Configuration

+ 2 - 2
base-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/service/RedisService.java

@@ -15,7 +15,7 @@ import org.springframework.stereotype.Component;
 
 /**
  * spring redis 工具类
- * 
+ *
  * @author ruoyi
  **/
 @SuppressWarnings(value = { "unchecked", "rawtypes" })
@@ -245,7 +245,7 @@ public class RedisService
 
     /**
      * 获得缓存的基本对象列表
-     * 
+     *
      * @param pattern 字符串前缀
      * @return 对象列表
      */

+ 1 - 1
base-common/ruoyi-common-redis/src/main/resources/META-INF/spring.factories

@@ -2,4 +2,4 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
   com.ruoyi.common.redis.configure.RedisConfig,\
   com.ruoyi.common.redis.service.RedisService
 
-  
+

+ 9 - 4
base-common/ruoyi-common-security/pom.xml

@@ -7,7 +7,7 @@
         <version>0.0.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
-    
+
     <artifactId>ruoyi-common-security</artifactId>
 
     <description>
@@ -24,14 +24,19 @@
 
         <!-- RuoYi Api System -->
         <dependency>
-            <groupId>com.ruoyi</groupId>
+            <groupId>com.usky</groupId>
             <artifactId>service-system-api</artifactId>
         </dependency>
 
         <!-- RuoYi Common Redis-->
         <dependency>
-            <groupId>com.ruoyi</groupId>
-            <artifactId>ruoyi-common-redis</artifactId>
+            <groupId>com.usky</groupId>
+            <artifactId>ruoyi-common-core</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.usky</groupId>
+            <artifactId>usky-common-spring</artifactId>
         </dependency>
 
     </dependencies>

+ 2 - 1
base-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/auth/AuthLogic.java

@@ -3,6 +3,8 @@ package com.ruoyi.common.security.auth;
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.Set;
+
+import com.usky.system.model.LoginUser;
 import org.springframework.util.PatternMatchUtils;
 import com.ruoyi.common.core.exception.auth.NotLoginException;
 import com.ruoyi.common.core.exception.auth.NotPermissionException;
@@ -15,7 +17,6 @@ import com.ruoyi.common.security.annotation.RequiresPermissions;
 import com.ruoyi.common.security.annotation.RequiresRoles;
 import com.ruoyi.common.security.service.TokenService;
 import com.ruoyi.common.security.utils.SecurityUtils;
-import com.ruoyi.system.api.model.LoginUser;
 
 /**
  * Token 权限验证,逻辑实现类

+ 1 - 1
base-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/auth/AuthUtil.java

@@ -2,7 +2,7 @@ package com.ruoyi.common.security.auth;
 
 import com.ruoyi.common.security.annotation.RequiresPermissions;
 import com.ruoyi.common.security.annotation.RequiresRoles;
-import com.ruoyi.system.api.model.LoginUser;
+import com.usky.system.model.LoginUser;
 
 /**
  * Token 权限验证工具类

+ 136 - 136
base-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/handler/GlobalExceptionHandler.java

@@ -1,136 +1,136 @@
-package com.ruoyi.common.security.handler;
-
-import javax.servlet.http.HttpServletRequest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.validation.BindException;
-import org.springframework.web.HttpRequestMethodNotSupportedException;
-import org.springframework.web.bind.MethodArgumentNotValidException;
-import org.springframework.web.bind.annotation.ExceptionHandler;
-import org.springframework.web.bind.annotation.RestControllerAdvice;
-import com.ruoyi.common.core.constant.HttpStatus;
-import com.ruoyi.common.core.exception.DemoModeException;
-import com.ruoyi.common.core.exception.InnerAuthException;
-import com.ruoyi.common.core.exception.ServiceException;
-import com.ruoyi.common.core.exception.auth.NotPermissionException;
-import com.ruoyi.common.core.exception.auth.NotRoleException;
-import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-
-/**
- * 全局异常处理器
- * 
- * @author ruoyi
- */
-@RestControllerAdvice
-public class GlobalExceptionHandler
-{
-    private static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class);
-
-    /**
-     * 权限码异常
-     */
-    @ExceptionHandler(NotPermissionException.class)
-    public AjaxResult handleNotPermissionException(NotPermissionException e, HttpServletRequest request)
-    {
-        String requestURI = request.getRequestURI();
-        log.error("请求地址'{}',权限码校验失败'{}'", requestURI, e.getMessage());
-        return AjaxResult.error(HttpStatus.FORBIDDEN, "没有访问权限,请联系管理员授权");
-    }
-
-    /**
-     * 角色权限异常
-     */
-    @ExceptionHandler(NotRoleException.class)
-    public AjaxResult handleNotRoleException(NotRoleException e, HttpServletRequest request)
-    {
-        String requestURI = request.getRequestURI();
-        log.error("请求地址'{}',角色权限校验失败'{}'", requestURI, e.getMessage());
-        return AjaxResult.error(HttpStatus.FORBIDDEN, "没有访问权限,请联系管理员授权");
-    }
-
-    /**
-     * 请求方式不支持
-     */
-    @ExceptionHandler(HttpRequestMethodNotSupportedException.class)
-    public AjaxResult handleHttpRequestMethodNotSupported(HttpRequestMethodNotSupportedException e,
-            HttpServletRequest request)
-    {
-        String requestURI = request.getRequestURI();
-        log.error("请求地址'{}',不支持'{}'请求", requestURI, e.getMethod());
-        return AjaxResult.error(e.getMessage());
-    }
-
-    /**
-     * 业务异常
-     */
-    @ExceptionHandler(ServiceException.class)
-    public AjaxResult handleServiceException(ServiceException e, HttpServletRequest request)
-    {
-        log.error(e.getMessage(), e);
-        Integer code = e.getCode();
-        return StringUtils.isNotNull(code) ? AjaxResult.error(code, e.getMessage()) : AjaxResult.error(e.getMessage());
-    }
-
-    /**
-     * 拦截未知的运行时异常
-     */
-    @ExceptionHandler(RuntimeException.class)
-    public AjaxResult handleRuntimeException(RuntimeException e, HttpServletRequest request)
-    {
-        String requestURI = request.getRequestURI();
-        log.error("请求地址'{}',发生未知异常.", requestURI, e);
-        return AjaxResult.error(e.getMessage());
-    }
-
-    /**
-     * 系统异常
-     */
-    @ExceptionHandler(Exception.class)
-    public AjaxResult handleException(Exception e, HttpServletRequest request)
-    {
-        String requestURI = request.getRequestURI();
-        log.error("请求地址'{}',发生系统异常.", requestURI, e);
-        return AjaxResult.error(e.getMessage());
-    }
-
-    /**
-     * 自定义验证异常
-     */
-    @ExceptionHandler(BindException.class)
-    public AjaxResult handleBindException(BindException e)
-    {
-        log.error(e.getMessage(), e);
-        String message = e.getAllErrors().get(0).getDefaultMessage();
-        return AjaxResult.error(message);
-    }
-
-    /**
-     * 自定义验证异常
-     */
-    @ExceptionHandler(MethodArgumentNotValidException.class)
-    public Object handleMethodArgumentNotValidException(MethodArgumentNotValidException e)
-    {
-        log.error(e.getMessage(), e);
-        String message = e.getBindingResult().getFieldError().getDefaultMessage();
-        return AjaxResult.error(message);
-    }
-
-    /**
-     * 内部认证异常
-     */
-    @ExceptionHandler(InnerAuthException.class)
-    public AjaxResult handleInnerAuthException(InnerAuthException e)
-    {
-        return AjaxResult.error(e.getMessage());
-    }
-
-    /**
-     * 演示模式异常
-     */
-    @ExceptionHandler(DemoModeException.class)
-    public AjaxResult handleDemoModeException(DemoModeException e)
-    {
-        return AjaxResult.error("演示模式,不允许操作");
-    }
-}
+//package com.ruoyi.common.security.handler;
+//
+//import javax.servlet.http.HttpServletRequest;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.springframework.validation.BindException;
+//import org.springframework.web.HttpRequestMethodNotSupportedException;
+//import org.springframework.web.bind.MethodArgumentNotValidException;
+//import org.springframework.web.bind.annotation.ExceptionHandler;
+//import org.springframework.web.bind.annotation.RestControllerAdvice;
+//import com.ruoyi.common.core.constant.HttpStatus;
+//import com.ruoyi.common.core.exception.DemoModeException;
+//import com.ruoyi.common.core.exception.InnerAuthException;
+//import com.ruoyi.common.core.exception.ServiceException;
+//import com.ruoyi.common.core.exception.auth.NotPermissionException;
+//import com.ruoyi.common.core.exception.auth.NotRoleException;
+//import com.ruoyi.common.core.utils.StringUtils;
+//import com.ruoyi.common.core.web.domain.AjaxResult;
+//
+///**
+// * 全局异常处理器
+// *
+// * @author ruoyi
+// */
+//@RestControllerAdvice
+//public class GlobalExceptionHandler
+//{
+//    private static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class);
+//
+//    /**
+//     * 权限码异常
+//     */
+//    @ExceptionHandler(NotPermissionException.class)
+//    public AjaxResult handleNotPermissionException(NotPermissionException e, HttpServletRequest request)
+//    {
+//        String requestURI = request.getRequestURI();
+//        log.error("请求地址'{}',权限码校验失败'{}'", requestURI, e.getMessage());
+//        return AjaxResult.error(HttpStatus.FORBIDDEN, "没有访问权限,请联系管理员授权");
+//    }
+//
+//    /**
+//     * 角色权限异常
+//     */
+//    @ExceptionHandler(NotRoleException.class)
+//    public AjaxResult handleNotRoleException(NotRoleException e, HttpServletRequest request)
+//    {
+//        String requestURI = request.getRequestURI();
+//        log.error("请求地址'{}',角色权限校验失败'{}'", requestURI, e.getMessage());
+//        return AjaxResult.error(HttpStatus.FORBIDDEN, "没有访问权限,请联系管理员授权");
+//    }
+//
+//    /**
+//     * 请求方式不支持
+//     */
+//    @ExceptionHandler(HttpRequestMethodNotSupportedException.class)
+//    public AjaxResult handleHttpRequestMethodNotSupported(HttpRequestMethodNotSupportedException e,
+//            HttpServletRequest request)
+//    {
+//        String requestURI = request.getRequestURI();
+//        log.error("请求地址'{}',不支持'{}'请求", requestURI, e.getMethod());
+//        return AjaxResult.error(e.getMessage());
+//    }
+//
+//    /**
+//     * 业务异常
+//     */
+//    @ExceptionHandler(ServiceException.class)
+//    public AjaxResult handleServiceException(ServiceException e, HttpServletRequest request)
+//    {
+//        log.error(e.getMessage(), e);
+//        Integer code = e.getCode();
+//        return StringUtils.isNotNull(code) ? AjaxResult.error(code, e.getMessage()) : AjaxResult.error(e.getMessage());
+//    }
+//
+//    /**
+//     * 拦截未知的运行时异常
+//     */
+//    @ExceptionHandler(RuntimeException.class)
+//    public AjaxResult handleRuntimeException(RuntimeException e, HttpServletRequest request)
+//    {
+//        String requestURI = request.getRequestURI();
+//        log.error("请求地址'{}',发生未知异常.", requestURI, e);
+//        return AjaxResult.error(e.getMessage());
+//    }
+//
+//    /**
+//     * 系统异常
+//     */
+//    @ExceptionHandler(Exception.class)
+//    public AjaxResult handleException(Exception e, HttpServletRequest request)
+//    {
+//        String requestURI = request.getRequestURI();
+//        log.error("请求地址'{}',发生系统异常.", requestURI, e);
+//        return AjaxResult.error(e.getMessage());
+//    }
+//
+//    /**
+//     * 自定义验证异常
+//     */
+//    @ExceptionHandler(BindException.class)
+//    public AjaxResult handleBindException(BindException e)
+//    {
+//        log.error(e.getMessage(), e);
+//        String message = e.getAllErrors().get(0).getDefaultMessage();
+//        return AjaxResult.error(message);
+//    }
+//
+//    /**
+//     * 自定义验证异常
+//     */
+//    @ExceptionHandler(MethodArgumentNotValidException.class)
+//    public Object handleMethodArgumentNotValidException(MethodArgumentNotValidException e)
+//    {
+//        log.error(e.getMessage(), e);
+//        String message = e.getBindingResult().getFieldError().getDefaultMessage();
+//        return AjaxResult.error(message);
+//    }
+//
+//    /**
+//     * 内部认证异常
+//     */
+//    @ExceptionHandler(InnerAuthException.class)
+//    public AjaxResult handleInnerAuthException(InnerAuthException e)
+//    {
+//        return AjaxResult.error(e.getMessage());
+//    }
+//
+//    /**
+//     * 演示模式异常
+//     */
+//    @ExceptionHandler(DemoModeException.class)
+//    public AjaxResult handleDemoModeException(DemoModeException e)
+//    {
+//        return AjaxResult.error("演示模式,不允许操作");
+//    }
+//}

+ 1 - 1
base-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/interceptor/HeaderInterceptor.java

@@ -4,6 +4,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import com.ruoyi.common.core.utils.JwtUtils;
+import com.usky.system.model.LoginUser;
 import io.jsonwebtoken.Claims;
 import org.springframework.web.method.HandlerMethod;
 import org.springframework.web.servlet.AsyncHandlerInterceptor;
@@ -13,7 +14,6 @@ import com.ruoyi.common.core.utils.ServletUtils;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.security.auth.AuthUtil;
 import com.ruoyi.common.security.utils.SecurityUtils;
-import com.ruoyi.system.api.model.LoginUser;
 
 /**
  * 自定义请求头拦截器,将Header数据封装到线程变量中方便获取

+ 11 - 7
base-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/service/TokenService.java

@@ -4,6 +4,10 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
 import javax.servlet.http.HttpServletRequest;
+
+import com.ruoyi.common.core.utils.SpringUtils;
+import com.usky.common.spring.config.redis.RedisHelper;
+import com.usky.system.model.LoginUser;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import com.ruoyi.common.core.constant.CacheConstants;
@@ -13,9 +17,7 @@ import com.ruoyi.common.core.utils.ServletUtils;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.ip.IpUtils;
 import com.ruoyi.common.core.utils.uuid.IdUtils;
-import com.ruoyi.common.redis.service.RedisService;
 import com.ruoyi.common.security.utils.SecurityUtils;
-import com.ruoyi.system.api.model.LoginUser;
 
 /**
  * token验证处理
@@ -25,8 +27,10 @@ import com.ruoyi.system.api.model.LoginUser;
 @Component
 public class TokenService
 {
-    @Autowired
-    private RedisService redisService;
+
+    private RedisHelper redisService = SpringUtils.getBean(RedisHelper.class);
+
+
 
     protected static final long MILLIS_SECOND = 1000;
 
@@ -103,7 +107,7 @@ public class TokenService
             if (StringUtils.isNotEmpty(token))
             {
                 String userkey = JwtUtils.getUserKey(token);
-                user = redisService.getCacheObject(getTokenKey(userkey));
+                user = (LoginUser)redisService.get(getTokenKey(userkey));
                 return user;
             }
         }
@@ -132,7 +136,7 @@ public class TokenService
         if (StringUtils.isNotEmpty(token))
         {
             String userkey = JwtUtils.getUserKey(token);
-            redisService.deleteObject(getTokenKey(userkey));
+            redisService.delete(getTokenKey(userkey));
         }
     }
 
@@ -162,7 +166,7 @@ public class TokenService
         loginUser.setExpireTime(loginUser.getLoginTime() + expireTime * MILLIS_MINUTE);
         // 根据uuid将loginUser缓存
         String userKey = getTokenKey(loginUser.getToken());
-        redisService.setCacheObject(userKey, loginUser, expireTime, TimeUnit.MINUTES);
+        redisService.set(userKey, loginUser, expireTime, TimeUnit.MINUTES);
     }
 
     private String getTokenKey(String token)

+ 9 - 9
base-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/DictUtils.java

@@ -5,8 +5,8 @@ import java.util.List;
 import com.ruoyi.common.core.constant.Constants;
 import com.ruoyi.common.core.utils.SpringUtils;
 import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.common.redis.service.RedisService;
-import com.ruoyi.system.api.domain.SysDictData;
+import com.usky.common.spring.config.redis.RedisHelper;
+import com.usky.system.domain.SysDictDataVO;
 
 /**
  * 字典工具类
@@ -21,9 +21,9 @@ public class DictUtils
      * @param key 参数键
      * @param dictDatas 字典数据列表
      */
-    public static void setDictCache(String key, List<SysDictData> dictDatas)
+    public static void setDictCache(String key, List<SysDictDataVO> dictDatas)
     {
-        SpringUtils.getBean(RedisService.class).setCacheObject(getCacheKey(key), dictDatas);
+        SpringUtils.getBean(RedisHelper.class).set(getCacheKey(key), dictDatas);
     }
 
     /**
@@ -32,9 +32,9 @@ public class DictUtils
      * @param key 参数键
      * @return dictDatas 字典数据列表
      */
-    public static List<SysDictData> getDictCache(String key)
+    public static List<SysDictDataVO> getDictCache(String key)
     {
-        Object cacheObj = SpringUtils.getBean(RedisService.class).getCacheObject(getCacheKey(key));
+        Object cacheObj = SpringUtils.getBean(RedisHelper.class).get(getCacheKey(key));
         if (StringUtils.isNotNull(cacheObj))
         {
             return StringUtils.cast(cacheObj);
@@ -49,7 +49,7 @@ public class DictUtils
      */
     public static void removeDictCache(String key)
     {
-        SpringUtils.getBean(RedisService.class).deleteObject(getCacheKey(key));
+        SpringUtils.getBean(RedisHelper.class).delete(getCacheKey(key));
     }
 
     /**
@@ -57,8 +57,8 @@ public class DictUtils
      */
     public static void clearDictCache()
     {
-        Collection<String> keys = SpringUtils.getBean(RedisService.class).keys(Constants.SYS_DICT_KEY + "*");
-        SpringUtils.getBean(RedisService.class).deleteObject(keys);
+        Collection<String> keys = SpringUtils.getBean(RedisHelper.class).keys(Constants.SYS_DICT_KEY + "*");
+        SpringUtils.getBean(RedisHelper.class).delete(keys);
     }
 
     /**

+ 2 - 1
base-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/SecurityUtils.java

@@ -1,13 +1,14 @@
 package com.ruoyi.common.security.utils;
 
 import javax.servlet.http.HttpServletRequest;
+
+import com.usky.system.model.LoginUser;
 import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
 import com.ruoyi.common.core.constant.SecurityConstants;
 import com.ruoyi.common.core.constant.TokenConstants;
 import com.ruoyi.common.core.context.SecurityContextHolder;
 import com.ruoyi.common.core.utils.ServletUtils;
 import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.system.api.model.LoginUser;
 
 /**
  * 权限获取工具类

+ 1 - 2
base-common/ruoyi-common-security/src/main/resources/META-INF/spring.factories

@@ -2,5 +2,4 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
   com.ruoyi.common.security.config.WebMvcConfig,\
   com.ruoyi.common.security.service.TokenService,\
   com.ruoyi.common.security.aspect.PreAuthorizeAspect,\
-  com.ruoyi.common.security.aspect.InnerAuthAspect,\
-  com.ruoyi.common.security.handler.GlobalExceptionHandler
+  com.ruoyi.common.security.aspect.InnerAuthAspect

+ 1 - 1
base-common/ruoyi-common-swagger/pom.xml

@@ -8,7 +8,7 @@
         <version>0.0.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
-    
+
     <artifactId>ruoyi-common-swagger</artifactId>
 	
     <description>

+ 6 - 6
base-components/gateway/pom.xml

@@ -34,11 +34,11 @@
             <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
         </dependency>
 
-        <!-- SpringCloud Alibaba Sentinel -->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
-        </dependency>
+<!--        &lt;!&ndash; SpringCloud Alibaba Sentinel &ndash;&gt;-->
+<!--        <dependency>-->
+<!--            <groupId>com.alibaba.cloud</groupId>-->
+<!--            <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>-->
+<!--        </dependency>-->
 
         <!-- SpringCloud Alibaba Sentinel Gateway -->
         <dependency>
@@ -72,7 +72,7 @@
 
         <!-- RuoYi Common Redis-->
         <dependency>
-            <groupId>com.ruoyi</groupId>
+            <groupId>com.usky</groupId>
             <artifactId>ruoyi-common-redis</artifactId>
         </dependency>
 

+ 82 - 0
base-components/gateway/src/main/resources/application-dev.yml.bak

@@ -0,0 +1,82 @@
+spring:
+  redis:
+    host: usky-cloud-redis
+    port: 6379
+    password: uskyredis
+  cloud:
+    gateway:
+      discovery:
+        locator:
+          lowerCaseServiceId: true
+          enabled: true
+      routes:
+        # 认证中心
+        - id: service-auth
+          uri: lb://service-auth
+          predicates:
+            - Path=/auth/**
+          filters:
+            # 验证码处理
+            - CacheRequestFilter
+            - ValidateCodeFilter
+            - StripPrefix=1
+        # 代码生成
+        - id: service-gen
+          uri: lb://service-gen
+          predicates:
+            - Path=/code/**
+          filters:
+            - StripPrefix=1
+        # 定时任务
+        - id: service-job
+          uri: lb://service-job
+          predicates:
+            - Path=/schedule/**
+          filters:
+            - StripPrefix=1
+        # 系统模块
+        - id: service-system
+          uri: lb://service-system
+          predicates:
+            - Path=/system/**
+          filters:
+            - StripPrefix=1
+        # 文件服务
+        - id: service-file
+          uri: lb://service-file
+          predicates:
+            - Path=/file/**
+          filters:
+            - StripPrefix=1
+        - id: usky-demo
+          uri: lb://usky-demo
+          predicates:
+            - Path=/uskyDemo/**
+          filters:
+            - StripPrefix=1
+        - id: usky-backend
+          uri: lb://usky-backend
+          predicates:
+            - Path=/backend/**
+          filters:
+            - StripPrefix=1
+
+# 安全配置
+security:
+  # 验证码
+  captcha:
+    enabled: true
+    type: math
+  # 防止XSS攻击
+  xss:
+    enabled: true
+    excludeUrls:
+      - /system/notice
+  # 不校验白名单
+  ignore:
+    whites:
+      - /auth/logout
+      - /auth/login
+      - /auth/register
+      - /*/v2/api-docs
+      - /csrf

+ 0 - 10
base-components/gateway/src/main/resources/banner.txt

@@ -1,10 +0,0 @@
-Spring Boot Version: ${spring-boot.version}
-Spring Application Name: ${spring.application.name}
-                            _                        _                                 
-                           (_)                      | |                                
- _ __  _   _   ___   _   _  _  ______   __ _   __ _ | |_   ___ __      __  __ _  _   _ 
-| '__|| | | | / _ \ | | | || ||______| / _` | / _` || __| / _ \\ \ /\ / / / _` || | | |
-| |   | |_| || (_) || |_| || |        | (_| || (_| || |_ |  __/ \ V  V / | (_| || |_| |
-|_|    \__,_| \___/  \__, ||_|         \__, | \__,_| \__| \___|  \_/\_/   \__,_| \__, |
-                      __/ |             __/ |                                     __/ |
-                     |___/             |___/                                     |___/ 

+ 2 - 17
base-components/gateway/src/main/resources/bootstrap.yml

@@ -17,27 +17,12 @@ spring:
     nacos:
       discovery:
         # 服务注册地址
-        server-addr: usky-cloud-nacos:8848
+        server-addr: 172.16.120.165:8848
       config:
         # 配置中心地址
-        server-addr: usky-cloud-nacos:8848
+        server-addr: 172.16.120.165:8848
         # 配置文件格式
         file-extension: yml
         # 共享配置
         shared-configs:
           - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
-    sentinel:
-      # 取消控制台懒加载
-      eager: true
-      transport:
-        # 控制台地址
-        dashboard: 127.0.0.1:8718
-      # nacos配置持久化
-      datasource:
-        ds1:
-          nacos:
-            server-addr: 127.0.0.1:8848
-            dataId: sentinel-ruoyi-gateway
-            groupId: DEFAULT_GROUP
-            data-type: json
-            rule-type: flow

+ 0 - 2
base-modules/pom.xml

@@ -9,8 +9,6 @@
     <modelVersion>4.0.0</modelVersion>
 
     <modules>
-        <module>service-auth</module>
-        <module>service-system</module>
         <module>service-gen</module>
         <module>service-job</module>
         <module>service-file</module>

+ 0 - 74
base-modules/service-auth/pom.xml

@@ -1,74 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <groupId>com.usky</groupId>
-        <artifactId>base-modules</artifactId>
-        <version>0.0.1</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-    
-    <artifactId>service-auth</artifactId>
-	
-    <description>
-        service-auth认证授权中心
-    </description>
-    
-    <dependencies>
-        
-        <!-- SpringCloud Alibaba Nacos -->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
-        </dependency>
-        
-        <!-- SpringCloud Alibaba Nacos Config -->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
-        </dependency>
-        
-        <!-- SpringCloud Alibaba Sentinel -->
-<!--        <dependency>-->
-<!--            <groupId>com.alibaba.cloud</groupId>-->
-<!--            <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>-->
-<!--        </dependency>-->
-		
-        <!-- SpringBoot Web -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-        </dependency>
-        
-        <!-- SpringBoot Actuator -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-actuator</artifactId>
-        </dependency>
-		
-        <!-- RuoYi Common Security-->
-        <dependency>
-            <groupId>com.ruoyi</groupId>
-            <artifactId>ruoyi-common-security</artifactId>
-        </dependency>
-        
-    </dependencies>
-	
-    <build>
-        <finalName>${project.artifactId}</finalName>
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-   
-</project>

+ 0 - 21
base-modules/service-auth/src/main/java/com/ruoyi/auth/RuoYiAuthApplication.java

@@ -1,21 +0,0 @@
-package com.ruoyi.auth;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
-import com.ruoyi.common.security.annotation.EnableRyFeignClients;
-
-/**
- * 认证授权中心
- * 
- * @author ruoyi
- */
-@EnableRyFeignClients
-@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
-public class RuoYiAuthApplication
-{
-    public static void main(String[] args)
-    {
-        SpringApplication.run(RuoYiAuthApplication.class, args);
-    }
-}

+ 0 - 87
base-modules/service-auth/src/main/java/com/ruoyi/auth/controller/TokenController.java

@@ -1,87 +0,0 @@
-package com.ruoyi.auth.controller;
-
-import javax.servlet.http.HttpServletRequest;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.auth.form.LoginBody;
-import com.ruoyi.auth.form.RegisterBody;
-import com.ruoyi.auth.service.SysLoginService;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.core.utils.JwtUtils;
-import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.common.security.auth.AuthUtil;
-import com.ruoyi.common.security.service.TokenService;
-import com.ruoyi.common.security.utils.SecurityUtils;
-import com.ruoyi.system.api.model.LoginUser;
-
-/**
- * token 控制
- * 
- * @author ruoyi
- */
-@RestController
-public class TokenController
-{
-    @Autowired
-    private TokenService tokenService;
-
-    @Autowired
-    private SysLoginService sysLoginService;
-
-    @PostMapping("login")
-    public R<?> login(@RequestBody LoginBody form)
-    {
-        // 用户登录
-        LoginUser userInfo = sysLoginService.login(form.getUsername(), form.getPassword());
-        // 获取登录token
-        return R.ok(tokenService.createToken(userInfo));
-    }
-
-    @PostMapping("login1")
-    public R<?> login1(@RequestBody LoginBody form)
-    {
-        // 用户登录
-        LoginUser userInfo = sysLoginService.login(form.getUsername(), form.getPassword());
-        // 获取登录token
-        return R.ok(tokenService.createToken(userInfo));
-    }
-
-    @DeleteMapping("logout")
-    public R<?> logout(HttpServletRequest request)
-    {
-        String token = SecurityUtils.getToken(request);
-        if (StringUtils.isNotEmpty(token))
-        {
-            String username = JwtUtils.getUserName(token);
-            // 删除用户缓存记录
-            AuthUtil.logoutByToken(token);
-            // 记录用户退出日志
-            sysLoginService.logout(username);
-        }
-        return R.ok();
-    }
-
-    @PostMapping("refresh")
-    public R<?> refresh(HttpServletRequest request)
-    {
-        LoginUser loginUser = tokenService.getLoginUser(request);
-        if (StringUtils.isNotNull(loginUser))
-        {
-            // 刷新令牌有效期
-            tokenService.refreshToken(loginUser);
-            return R.ok();
-        }
-        return R.ok();
-    }
-
-    @PostMapping("register")
-    public R<?> register(@RequestBody RegisterBody registerBody)
-    {
-        // 用户注册
-        sysLoginService.register(registerBody.getUsername(), registerBody.getPassword());
-        return R.ok();
-    }
-}

+ 0 - 39
base-modules/service-auth/src/main/java/com/ruoyi/auth/form/LoginBody.java

@@ -1,39 +0,0 @@
-package com.ruoyi.auth.form;
-
-/**
- * 用户登录对象
- * 
- * @author ruoyi
- */
-public class LoginBody
-{
-    /**
-     * 用户名
-     */
-    private String username;
-
-    /**
-     * 用户密码
-     */
-    private String password;
-
-    public String getUsername()
-    {
-        return username;
-    }
-
-    public void setUsername(String username)
-    {
-        this.username = username;
-    }
-
-    public String getPassword()
-    {
-        return password;
-    }
-
-    public void setPassword(String password)
-    {
-        this.password = password;
-    }
-}

+ 0 - 11
base-modules/service-auth/src/main/java/com/ruoyi/auth/form/RegisterBody.java

@@ -1,11 +0,0 @@
-package com.ruoyi.auth.form;
-
-/**
- * 用户注册对象
- * 
- * @author ruoyi
- */
-public class RegisterBody extends LoginBody
-{
-
-}

+ 0 - 160
base-modules/service-auth/src/main/java/com/ruoyi/auth/service/SysLoginService.java

@@ -1,160 +0,0 @@
-package com.ruoyi.auth.service;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import com.ruoyi.common.core.constant.Constants;
-import com.ruoyi.common.core.constant.SecurityConstants;
-import com.ruoyi.common.core.constant.UserConstants;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.core.enums.UserStatus;
-import com.ruoyi.common.core.exception.ServiceException;
-import com.ruoyi.common.core.utils.ServletUtils;
-import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.common.core.utils.ip.IpUtils;
-import com.ruoyi.common.security.utils.SecurityUtils;
-import com.ruoyi.system.api.RemoteLogService;
-import com.ruoyi.system.api.RemoteUserService;
-import com.ruoyi.system.api.domain.SysLogininfor;
-import com.ruoyi.system.api.domain.SysUser;
-import com.ruoyi.system.api.model.LoginUser;
-
-/**
- * 登录校验方法
- * 
- * @author ruoyi
- */
-@Component
-public class SysLoginService
-{
-    @Autowired
-    private RemoteLogService remoteLogService;
-
-    @Autowired
-    private RemoteUserService remoteUserService;
-
-    /**
-     * 登录
-     */
-    public LoginUser login(String username, String password)
-    {
-        // 用户名或密码为空 错误
-        if (StringUtils.isAnyBlank(username, password))
-        {
-            recordLogininfor(username, Constants.LOGIN_FAIL, "用户/密码必须填写");
-            throw new ServiceException("用户/密码必须填写");
-        }
-        // 密码如果不在指定范围内 错误
-        if (password.length() < UserConstants.PASSWORD_MIN_LENGTH
-                || password.length() > UserConstants.PASSWORD_MAX_LENGTH)
-        {
-            recordLogininfor(username, Constants.LOGIN_FAIL, "用户密码不在指定范围");
-            throw new ServiceException("用户密码不在指定范围");
-        }
-        // 用户名不在指定范围内 错误
-        if (username.length() < UserConstants.USERNAME_MIN_LENGTH
-                || username.length() > UserConstants.USERNAME_MAX_LENGTH)
-        {
-            recordLogininfor(username, Constants.LOGIN_FAIL, "用户名不在指定范围");
-            throw new ServiceException("用户名不在指定范围");
-        }
-
-        // 查询用户信息
-        R<LoginUser> userResult = remoteUserService.getUserInfo(username, SecurityConstants.INNER);
-
-        if (R.FAIL == userResult.getCode())
-        {
-            throw new ServiceException(userResult.getMsg());
-        }
-
-        if (StringUtils.isNull(userResult) || StringUtils.isNull(userResult.getData()))
-        {
-            recordLogininfor(username, Constants.LOGIN_FAIL, "登录用户不存在");
-            throw new ServiceException("登录用户:" + username + " 不存在");
-        }
-        LoginUser userInfo = userResult.getData();
-        SysUser user = userResult.getData().getSysUser();
-        if (UserStatus.DELETED.getCode().equals(user.getDelFlag()))
-        {
-            recordLogininfor(username, Constants.LOGIN_FAIL, "对不起,您的账号已被删除");
-            throw new ServiceException("对不起,您的账号:" + username + " 已被删除");
-        }
-        if (UserStatus.DISABLE.getCode().equals(user.getStatus()))
-        {
-            recordLogininfor(username, Constants.LOGIN_FAIL, "用户已停用,请联系管理员");
-            throw new ServiceException("对不起,您的账号:" + username + " 已停用");
-        }
-        if (!SecurityUtils.matchesPassword(password, user.getPassword()))
-        {
-            recordLogininfor(username, Constants.LOGIN_FAIL, "用户密码错误");
-            throw new ServiceException("用户不存在/密码错误");
-        }
-        recordLogininfor(username, Constants.LOGIN_SUCCESS, "登录成功");
-        return userInfo;
-    }
-
-    public void logout(String loginName)
-    {
-        recordLogininfor(loginName, Constants.LOGOUT, "退出成功");
-    }
-
-    /**
-     * 注册
-     */
-    public void register(String username, String password)
-    {
-        // 用户名或密码为空 错误
-        if (StringUtils.isAnyBlank(username, password))
-        {
-            throw new ServiceException("用户/密码必须填写");
-        }
-        if (username.length() < UserConstants.USERNAME_MIN_LENGTH
-                || username.length() > UserConstants.USERNAME_MAX_LENGTH)
-        {
-            throw new ServiceException("账户长度必须在2到20个字符之间");
-        }
-        if (password.length() < UserConstants.PASSWORD_MIN_LENGTH
-                || password.length() > UserConstants.PASSWORD_MAX_LENGTH)
-        {
-            throw new ServiceException("密码长度必须在5到20个字符之间");
-        }
-
-        // 注册用户信息
-        SysUser sysUser = new SysUser();
-        sysUser.setUserName(username);
-        sysUser.setNickName(username);
-        sysUser.setPassword(SecurityUtils.encryptPassword(password));
-        R<?> registerResult = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
-
-        if (R.FAIL == registerResult.getCode())
-        {
-            throw new ServiceException(registerResult.getMsg());
-        }
-        recordLogininfor(username, Constants.REGISTER, "注册成功");
-    }
-
-    /**
-     * 记录登录信息
-     * 
-     * @param username 用户名
-     * @param status 状态
-     * @param message 消息内容
-     * @return
-     */
-    public void recordLogininfor(String username, String status, String message)
-    {
-        SysLogininfor logininfor = new SysLogininfor();
-        logininfor.setUserName(username);
-        logininfor.setIpaddr(IpUtils.getIpAddr(ServletUtils.getRequest()));
-        logininfor.setMsg(message);
-        // 日志状态
-        if (StringUtils.equalsAny(status, Constants.LOGIN_SUCCESS, Constants.LOGOUT, Constants.REGISTER))
-        {
-            logininfor.setStatus(Constants.LOGIN_SUCCESS_STATUS);
-        }
-        else if (Constants.LOGIN_FAIL.equals(status))
-        {
-            logininfor.setStatus(Constants.LOGIN_FAIL_STATUS);
-        }
-        remoteLogService.saveLogininfor(logininfor, SecurityConstants.INNER);
-    }
-}

+ 0 - 10
base-modules/service-auth/src/main/resources/banner.txt

@@ -1,10 +0,0 @@
-Spring Boot Version: ${spring-boot.version}
-Spring Application Name: ${spring.application.name}
-                            _                        _    _     
-                           (_)                      | |  | |    
- _ __  _   _   ___   _   _  _  ______   __ _  _   _ | |_ | |__  
-| '__|| | | | / _ \ | | | || ||______| / _` || | | || __|| '_ \ 
-| |   | |_| || (_) || |_| || |        | (_| || |_| || |_ | | | |
-|_|    \__,_| \___/  \__, ||_|         \__,_| \__,_| \__||_| |_|
-                      __/ |                                     
-                     |___/                                      

+ 0 - 25
base-modules/service-auth/src/main/resources/bootstrap.yml

@@ -1,25 +0,0 @@
-# Tomcat
-server: 
-  port: 9200
-
-# Spring
-spring: 
-  application:
-    # 应用名称
-    name: service-auth
-  profiles:
-    # 环境配置
-    active: dev
-  cloud:
-    nacos:
-      discovery:
-        # 服务注册地址
-        server-addr: usky-cloud-nacos:8848
-      config:
-        # 配置中心地址
-        server-addr: usky-cloud-nacos:8848
-        # 配置文件格式
-        file-extension: yml
-        # 共享配置
-        shared-configs:
-          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}

+ 0 - 74
base-modules/service-auth/src/main/resources/logback.xml

@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration scan="true" scanPeriod="60 seconds" debug="false">
-    <!-- 日志存放路径 -->
-	<property name="log.path" value="/var/log/uskycloud/auth" />
-   <!-- 日志输出格式 -->
-	<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
-
-    <!-- 控制台输出 -->
-	<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
-		<encoder>
-			<pattern>${log.pattern}</pattern>
-		</encoder>
-	</appender>
-
-    <!-- 系统日志输出 -->
-	<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
-	    <file>${log.path}/info.log</file>
-        <!-- 循环政策:基于时间创建日志文件 -->
-		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
-            <!-- 日志文件名格式 -->
-			<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
-			<!-- 日志最大的历史 60天 -->
-			<maxHistory>60</maxHistory>
-		</rollingPolicy>
-		<encoder>
-			<pattern>${log.pattern}</pattern>
-		</encoder>
-		<filter class="ch.qos.logback.classic.filter.LevelFilter">
-            <!-- 过滤的级别 -->
-            <level>INFO</level>
-            <!-- 匹配时的操作:接收(记录) -->
-            <onMatch>ACCEPT</onMatch>
-            <!-- 不匹配时的操作:拒绝(不记录) -->
-            <onMismatch>DENY</onMismatch>
-        </filter>
-	</appender>
-
-    <appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
-	    <file>${log.path}/error.log</file>
-        <!-- 循环政策:基于时间创建日志文件 -->
-        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
-            <!-- 日志文件名格式 -->
-            <fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
-			<!-- 日志最大的历史 60天 -->
-			<maxHistory>60</maxHistory>
-        </rollingPolicy>
-        <encoder>
-            <pattern>${log.pattern}</pattern>
-        </encoder>
-        <filter class="ch.qos.logback.classic.filter.LevelFilter">
-            <!-- 过滤的级别 -->
-            <level>ERROR</level>
-			<!-- 匹配时的操作:接收(记录) -->
-            <onMatch>ACCEPT</onMatch>
-			<!-- 不匹配时的操作:拒绝(不记录) -->
-            <onMismatch>DENY</onMismatch>
-        </filter>
-    </appender>
-
-    <!-- 系统模块日志级别控制  -->
-	<logger name="com.ruoyi" level="info" />
-	<!-- Spring日志级别控制  -->
-	<logger name="org.springframework" level="warn" />
-
-	<root level="info">
-		<appender-ref ref="console" />
-	</root>
-	
-	<!--系统操作日志-->
-    <root level="info">
-        <appender-ref ref="file_info" />
-        <appender-ref ref="file_error" />
-    </root>
-</configuration>

+ 2 - 2
base-modules/service-file/pom.xml

@@ -56,13 +56,13 @@
         
         <!-- RuoYi Api System -->
         <dependency>
-            <groupId>com.ruoyi</groupId>
+            <groupId>com.usky</groupId>
             <artifactId>service-system-api</artifactId>
         </dependency>
         
         <!-- RuoYi Common Swagger -->
         <dependency>
-            <groupId>com.ruoyi</groupId>
+            <groupId>com.usky</groupId>
             <artifactId>ruoyi-common-swagger</artifactId>
         </dependency>
         

+ 48 - 48
base-modules/service-file/src/main/java/com/ruoyi/file/controller/SysFileController.java

@@ -1,48 +1,48 @@
-package com.ruoyi.file.controller;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.core.utils.file.FileUtils;
-import com.ruoyi.file.service.ISysFileService;
-import com.ruoyi.system.api.domain.SysFile;
-
-/**
- * 文件请求处理
- * 
- * @author ruoyi
- */
-@RestController
-public class SysFileController
-{
-    private static final Logger log = LoggerFactory.getLogger(SysFileController.class);
-
-    @Autowired
-    private ISysFileService sysFileService;
-
-    /**
-     * 文件上传请求
-     */
-    @PostMapping("upload")
-    public R<SysFile> upload(MultipartFile file)
-    {
-        try
-        {
-            // 上传并返回访问地址
-            String url = sysFileService.uploadFile(file);
-            SysFile sysFile = new SysFile();
-            sysFile.setName(FileUtils.getName(url));
-            sysFile.setUrl(url);
-            return R.ok(sysFile);
-        }
-        catch (Exception e)
-        {
-            log.error("上传文件失败", e);
-            return R.fail(e.getMessage());
-        }
-    }
-}
+//package com.ruoyi.file.controller;
+//
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.web.bind.annotation.PostMapping;
+//import org.springframework.web.bind.annotation.RestController;
+//import org.springframework.web.multipart.MultipartFile;
+//import com.ruoyi.common.core.domain.R;
+//import com.ruoyi.common.core.utils.file.FileUtils;
+//import com.ruoyi.file.service.ISysFileService;
+//import com.ruoyi.system.api.domain.SysFile;
+//
+///**
+// * 文件请求处理
+// *
+// * @author ruoyi
+// */
+//@RestController
+//public class SysFileController
+//{
+//    private static final Logger log = LoggerFactory.getLogger(SysFileController.class);
+//
+//    @Autowired
+//    private ISysFileService sysFileService;
+//
+//    /**
+//     * 文件上传请求
+//     */
+//    @PostMapping("upload")
+//    public R<SysFile> upload(MultipartFile file)
+//    {
+//        try
+//        {
+//            // 上传并返回访问地址
+//            String url = sysFileService.uploadFile(file);
+//            SysFile sysFile = new SysFile();
+//            sysFile.setName(FileUtils.getName(url));
+//            sysFile.setUrl(url);
+//            return R.ok(sysFile);
+//        }
+//        catch (Exception e)
+//        {
+//            log.error("上传文件失败", e);
+//            return R.fail(e.getMessage());
+//        }
+//    }
+//}

+ 50 - 50
base-modules/service-file/src/main/java/com/ruoyi/file/service/LocalSysFileServiceImpl.java

@@ -1,50 +1,50 @@
-package com.ruoyi.file.service;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Primary;
-import org.springframework.stereotype.Service;
-import org.springframework.web.multipart.MultipartFile;
-import com.ruoyi.file.utils.FileUploadUtils;
-
-/**
- * 本地文件存储
- * 
- * @author ruoyi
- */
-@Primary
-@Service
-public class LocalSysFileServiceImpl implements ISysFileService
-{
-    /**
-     * 资源映射路径 前缀
-     */
-    @Value("${file.prefix}")
-    public String localFilePrefix;
-
-    /**
-     * 域名或本机访问地址
-     */
-    @Value("${file.domain}")
-    public String domain;
-    
-    /**
-     * 上传文件存储在本地的根路径
-     */
-    @Value("${file.path}")
-    private String localFilePath;
-
-    /**
-     * 本地文件上传接口
-     * 
-     * @param file 上传的文件
-     * @return 访问地址
-     * @throws Exception
-     */
-    @Override
-    public String uploadFile(MultipartFile file) throws Exception
-    {
-        String name = FileUploadUtils.upload(localFilePath, file);
-        String url = domain + localFilePrefix + name;
-        return url;
-    }
-}
+//package com.ruoyi.file.service;
+//
+//import org.springframework.beans.factory.annotation.Value;
+//import org.springframework.context.annotation.Primary;
+//import org.springframework.stereotype.Service;
+//import org.springframework.web.multipart.MultipartFile;
+//import com.ruoyi.file.utils.FileUploadUtils;
+//
+///**
+// * 本地文件存储
+// *
+// * @author ruoyi
+// */
+//@Primary
+//@Service
+//public class LocalSysFileServiceImpl implements ISysFileService
+//{
+//    /**
+//     * 资源映射路径 前缀
+//     */
+//    @Value("${file.prefix}")
+//    public String localFilePrefix;
+//
+//    /**
+//     * 域名或本机访问地址
+//     */
+//    @Value("${file.domain}")
+//    public String domain;
+//
+//    /**
+//     * 上传文件存储在本地的根路径
+//     */
+//    @Value("${file.path}")
+//    private String localFilePath;
+//
+//    /**
+//     * 本地文件上传接口
+//     *
+//     * @param file 上传的文件
+//     * @return 访问地址
+//     * @throws Exception
+//     */
+//    @Override
+//    public String uploadFile(MultipartFile file) throws Exception
+//    {
+//        String name = FileUploadUtils.upload(localFilePath, file);
+//        String url = domain + localFilePrefix + name;
+//        return url;
+//    }
+//}

+ 45 - 45
base-modules/service-file/src/main/java/com/ruoyi/file/service/MinioSysFileServiceImpl.java

@@ -1,45 +1,45 @@
-package com.ruoyi.file.service;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.web.multipart.MultipartFile;
-import com.ruoyi.file.config.MinioConfig;
-import com.ruoyi.file.utils.FileUploadUtils;
-import io.minio.MinioClient;
-import io.minio.PutObjectArgs;
-
-/**
- * Minio 文件存储
- * 
- * @author ruoyi
- */
-@Service
-public class MinioSysFileServiceImpl implements ISysFileService
-{
-    @Autowired
-    private MinioConfig minioConfig;
-
-    @Autowired
-    private MinioClient client;
-
-    /**
-     * 本地文件上传接口
-     * 
-     * @param file 上传的文件
-     * @return 访问地址
-     * @throws Exception
-     */
-    @Override
-    public String uploadFile(MultipartFile file) throws Exception
-    {
-        String fileName = FileUploadUtils.extractFilename(file);
-        PutObjectArgs args = PutObjectArgs.builder()
-                .bucket(minioConfig.getBucketName())
-                .object(fileName)
-                .stream(file.getInputStream(), file.getSize(), -1)
-                .contentType(file.getContentType())
-                .build();
-        client.putObject(args);
-        return minioConfig.getUrl() + "/" + minioConfig.getBucketName() + "/" + fileName;
-    }
-}
+//package com.ruoyi.file.service;
+//
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Service;
+//import org.springframework.web.multipart.MultipartFile;
+//import com.ruoyi.file.config.MinioConfig;
+//import com.ruoyi.file.utils.FileUploadUtils;
+//import io.minio.MinioClient;
+//import io.minio.PutObjectArgs;
+//
+///**
+// * Minio 文件存储
+// *
+// * @author ruoyi
+// */
+//@Service
+//public class MinioSysFileServiceImpl implements ISysFileService
+//{
+//    @Autowired
+//    private MinioConfig minioConfig;
+//
+//    @Autowired
+//    private MinioClient client;
+//
+//    /**
+//     * 本地文件上传接口
+//     *
+//     * @param file 上传的文件
+//     * @return 访问地址
+//     * @throws Exception
+//     */
+//    @Override
+//    public String uploadFile(MultipartFile file) throws Exception
+//    {
+//        String fileName = FileUploadUtils.extractFilename(file);
+//        PutObjectArgs args = PutObjectArgs.builder()
+//                .bucket(minioConfig.getBucketName())
+//                .object(fileName)
+//                .stream(file.getInputStream(), file.getSize(), -1)
+//                .contentType(file.getContentType())
+//                .build();
+//        client.putObject(args);
+//        return minioConfig.getUrl() + "/" + minioConfig.getBucketName() + "/" + fileName;
+//    }
+//}

+ 174 - 179
base-modules/service-file/src/main/java/com/ruoyi/file/utils/FileUploadUtils.java

@@ -5,191 +5,186 @@ import java.io.IOException;
 import java.nio.file.Paths;
 import java.util.Objects;
 import org.apache.commons.io.FilenameUtils;
+import org.springframework.util.MimeTypeUtils;
 import org.springframework.web.multipart.MultipartFile;
-import com.ruoyi.common.core.exception.file.FileNameLengthLimitExceededException;
-import com.ruoyi.common.core.exception.file.FileSizeLimitExceededException;
-import com.ruoyi.common.core.exception.file.InvalidExtensionException;
-import com.ruoyi.common.core.utils.DateUtils;
-import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.common.core.utils.file.MimeTypeUtils;
-import com.ruoyi.common.core.utils.uuid.Seq;
+
 
 /**
  * 文件上传工具类
- * 
+ *
  * @author ruoyi
  */
 public class FileUploadUtils
 {
-    /**
-     * 默认大小 50M
-     */
-    public static final long DEFAULT_MAX_SIZE = 50 * 1024 * 1024;
-
-    /**
-     * 默认的文件名最大长度 100
-     */
-    public static final int DEFAULT_FILE_NAME_LENGTH = 100;
-
-    /**
-     * 根据文件路径上传
-     *
-     * @param baseDir 相对应用的基目录
-     * @param file 上传的文件
-     * @return 文件名称
-     * @throws IOException
-     */
-    public static final String upload(String baseDir, MultipartFile file) throws IOException
-    {
-        try
-        {
-            return upload(baseDir, file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION);
-        }
-        catch (Exception e)
-        {
-            throw new IOException(e.getMessage(), e);
-        }
-    }
-
-    /**
-     * 文件上传
-     *
-     * @param baseDir 相对应用的基目录
-     * @param file 上传的文件
-     * @param allowedExtension 上传文件类型
-     * @return 返回上传成功的文件名
-     * @throws FileSizeLimitExceededException 如果超出最大大小
-     * @throws FileNameLengthLimitExceededException 文件名太长
-     * @throws IOException 比如读写文件出错时
-     * @throws InvalidExtensionException 文件校验异常
-     */
-    public static final String upload(String baseDir, MultipartFile file, String[] allowedExtension)
-            throws FileSizeLimitExceededException, IOException, FileNameLengthLimitExceededException,
-            InvalidExtensionException
-    {
-        int fileNamelength = Objects.requireNonNull(file.getOriginalFilename()).length();
-        if (fileNamelength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH)
-        {
-            throw new FileNameLengthLimitExceededException(FileUploadUtils.DEFAULT_FILE_NAME_LENGTH);
-        }
-
-        assertAllowed(file, allowedExtension);
-
-        String fileName = extractFilename(file);
-
-        String absPath = getAbsoluteFile(baseDir, fileName).getAbsolutePath();
-        file.transferTo(Paths.get(absPath));
-        return getPathFileName(fileName);
-    }
-
-    /**
-     * 编码文件名
-     */
-    public static final String extractFilename(MultipartFile file)
-    {
-        return StringUtils.format("{}/{}_{}.{}", DateUtils.datePath(),
-                FilenameUtils.getBaseName(file.getOriginalFilename()), Seq.getId(Seq.uploadSeqType), getExtension(file));
-    }
-
-    private static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException
-    {
-        File desc = new File(uploadDir + File.separator + fileName);
-
-        if (!desc.exists())
-        {
-            if (!desc.getParentFile().exists())
-            {
-                desc.getParentFile().mkdirs();
-            }
-        }
-        return desc.isAbsolute() ? desc : desc.getAbsoluteFile();
-    }
-
-    private static final String getPathFileName(String fileName) throws IOException
-    {
-        String pathFileName = "/" + fileName;
-        return pathFileName;
-    }
-
-    /**
-     * 文件大小校验
-     *
-     * @param file 上传的文件
-     * @throws FileSizeLimitExceededException 如果超出最大大小
-     * @throws InvalidExtensionException 文件校验异常
-     */
-    public static final void assertAllowed(MultipartFile file, String[] allowedExtension)
-            throws FileSizeLimitExceededException, InvalidExtensionException
-    {
-        long size = file.getSize();
-        if (size > DEFAULT_MAX_SIZE)
-        {
-            throw new FileSizeLimitExceededException(DEFAULT_MAX_SIZE / 1024 / 1024);
-        }
-
-        String fileName = file.getOriginalFilename();
-        String extension = getExtension(file);
-        if (allowedExtension != null && !isAllowedExtension(extension, allowedExtension))
-        {
-            if (allowedExtension == MimeTypeUtils.IMAGE_EXTENSION)
-            {
-                throw new InvalidExtensionException.InvalidImageExtensionException(allowedExtension, extension,
-                        fileName);
-            }
-            else if (allowedExtension == MimeTypeUtils.FLASH_EXTENSION)
-            {
-                throw new InvalidExtensionException.InvalidFlashExtensionException(allowedExtension, extension,
-                        fileName);
-            }
-            else if (allowedExtension == MimeTypeUtils.MEDIA_EXTENSION)
-            {
-                throw new InvalidExtensionException.InvalidMediaExtensionException(allowedExtension, extension,
-                        fileName);
-            }
-            else if (allowedExtension == MimeTypeUtils.VIDEO_EXTENSION)
-            {
-                throw new InvalidExtensionException.InvalidVideoExtensionException(allowedExtension, extension,
-                        fileName);
-            }
-            else
-            {
-                throw new InvalidExtensionException(allowedExtension, extension, fileName);
-            }
-        }
-    }
-
-    /**
-     * 判断MIME类型是否是允许的MIME类型
-     *
-     * @param extension 上传文件类型
-     * @param allowedExtension 允许上传文件类型
-     * @return true/false
-     */
-    public static final boolean isAllowedExtension(String extension, String[] allowedExtension)
-    {
-        for (String str : allowedExtension)
-        {
-            if (str.equalsIgnoreCase(extension))
-            {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * 获取文件名的后缀
-     * 
-     * @param file 表单文件
-     * @return 后缀名
-     */
-    public static final String getExtension(MultipartFile file)
-    {
-        String extension = FilenameUtils.getExtension(file.getOriginalFilename());
-        if (StringUtils.isEmpty(extension))
-        {
-            extension = MimeTypeUtils.getExtension(Objects.requireNonNull(file.getContentType()));
-        }
-        return extension;
-    }
+//    /**
+//     * 默认大小 50M
+//     */
+//    public static final long DEFAULT_MAX_SIZE = 50 * 1024 * 1024;
+//
+//    /**
+//     * 默认的文件名最大长度 100
+//     */
+//    public static final int DEFAULT_FILE_NAME_LENGTH = 100;
+//
+//    /**
+//     * 根据文件路径上传
+//     *
+//     * @param baseDir 相对应用的基目录
+//     * @param file 上传的文件
+//     * @return 文件名称
+//     * @throws IOException
+//     */
+//    public static final String upload(String baseDir, MultipartFile file) throws IOException
+//    {
+//        try
+//        {
+//            return upload(baseDir, file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION);
+//        }
+//        catch (Exception e)
+//        {
+//            throw new IOException(e.getMessage(), e);
+//        }
+//    }
+//
+//    /**
+//     * 文件上传
+//     *
+//     * @param baseDir 相对应用的基目录
+//     * @param file 上传的文件
+//     * @param allowedExtension 上传文件类型
+//     * @return 返回上传成功的文件名
+//     * @throws FileSizeLimitExceededException 如果超出最大大小
+//     * @throws FileNameLengthLimitExceededException 文件名太长
+//     * @throws IOException 比如读写文件出错时
+//     * @throws InvalidExtensionException 文件校验异常
+//     */
+//    public static final String upload(String baseDir, MultipartFile file, String[] allowedExtension)
+//            throws FileSizeLimitExceededException, IOException, FileNameLengthLimitExceededException,
+//            InvalidExtensionException
+//    {
+//        int fileNamelength = Objects.requireNonNull(file.getOriginalFilename()).length();
+//        if (fileNamelength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH)
+//        {
+//            throw new FileNameLengthLimitExceededException(FileUploadUtils.DEFAULT_FILE_NAME_LENGTH);
+//        }
+//
+//        assertAllowed(file, allowedExtension);
+//
+//        String fileName = extractFilename(file);
+//
+//        String absPath = getAbsoluteFile(baseDir, fileName).getAbsolutePath();
+//        file.transferTo(Paths.get(absPath));
+//        return getPathFileName(fileName);
+//    }
+//
+//    /**
+//     * 编码文件名
+//     */
+//    public static final String extractFilename(MultipartFile file)
+//    {
+//        return StringUtils.format("{}/{}_{}.{}", DateUtils.datePath(),
+//                FilenameUtils.getBaseName(file.getOriginalFilename()), Seq.getId(Seq.uploadSeqType), getExtension(file));
+//    }
+//
+//    private static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException
+//    {
+//        File desc = new File(uploadDir + File.separator + fileName);
+//
+//        if (!desc.exists())
+//        {
+//            if (!desc.getParentFile().exists())
+//            {
+//                desc.getParentFile().mkdirs();
+//            }
+//        }
+//        return desc.isAbsolute() ? desc : desc.getAbsoluteFile();
+//    }
+//
+//    private static final String getPathFileName(String fileName) throws IOException
+//    {
+//        String pathFileName = "/" + fileName;
+//        return pathFileName;
+//    }
+//
+//    /**
+//     * 文件大小校验
+//     *
+//     * @param file 上传的文件
+//     * @throws FileSizeLimitExceededException 如果超出最大大小
+//     * @throws InvalidExtensionException 文件校验异常
+//     */
+//    public static final void assertAllowed(MultipartFile file, String[] allowedExtension)
+//            throws FileSizeLimitExceededException, InvalidExtensionException
+//    {
+//        long size = file.getSize();
+//        if (size > DEFAULT_MAX_SIZE)
+//        {
+//            throw new FileSizeLimitExceededException(DEFAULT_MAX_SIZE / 1024 / 1024);
+//        }
+//
+//        String fileName = file.getOriginalFilename();
+//        String extension = getExtension(file);
+//        if (allowedExtension != null && !isAllowedExtension(extension, allowedExtension))
+//        {
+//            if (allowedExtension == MimeTypeUtils.IMAGE_EXTENSION)
+//            {
+//                throw new InvalidExtensionException.InvalidImageExtensionException(allowedExtension, extension,
+//                        fileName);
+//            }
+//            else if (allowedExtension == MimeTypeUtils.FLASH_EXTENSION)
+//            {
+//                throw new InvalidExtensionException.InvalidFlashExtensionException(allowedExtension, extension,
+//                        fileName);
+//            }
+//            else if (allowedExtension == MimeTypeUtils.MEDIA_EXTENSION)
+//            {
+//                throw new InvalidExtensionException.InvalidMediaExtensionException(allowedExtension, extension,
+//                        fileName);
+//            }
+//            else if (allowedExtension == MimeTypeUtils.VIDEO_EXTENSION)
+//            {
+//                throw new InvalidExtensionException.InvalidVideoExtensionException(allowedExtension, extension,
+//                        fileName);
+//            }
+//            else
+//            {
+//                throw new InvalidExtensionException(allowedExtension, extension, fileName);
+//            }
+//        }
+//    }
+//
+//    /**
+//     * 判断MIME类型是否是允许的MIME类型
+//     *
+//     * @param extension 上传文件类型
+//     * @param allowedExtension 允许上传文件类型
+//     * @return true/false
+//     */
+//    public static final boolean isAllowedExtension(String extension, String[] allowedExtension)
+//    {
+//        for (String str : allowedExtension)
+//        {
+//            if (str.equalsIgnoreCase(extension))
+//            {
+//                return true;
+//            }
+//        }
+//        return false;
+//    }
+//
+//    /**
+//     * 获取文件名的后缀
+//     *
+//     * @param file 表单文件
+//     * @return 后缀名
+//     */
+//    public static final String getExtension(MultipartFile file)
+//    {
+//        String extension = FilenameUtils.getExtension(file.getOriginalFilename());
+//        if (StringUtils.isEmpty(extension))
+//        {
+//            extension = MimeTypeUtils.getExtension(Objects.requireNonNull(file.getContentType()));
+//        }
+//        return extension;
+//    }
 }

+ 2 - 2
base-modules/service-gen/pom.xml

@@ -68,13 +68,13 @@
         
         <!-- RuoYi Common Log -->
         <dependency>
-            <groupId>com.ruoyi</groupId>
+            <groupId>com.usky</groupId>
             <artifactId>ruoyi-common-log</artifactId>
         </dependency>
         
         <!-- RuoYi Common Swagger -->
         <dependency>
-            <groupId>com.ruoyi</groupId>
+            <groupId>com.usky</groupId>
             <artifactId>ruoyi-common-swagger</artifactId>
         </dependency>
 

+ 3 - 3
base-modules/service-job/pom.xml

@@ -68,18 +68,18 @@
         
         <!-- RuoYi Common Log -->
         <dependency>
-            <groupId>com.ruoyi</groupId>
+            <groupId>com.usky</groupId>
             <artifactId>ruoyi-common-log</artifactId>
         </dependency>
         
         <!-- RuoYi Common Swagger -->
         <dependency>
-            <groupId>com.ruoyi</groupId>
+            <groupId>com.usky</groupId>
             <artifactId>ruoyi-common-swagger</artifactId>
         </dependency>
 
         <dependency>
-            <groupId>com.ruoyi</groupId>
+            <groupId>com.usky</groupId>
             <artifactId>ruoyi-common-core</artifactId>
         </dependency>
         

BIN
base-modules/service-system/.DS_Store


+ 0 - 23
base-modules/service-system/pom.xml

@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <groupId>com.usky</groupId>
-        <artifactId>base-modules</artifactId>
-        <version>0.0.1</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <modules>
-        <module>service-system-api</module>
-        <module>service-system-biz</module>
-    </modules>
-
-    <artifactId>service-system</artifactId>
-    <packaging>pom</packaging>
-
-    <description>
-        service-system系统模块
-    </description>
-   
-</project>

+ 0 - 27
base-modules/service-system/service-system-api/pom.xml

@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xmlns="http://maven.apache.org/POM/4.0.0"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <groupId>com.usky</groupId>
-        <artifactId>service-system</artifactId>
-        <version>0.0.1</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-    
-    <artifactId>service-system-api</artifactId>
-
-    <description>
-        system系统接口模块
-    </description>
-
-    <dependencies>
-        <!-- RuoYi Common Core-->
-        <dependency>
-            <groupId>com.ruoyi</groupId>
-            <artifactId>ruoyi-common-core</artifactId>
-        </dependency>
-        
-    </dependencies>
-
-</project>

+ 0 - 29
base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/RemoteFileService.java

@@ -1,29 +0,0 @@
-package com.ruoyi.system.api;
-
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestPart;
-import org.springframework.web.multipart.MultipartFile;
-import com.ruoyi.common.core.constant.ServiceNameConstants;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.system.api.domain.SysFile;
-import com.ruoyi.system.api.factory.RemoteFileFallbackFactory;
-
-/**
- * 文件服务
- * 
- * @author ruoyi
- */
-@FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class)
-public interface RemoteFileService
-{
-    /**
-     * 上传文件
-     *
-     * @param file 文件信息
-     * @return 结果
-     */
-    @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
-    public R<SysFile> upload(@RequestPart(value = "file") MultipartFile file);
-}

+ 0 - 41
base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/RemoteLogService.java

@@ -1,41 +0,0 @@
-package com.ruoyi.system.api;
-
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestHeader;
-import com.ruoyi.common.core.constant.SecurityConstants;
-import com.ruoyi.common.core.constant.ServiceNameConstants;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.system.api.domain.SysLogininfor;
-import com.ruoyi.system.api.domain.SysOperLog;
-import com.ruoyi.system.api.factory.RemoteLogFallbackFactory;
-
-/**
- * 日志服务
- * 
- * @author ruoyi
- */
-@FeignClient(contextId = "remoteLogService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class)
-public interface RemoteLogService
-{
-    /**
-     * 保存系统日志
-     *
-     * @param sysOperLog 日志实体
-     * @param source 请求来源
-     * @return 结果
-     */
-    @PostMapping("/operlog")
-    public R<Boolean> saveLog(@RequestBody SysOperLog sysOperLog, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
-
-    /**
-     * 保存访问记录
-     *
-     * @param sysLogininfor 访问实体
-     * @param source 请求来源
-     * @return 结果
-     */
-    @PostMapping("/logininfor")
-    public R<Boolean> saveLogininfor(@RequestBody SysLogininfor sysLogininfor, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
-}

+ 0 - 43
base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/RemoteUserService.java

@@ -1,43 +0,0 @@
-package com.ruoyi.system.api;
-
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestHeader;
-import com.ruoyi.common.core.constant.SecurityConstants;
-import com.ruoyi.common.core.constant.ServiceNameConstants;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.system.api.domain.SysUser;
-import com.ruoyi.system.api.factory.RemoteUserFallbackFactory;
-import com.ruoyi.system.api.model.LoginUser;
-
-/**
- * 用户服务
- * 
- * @author ruoyi
- */
-@FeignClient(contextId = "remoteUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
-public interface RemoteUserService
-{
-    /**
-     * 通过用户名查询用户信息
-     *
-     * @param username 用户名
-     * @param source 请求来源
-     * @return 结果
-     */
-    @GetMapping("/user/info/{username}")
-    public R<LoginUser> getUserInfo(@PathVariable("username") String username, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
-
-    /**
-     * 注册用户信息
-     *
-     * @param sysUser 用户信息
-     * @param source 请求来源
-     * @return 结果
-     */
-    @PostMapping("/user/register")
-    public R<Boolean> registerUserInfo(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
-}

+ 0 - 202
base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/domain/SysDept.java

@@ -1,202 +0,0 @@
-package com.ruoyi.system.api.domain;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.validation.constraints.Email;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.Size;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.core.web.domain.BaseEntity;
-
-/**
- * 部门表 sys_dept
- * 
- * @author ruoyi
- */
-public class SysDept extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 部门ID */
-    private Long deptId;
-
-    /** 父部门ID */
-    private Long parentId;
-
-    /** 祖级列表 */
-    private String ancestors;
-
-    /** 部门名称 */
-    private String deptName;
-
-    /** 显示顺序 */
-    private String orderNum;
-
-    /** 负责人 */
-    private String leader;
-
-    /** 联系电话 */
-    private String phone;
-
-    /** 邮箱 */
-    private String email;
-
-    /** 部门状态:0正常,1停用 */
-    private String status;
-
-    /** 删除标志(0代表存在 2代表删除) */
-    private String delFlag;
-
-    /** 父部门名称 */
-    private String parentName;
-    
-    /** 子部门 */
-    private List<SysDept> children = new ArrayList<SysDept>();
-
-    public Long getDeptId()
-    {
-        return deptId;
-    }
-
-    public void setDeptId(Long deptId)
-    {
-        this.deptId = deptId;
-    }
-
-    public Long getParentId()
-    {
-        return parentId;
-    }
-
-    public void setParentId(Long parentId)
-    {
-        this.parentId = parentId;
-    }
-
-    public String getAncestors()
-    {
-        return ancestors;
-    }
-
-    public void setAncestors(String ancestors)
-    {
-        this.ancestors = ancestors;
-    }
-
-    @NotBlank(message = "部门名称不能为空")
-    @Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符")
-    public String getDeptName()
-    {
-        return deptName;
-    }
-
-    public void setDeptName(String deptName)
-    {
-        this.deptName = deptName;
-    }
-
-    @NotBlank(message = "显示顺序不能为空")
-    public String getOrderNum()
-    {
-        return orderNum;
-    }
-
-    public void setOrderNum(String orderNum)
-    {
-        this.orderNum = orderNum;
-    }
-
-    public String getLeader()
-    {
-        return leader;
-    }
-
-    public void setLeader(String leader)
-    {
-        this.leader = leader;
-    }
-
-    @Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符")
-    public String getPhone()
-    {
-        return phone;
-    }
-
-    public void setPhone(String phone)
-    {
-        this.phone = phone;
-    }
-
-    @Email(message = "邮箱格式不正确")
-    @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
-    public String getEmail()
-    {
-        return email;
-    }
-
-    public void setEmail(String email)
-    {
-        this.email = email;
-    }
-
-    public String getStatus()
-    {
-        return status;
-    }
-
-    public void setStatus(String status)
-    {
-        this.status = status;
-    }
-
-    public String getDelFlag()
-    {
-        return delFlag;
-    }
-
-    public void setDelFlag(String delFlag)
-    {
-        this.delFlag = delFlag;
-    }
-
-    public String getParentName()
-    {
-        return parentName;
-    }
-
-    public void setParentName(String parentName)
-    {
-        this.parentName = parentName;
-    }
-
-    public List<SysDept> getChildren()
-    {
-        return children;
-    }
-
-    public void setChildren(List<SysDept> children)
-    {
-        this.children = children;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("deptId", getDeptId())
-            .append("parentId", getParentId())
-            .append("ancestors", getAncestors())
-            .append("deptName", getDeptName())
-            .append("orderNum", getOrderNum())
-            .append("leader", getLeader())
-            .append("phone", getPhone())
-            .append("email", getEmail())
-            .append("status", getStatus())
-            .append("delFlag", getDelFlag())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .toString();
-    }
-}

+ 0 - 176
base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/domain/SysDictData.java

@@ -1,176 +0,0 @@
-package com.ruoyi.system.api.domain;
-
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.Size;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.core.annotation.Excel;
-import com.ruoyi.common.core.annotation.Excel.ColumnType;
-import com.ruoyi.common.core.constant.UserConstants;
-import com.ruoyi.common.core.web.domain.BaseEntity;
-
-/**
- * 字典数据表 sys_dict_data
- * 
- * @author ruoyi
- */
-public class SysDictData extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 字典编码 */
-    @Excel(name = "字典编码", cellType = ColumnType.NUMERIC)
-    private Long dictCode;
-
-    /** 字典排序 */
-    @Excel(name = "字典排序", cellType = ColumnType.NUMERIC)
-    private Long dictSort;
-
-    /** 字典标签 */
-    @Excel(name = "字典标签")
-    private String dictLabel;
-
-    /** 字典键值 */
-    @Excel(name = "字典键值")
-    private String dictValue;
-
-    /** 字典类型 */
-    @Excel(name = "字典类型")
-    private String dictType;
-
-    /** 样式属性(其他样式扩展) */
-    private String cssClass;
-
-    /** 表格字典样式 */
-    private String listClass;
-
-    /** 是否默认(Y是 N否) */
-    @Excel(name = "是否默认", readConverterExp = "Y=是,N=否")
-    private String isDefault;
-
-    /** 状态(0正常 1停用) */
-    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
-    private String status;
-
-    public Long getDictCode()
-    {
-        return dictCode;
-    }
-
-    public void setDictCode(Long dictCode)
-    {
-        this.dictCode = dictCode;
-    }
-
-    public Long getDictSort()
-    {
-        return dictSort;
-    }
-
-    public void setDictSort(Long dictSort)
-    {
-        this.dictSort = dictSort;
-    }
-
-    @NotBlank(message = "字典标签不能为空")
-    @Size(min = 0, max = 100, message = "字典标签长度不能超过100个字符")
-    public String getDictLabel()
-    {
-        return dictLabel;
-    }
-
-    public void setDictLabel(String dictLabel)
-    {
-        this.dictLabel = dictLabel;
-    }
-
-    @NotBlank(message = "字典键值不能为空")
-    @Size(min = 0, max = 100, message = "字典键值长度不能超过100个字符")
-    public String getDictValue()
-    {
-        return dictValue;
-    }
-
-    public void setDictValue(String dictValue)
-    {
-        this.dictValue = dictValue;
-    }
-
-    @NotBlank(message = "字典类型不能为空")
-    @Size(min = 0, max = 100, message = "字典类型长度不能超过100个字符")
-    public String getDictType()
-    {
-        return dictType;
-    }
-
-    public void setDictType(String dictType)
-    {
-        this.dictType = dictType;
-    }
-
-    @Size(min = 0, max = 100, message = "样式属性长度不能超过100个字符")
-    public String getCssClass()
-    {
-        return cssClass;
-    }
-
-    public void setCssClass(String cssClass)
-    {
-        this.cssClass = cssClass;
-    }
-
-    public String getListClass()
-    {
-        return listClass;
-    }
-
-    public void setListClass(String listClass)
-    {
-        this.listClass = listClass;
-    }
-
-    public boolean getDefault()
-    {
-        return UserConstants.YES.equals(this.isDefault) ? true : false;
-    }
-
-    public String getIsDefault()
-    {
-        return isDefault;
-    }
-
-    public void setIsDefault(String isDefault)
-    {
-        this.isDefault = isDefault;
-    }
-
-    public String getStatus()
-    {
-        return status;
-    }
-
-    public void setStatus(String status)
-    {
-        this.status = status;
-    }
-    
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("dictCode", getDictCode())
-            .append("dictSort", getDictSort())
-            .append("dictLabel", getDictLabel())
-            .append("dictValue", getDictValue())
-            .append("dictType", getDictType())
-            .append("cssClass", getCssClass())
-            .append("listClass", getListClass())
-            .append("isDefault", getIsDefault())
-            .append("status", getStatus())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .toString();
-    }
-}

+ 0 - 94
base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/domain/SysDictType.java

@@ -1,94 +0,0 @@
-package com.ruoyi.system.api.domain;
-
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.Size;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.core.annotation.Excel;
-import com.ruoyi.common.core.annotation.Excel.ColumnType;
-import com.ruoyi.common.core.web.domain.BaseEntity;
-
-/**
- * 字典类型表 sys_dict_type
- * 
- * @author ruoyi
- */
-public class SysDictType extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 字典主键 */
-    @Excel(name = "字典主键", cellType = ColumnType.NUMERIC)
-    private Long dictId;
-
-    /** 字典名称 */
-    @Excel(name = "字典名称")
-    private String dictName;
-
-    /** 字典类型 */
-    @Excel(name = "字典类型")
-    private String dictType;
-
-    /** 状态(0正常 1停用) */
-    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
-    private String status;
-
-    public Long getDictId()
-    {
-        return dictId;
-    }
-
-    public void setDictId(Long dictId)
-    {
-        this.dictId = dictId;
-    }
-
-    @NotBlank(message = "字典名称不能为空")
-    @Size(min = 0, max = 100, message = "字典类型名称长度不能超过100个字符")
-    public String getDictName()
-    {
-        return dictName;
-    }
-
-    public void setDictName(String dictName)
-    {
-        this.dictName = dictName;
-    }
-
-    @NotBlank(message = "字典类型不能为空")
-    @Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符")
-    public String getDictType()
-    {
-        return dictType;
-    }
-
-    public void setDictType(String dictType)
-    {
-        this.dictType = dictType;
-    }
-
-    public String getStatus()
-    {
-        return status;
-    }
-
-    public void setStatus(String status)
-    {
-        this.status = status;
-    }
-    
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("dictId", getDictId())
-            .append("dictName", getDictName())
-            .append("dictType", getDictType())
-            .append("status", getStatus())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .toString();
-    }
-}

+ 0 - 50
base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/domain/SysFile.java

@@ -1,50 +0,0 @@
-package com.ruoyi.system.api.domain;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-/**
- * 文件信息
- * 
- * @author ruoyi
- */
-public class SysFile
-{
-    /**
-     * 文件名称
-     */
-    private String name;
-
-    /**
-     * 文件地址
-     */
-    private String url;
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName(String name)
-    {
-        this.name = name;
-    }
-
-    public String getUrl()
-    {
-        return url;
-    }
-
-    public void setUrl(String url)
-    {
-        this.url = url;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("name", getName())
-            .append("url", getUrl())
-            .toString();
-    }
-}

+ 0 - 102
base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/domain/SysLogininfor.java

@@ -1,102 +0,0 @@
-package com.ruoyi.system.api.domain;
-
-import java.util.Date;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.ruoyi.common.core.annotation.Excel;
-import com.ruoyi.common.core.annotation.Excel.ColumnType;
-import com.ruoyi.common.core.web.domain.BaseEntity;
-
-/**
- * 系统访问记录表 sys_logininfor
- * 
- * @author ruoyi
- */
-public class SysLogininfor extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** ID */
-    @Excel(name = "序号", cellType = ColumnType.NUMERIC)
-    private Long infoId;
-
-    /** 用户账号 */
-    @Excel(name = "用户账号")
-    private String userName;
-
-    /** 状态 0成功 1失败 */
-    @Excel(name = "状态", readConverterExp = "0=成功,1=失败")
-    private String status;
-
-    /** 地址 */
-    @Excel(name = "地址")
-    private String ipaddr;
-
-    /** 描述 */
-    @Excel(name = "描述")
-    private String msg;
-
-    /** 访问时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    @Excel(name = "访问时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
-    private Date accessTime;
-
-    public Long getInfoId()
-    {
-        return infoId;
-    }
-
-    public void setInfoId(Long infoId)
-    {
-        this.infoId = infoId;
-    }
-
-    public String getUserName()
-    {
-        return userName;
-    }
-
-    public void setUserName(String userName)
-    {
-        this.userName = userName;
-    }
-
-    public String getStatus()
-    {
-        return status;
-    }
-
-    public void setStatus(String status)
-    {
-        this.status = status;
-    }
-
-    public String getIpaddr()
-    {
-        return ipaddr;
-    }
-
-    public void setIpaddr(String ipaddr)
-    {
-        this.ipaddr = ipaddr;
-    }
-
-    public String getMsg()
-    {
-        return msg;
-    }
-
-    public void setMsg(String msg)
-    {
-        this.msg = msg;
-    }
-
-    public Date getAccessTime()
-    {
-        return accessTime;
-    }
-
-    public void setAccessTime(Date accessTime)
-    {
-        this.accessTime = accessTime;
-    }
-}

+ 0 - 241
base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/domain/SysOperLog.java

@@ -1,241 +0,0 @@
-package com.ruoyi.system.api.domain;
-
-import java.util.Date;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.ruoyi.common.core.annotation.Excel;
-import com.ruoyi.common.core.annotation.Excel.ColumnType;
-import com.ruoyi.common.core.web.domain.BaseEntity;
-
-/**
- * 操作日志记录表 oper_log
- * 
- * @author ruoyi
- */
-public class SysOperLog extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 日志主键 */
-    @Excel(name = "操作序号", cellType = ColumnType.NUMERIC)
-    private Long operId;
-
-    /** 操作模块 */
-    @Excel(name = "操作模块")
-    private String title;
-
-    /** 业务类型(0其它 1新增 2修改 3删除) */
-    @Excel(name = "业务类型", readConverterExp = "0=其它,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据")
-    private Integer businessType;
-
-    /** 业务类型数组 */
-    private Integer[] businessTypes;
-
-    /** 请求方法 */
-    @Excel(name = "请求方法")
-    private String method;
-
-    /** 请求方式 */
-    @Excel(name = "请求方式")
-    private String requestMethod;
-
-    /** 操作类别(0其它 1后台用户 2手机端用户) */
-    @Excel(name = "操作类别", readConverterExp = "0=其它,1=后台用户,2=手机端用户")
-    private Integer operatorType;
-
-    /** 操作人员 */
-    @Excel(name = "操作人员")
-    private String operName;
-
-    /** 部门名称 */
-    @Excel(name = "部门名称")
-    private String deptName;
-
-    /** 请求url */
-    @Excel(name = "请求地址")
-    private String operUrl;
-
-    /** 操作地址 */
-    @Excel(name = "操作地址")
-    private String operIp;
-
-    /** 请求参数 */
-    @Excel(name = "请求参数")
-    private String operParam;
-
-    /** 返回参数 */
-    @Excel(name = "返回参数")
-    private String jsonResult;
-
-    /** 操作状态(0正常 1异常) */
-    @Excel(name = "状态", readConverterExp = "0=正常,1=异常")
-    private Integer status;
-
-    /** 错误消息 */
-    @Excel(name = "错误消息")
-    private String errorMsg;
-
-    /** 操作时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
-    private Date operTime;
-
-    public Long getOperId()
-    {
-        return operId;
-    }
-
-    public void setOperId(Long operId)
-    {
-        this.operId = operId;
-    }
-
-    public String getTitle()
-    {
-        return title;
-    }
-
-    public void setTitle(String title)
-    {
-        this.title = title;
-    }
-
-    public Integer getBusinessType()
-    {
-        return businessType;
-    }
-
-    public void setBusinessType(Integer businessType)
-    {
-        this.businessType = businessType;
-    }
-
-    public Integer[] getBusinessTypes()
-    {
-        return businessTypes;
-    }
-
-    public void setBusinessTypes(Integer[] businessTypes)
-    {
-        this.businessTypes = businessTypes;
-    }
-
-    public String getMethod()
-    {
-        return method;
-    }
-
-    public void setMethod(String method)
-    {
-        this.method = method;
-    }
-
-    public String getRequestMethod()
-    {
-        return requestMethod;
-    }
-
-    public void setRequestMethod(String requestMethod)
-    {
-        this.requestMethod = requestMethod;
-    }
-
-    public Integer getOperatorType()
-    {
-        return operatorType;
-    }
-
-    public void setOperatorType(Integer operatorType)
-    {
-        this.operatorType = operatorType;
-    }
-
-    public String getOperName()
-    {
-        return operName;
-    }
-
-    public void setOperName(String operName)
-    {
-        this.operName = operName;
-    }
-
-    public String getDeptName()
-    {
-        return deptName;
-    }
-
-    public void setDeptName(String deptName)
-    {
-        this.deptName = deptName;
-    }
-
-    public String getOperUrl()
-    {
-        return operUrl;
-    }
-
-    public void setOperUrl(String operUrl)
-    {
-        this.operUrl = operUrl;
-    }
-
-    public String getOperIp()
-    {
-        return operIp;
-    }
-
-    public void setOperIp(String operIp)
-    {
-        this.operIp = operIp;
-    }
-
-    public String getOperParam()
-    {
-        return operParam;
-    }
-
-    public void setOperParam(String operParam)
-    {
-        this.operParam = operParam;
-    }
-
-    public String getJsonResult()
-    {
-        return jsonResult;
-    }
-
-    public void setJsonResult(String jsonResult)
-    {
-        this.jsonResult = jsonResult;
-    }
-
-    public Integer getStatus()
-    {
-        return status;
-    }
-
-    public void setStatus(Integer status)
-    {
-        this.status = status;
-    }
-
-    public String getErrorMsg()
-    {
-        return errorMsg;
-    }
-
-    public void setErrorMsg(String errorMsg)
-    {
-        this.errorMsg = errorMsg;
-    }
-
-    public Date getOperTime()
-    {
-        return operTime;
-    }
-
-    public void setOperTime(Date operTime)
-    {
-        this.operTime = operTime;
-    }
-}

+ 0 - 226
base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/domain/SysRole.java

@@ -1,226 +0,0 @@
-package com.ruoyi.system.api.domain;
-
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.Size;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.core.annotation.Excel;
-import com.ruoyi.common.core.annotation.Excel.ColumnType;
-import com.ruoyi.common.core.web.domain.BaseEntity;
-
-/**
- * 角色表 sys_role
- * 
- * @author ruoyi
- */
-public class SysRole extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 角色ID */
-    @Excel(name = "角色序号", cellType = ColumnType.NUMERIC)
-    private Long roleId;
-
-    /** 角色名称 */
-    @Excel(name = "角色名称")
-    private String roleName;
-
-    /** 角色权限 */
-    @Excel(name = "角色权限")
-    private String roleKey;
-
-    /** 角色排序 */
-    @Excel(name = "角色排序")
-    private String roleSort;
-
-    /** 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限) */
-    @Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限,5=仅本人数据权限")
-    private String dataScope;
-
-    /** 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示) */
-    private boolean menuCheckStrictly;
-
-    /** 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 ) */
-    private boolean deptCheckStrictly;
-
-    /** 角色状态(0正常 1停用) */
-    @Excel(name = "角色状态", readConverterExp = "0=正常,1=停用")
-    private String status;
-
-    /** 删除标志(0代表存在 2代表删除) */
-    private String delFlag;
-
-    /** 用户是否存在此角色标识 默认不存在 */
-    private boolean flag = false;
-
-    /** 菜单组 */
-    private Long[] menuIds;
-
-    /** 部门组(数据权限) */
-    private Long[] deptIds;
-
-    public SysRole()
-    {
-
-    }
-
-    public SysRole(Long roleId)
-    {
-        this.roleId = roleId;
-    }
-
-    public Long getRoleId()
-    {
-        return roleId;
-    }
-
-    public void setRoleId(Long roleId)
-    {
-        this.roleId = roleId;
-    }
-
-    public boolean isAdmin()
-    {
-        return isAdmin(this.roleId);
-    }
-
-    public static boolean isAdmin(Long roleId)
-    {
-        return roleId != null && 1L == roleId;
-    }
-
-    @NotBlank(message = "角色名称不能为空")
-    @Size(min = 0, max = 30, message = "角色名称长度不能超过30个字符")
-    public String getRoleName()
-    {
-        return roleName;
-    }
-
-    public void setRoleName(String roleName)
-    {
-        this.roleName = roleName;
-    }
-
-    @NotBlank(message = "权限字符不能为空")
-    @Size(min = 0, max = 100, message = "权限字符长度不能超过100个字符")
-    public String getRoleKey()
-    {
-        return roleKey;
-    }
-
-    public void setRoleKey(String roleKey)
-    {
-        this.roleKey = roleKey;
-    }
-
-    @NotBlank(message = "显示顺序不能为空")
-    public String getRoleSort()
-    {
-        return roleSort;
-    }
-
-    public void setRoleSort(String roleSort)
-    {
-        this.roleSort = roleSort;
-    }
-
-    public String getDataScope()
-    {
-        return dataScope;
-    }
-
-    public void setDataScope(String dataScope)
-    {
-        this.dataScope = dataScope;
-    }
-
-    public boolean isMenuCheckStrictly()
-    {
-        return menuCheckStrictly;
-    }
-
-    public void setMenuCheckStrictly(boolean menuCheckStrictly)
-    {
-        this.menuCheckStrictly = menuCheckStrictly;
-    }
-
-    public boolean isDeptCheckStrictly()
-    {
-        return deptCheckStrictly;
-    }
-
-    public void setDeptCheckStrictly(boolean deptCheckStrictly)
-    {
-        this.deptCheckStrictly = deptCheckStrictly;
-    }
-
-    public String getStatus()
-    {
-        return status;
-    }
-
-    public void setStatus(String status)
-    {
-        this.status = status;
-    }
-
-    public String getDelFlag()
-    {
-        return delFlag;
-    }
-
-    public void setDelFlag(String delFlag)
-    {
-        this.delFlag = delFlag;
-    }
-
-    public boolean isFlag()
-    {
-        return flag;
-    }
-
-    public void setFlag(boolean flag)
-    {
-        this.flag = flag;
-    }
-
-    public Long[] getMenuIds()
-    {
-        return menuIds;
-    }
-
-    public void setMenuIds(Long[] menuIds)
-    {
-        this.menuIds = menuIds;
-    }
-
-    public Long[] getDeptIds()
-    {
-        return deptIds;
-    }
-
-    public void setDeptIds(Long[] deptIds)
-    {
-        this.deptIds = deptIds;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("roleId", getRoleId())
-            .append("roleName", getRoleName())
-            .append("roleKey", getRoleKey())
-            .append("roleSort", getRoleSort())
-            .append("dataScope", getDataScope())
-            .append("menuCheckStrictly", isMenuCheckStrictly())
-            .append("deptCheckStrictly", isDeptCheckStrictly())
-            .append("status", getStatus())
-            .append("delFlag", getDelFlag())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .toString();
-    }
-}

+ 0 - 337
base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/domain/SysUser.java

@@ -1,337 +0,0 @@
-package com.ruoyi.system.api.domain;
-
-import java.util.Date;
-import java.util.List;
-import javax.validation.constraints.*;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.ruoyi.common.core.annotation.Excel;
-import com.ruoyi.common.core.annotation.Excel.ColumnType;
-import com.ruoyi.common.core.annotation.Excel.Type;
-import com.ruoyi.common.core.annotation.Excels;
-import com.ruoyi.common.core.web.domain.BaseEntity;
-import com.ruoyi.common.core.xss.Xss;
-
-/**
- * 用户对象 sys_user
- * 
- * @author ruoyi
- */
-public class SysUser extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 用户ID */
-    @Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号")
-    private Long userId;
-
-    /** 部门ID */
-    @Excel(name = "部门编号", type = Type.IMPORT)
-    private Long deptId;
-
-    /** 用户账号 */
-    @Excel(name = "登录名称")
-    private String userName;
-
-    /** 用户昵称 */
-    @Excel(name = "用户名称")
-    private String nickName;
-
-    /** 用户邮箱 */
-    @Excel(name = "用户邮箱")
-    private String email;
-
-    /** 手机号码 */
-    @Excel(name = "手机号码")
-    private String phonenumber;
-
-    /** 用户性别 */
-    @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
-    private String sex;
-
-    /** 用户头像 */
-    private String avatar;
-
-    /** 密码 */
-    private String password;
-
-    /** 帐号状态(0正常 1停用) */
-    @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
-    private String status;
-
-    /** 删除标志(0代表存在 2代表删除) */
-    private String delFlag;
-
-    /** 最后登录IP */
-    @Excel(name = "最后登录IP", type = Type.EXPORT)
-    private String loginIp;
-
-    /** 最后登录时间 */
-    @Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
-    private Date loginDate;
-
-    /** 部门对象 */
-    @Excels({
-        @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT),
-        @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT)
-    })
-    private SysDept dept;
-
-    /** 角色对象 */
-    private List<SysRole> roles;
-
-    /** 角色组 */
-    private Long[] roleIds;
-
-    /** 岗位组 */
-    private Long[] postIds;
-
-    /** 角色ID */
-    private Long roleId;
-
-    /** 租户ID */
-    private Integer tenantId;
-
-    public SysUser()
-    {
-
-    }
-
-    public SysUser(Long userId)
-    {
-        this.userId = userId;
-    }
-
-    public Long getUserId()
-    {
-        return userId;
-    }
-
-    public void setUserId(Long userId)
-    {
-        this.userId = userId;
-    }
-
-    public boolean isAdmin()
-    {
-        return isAdmin(this.userId);
-    }
-
-    public static boolean isAdmin(Long userId)
-    {
-        return userId != null && 1L == userId;
-    }
-
-    public Long getDeptId()
-    {
-        return deptId;
-    }
-
-    public void setDeptId(Long deptId)
-    {
-        this.deptId = deptId;
-    }
-
-    @Xss(message = "用户昵称不能包含脚本字符")
-    @Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符")
-    public String getNickName()
-    {
-        return nickName;
-    }
-
-    public void setNickName(String nickName)
-    {
-        this.nickName = nickName;
-    }
-
-    @Xss(message = "用户账号不能包含脚本字符")
-    @NotBlank(message = "用户账号不能为空")
-    @Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符")
-    public String getUserName()
-    {
-        return userName;
-    }
-
-    public void setUserName(String userName)
-    {
-        this.userName = userName;
-    }
-
-    @Email(message = "邮箱格式不正确")
-    @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
-    public String getEmail()
-    {
-        return email;
-    }
-
-    public void setEmail(String email)
-    {
-        this.email = email;
-    }
-
-    @Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符")
-    public String getPhonenumber()
-    {
-        return phonenumber;
-    }
-
-    public void setPhonenumber(String phonenumber)
-    {
-        this.phonenumber = phonenumber;
-    }
-
-    public String getSex()
-    {
-        return sex;
-    }
-
-    public void setSex(String sex)
-    {
-        this.sex = sex;
-    }
-
-    public String getAvatar()
-    {
-        return avatar;
-    }
-
-    public void setAvatar(String avatar)
-    {
-        this.avatar = avatar;
-    }
-
-    @JsonProperty
-    public String getPassword()
-    {
-        return password;
-    }
-
-    public void setPassword(String password)
-    {
-        this.password = password;
-    }
-
-    public String getStatus()
-    {
-        return status;
-    }
-
-    public void setStatus(String status)
-    {
-        this.status = status;
-    }
-
-    public String getDelFlag()
-    {
-        return delFlag;
-    }
-
-    public void setDelFlag(String delFlag)
-    {
-        this.delFlag = delFlag;
-    }
-
-    public String getLoginIp()
-    {
-        return loginIp;
-    }
-
-    public void setLoginIp(String loginIp)
-    {
-        this.loginIp = loginIp;
-    }
-
-    public Date getLoginDate()
-    {
-        return loginDate;
-    }
-
-    public void setLoginDate(Date loginDate)
-    {
-        this.loginDate = loginDate;
-    }
-
-    public SysDept getDept()
-    {
-        return dept;
-    }
-
-    public void setDept(SysDept dept)
-    {
-        this.dept = dept;
-    }
-
-    public List<SysRole> getRoles()
-    {
-        return roles;
-    }
-
-    public void setRoles(List<SysRole> roles)
-    {
-        this.roles = roles;
-    }
-
-    public Long[] getRoleIds()
-    {
-        return roleIds;
-    }
-
-    public void setRoleIds(Long[] roleIds)
-    {
-        this.roleIds = roleIds;
-    }
-
-    public Long[] getPostIds()
-    {
-        return postIds;
-    }
-
-    public void setPostIds(Long[] postIds)
-    {
-        this.postIds = postIds;
-    }
-
-    public Long getRoleId()
-    {
-        return roleId;
-    }
-
-    public void setRoleId(Long roleId)
-    {
-        this.roleId = roleId;
-    }
-
-    public Integer getTenantId() {
-        return tenantId;
-    }
-
-    public void setTenantId(Integer tenantId) {
-        this.tenantId = tenantId;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("userId", getUserId())
-            .append("deptId", getDeptId())
-            .append("userName", getUserName())
-            .append("nickName", getNickName())
-            .append("email", getEmail())
-            .append("phonenumber", getPhonenumber())
-            .append("sex", getSex())
-            .append("avatar", getAvatar())
-            .append("password", getPassword())
-            .append("status", getStatus())
-            .append("delFlag", getDelFlag())
-            .append("loginIp", getLoginIp())
-            .append("loginDate", getLoginDate())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .append("dept", getDept())
-            .toString();
-    }
-}

+ 0 - 35
base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/factory/RemoteFileFallbackFactory.java

@@ -1,35 +0,0 @@
-package com.ruoyi.system.api.factory;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.cloud.openfeign.FallbackFactory;
-import org.springframework.stereotype.Component;
-import org.springframework.web.multipart.MultipartFile;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.system.api.RemoteFileService;
-import com.ruoyi.system.api.domain.SysFile;
-
-/**
- * 文件服务降级处理
- * 
- * @author ruoyi
- */
-@Component
-public class RemoteFileFallbackFactory implements FallbackFactory<RemoteFileService>
-{
-    private static final Logger log = LoggerFactory.getLogger(RemoteFileFallbackFactory.class);
-
-    @Override
-    public RemoteFileService create(Throwable throwable)
-    {
-        log.error("文件服务调用失败:{}", throwable.getMessage());
-        return new RemoteFileService()
-        {
-            @Override
-            public R<SysFile> upload(MultipartFile file)
-            {
-                return R.fail("上传文件失败:" + throwable.getMessage());
-            }
-        };
-    }
-}

+ 0 - 42
base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/factory/RemoteLogFallbackFactory.java

@@ -1,42 +0,0 @@
-package com.ruoyi.system.api.factory;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.cloud.openfeign.FallbackFactory;
-import org.springframework.stereotype.Component;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.system.api.RemoteLogService;
-import com.ruoyi.system.api.domain.SysLogininfor;
-import com.ruoyi.system.api.domain.SysOperLog;
-
-/**
- * 日志服务降级处理
- * 
- * @author ruoyi
- */
-@Component
-public class RemoteLogFallbackFactory implements FallbackFactory<RemoteLogService>
-{
-    private static final Logger log = LoggerFactory.getLogger(RemoteLogFallbackFactory.class);
-
-    @Override
-    public RemoteLogService create(Throwable throwable)
-    {
-        log.error("日志服务调用失败:{}", throwable.getMessage());
-        return new RemoteLogService()
-        {
-            @Override
-            public R<Boolean> saveLog(SysOperLog sysOperLog, String source)
-            {
-                return null;
-            }
-
-            @Override
-            public R<Boolean> saveLogininfor(SysLogininfor sysLogininfor, String source)
-            {
-                return null;
-            }
-        };
-
-    }
-}

+ 0 - 41
base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/factory/RemoteUserFallbackFactory.java

@@ -1,41 +0,0 @@
-package com.ruoyi.system.api.factory;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.cloud.openfeign.FallbackFactory;
-import org.springframework.stereotype.Component;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.system.api.RemoteUserService;
-import com.ruoyi.system.api.domain.SysUser;
-import com.ruoyi.system.api.model.LoginUser;
-
-/**
- * 用户服务降级处理
- * 
- * @author ruoyi
- */
-@Component
-public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserService>
-{
-    private static final Logger log = LoggerFactory.getLogger(RemoteUserFallbackFactory.class);
-
-    @Override
-    public RemoteUserService create(Throwable throwable)
-    {
-        log.error("用户服务调用失败:{}", throwable.getMessage());
-        return new RemoteUserService()
-        {
-            @Override
-            public R<LoginUser> getUserInfo(String username, String source)
-            {
-                return R.fail("获取用户失败:" + throwable.getMessage());
-            }
-
-            @Override
-            public R<Boolean> registerUserInfo(SysUser sysUser, String source)
-            {
-                return R.fail("注册用户失败:" + throwable.getMessage());
-            }
-        };
-    }
-}

+ 0 - 160
base-modules/service-system/service-system-api/src/main/java/com/ruoyi/system/api/model/LoginUser.java

@@ -1,160 +0,0 @@
-package com.ruoyi.system.api.model;
-
-import java.io.Serializable;
-import java.util.Set;
-import com.ruoyi.system.api.domain.SysUser;
-
-/**
- * 用户信息
- *
- * @author ruoyi
- */
-public class LoginUser implements Serializable
-{
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 用户唯一标识
-     */
-    private String token;
-
-    /**
-     * 用户名id
-     */
-    private Long userid;
-
-    /**
-     * 用户名
-     */
-    private String username;
-
-    private Integer tenantId;
-
-    /**
-     * 登录时间
-     */
-    private Long loginTime;
-
-    /**
-     * 过期时间
-     */
-    private Long expireTime;
-
-    /**
-     * 登录IP地址
-     */
-    private String ipaddr;
-
-    /**
-     * 权限列表
-     */
-    private Set<String> permissions;
-
-    /**
-     * 角色列表
-     */
-    private Set<String> roles;
-
-    /**
-     * 用户信息
-     */
-    private SysUser sysUser;
-
-    public Integer getTenantId() {
-        return tenantId;
-    }
-
-    public void setTenantId(Integer tenantId) {
-        this.tenantId = tenantId;
-    }
-
-    public String getToken()
-    {
-        return token;
-    }
-
-    public void setToken(String token)
-    {
-        this.token = token;
-    }
-
-    public Long getUserid()
-    {
-        return userid;
-    }
-
-    public void setUserid(Long userid)
-    {
-        this.userid = userid;
-    }
-
-    public String getUsername()
-    {
-        return username;
-    }
-
-    public void setUsername(String username)
-    {
-        this.username = username;
-    }
-
-    public Long getLoginTime()
-    {
-        return loginTime;
-    }
-
-    public void setLoginTime(Long loginTime)
-    {
-        this.loginTime = loginTime;
-    }
-
-    public Long getExpireTime()
-    {
-        return expireTime;
-    }
-
-    public void setExpireTime(Long expireTime)
-    {
-        this.expireTime = expireTime;
-    }
-
-    public String getIpaddr()
-    {
-        return ipaddr;
-    }
-
-    public void setIpaddr(String ipaddr)
-    {
-        this.ipaddr = ipaddr;
-    }
-
-    public Set<String> getPermissions()
-    {
-        return permissions;
-    }
-
-    public void setPermissions(Set<String> permissions)
-    {
-        this.permissions = permissions;
-    }
-
-    public Set<String> getRoles()
-    {
-        return roles;
-    }
-
-    public void setRoles(Set<String> roles)
-    {
-        this.roles = roles;
-    }
-
-    public SysUser getSysUser()
-    {
-        return sysUser;
-    }
-
-    public void setSysUser(SysUser sysUser)
-    {
-        this.sysUser = sysUser;
-    }
-}

+ 0 - 4
base-modules/service-system/service-system-api/src/main/resources/META-INF/spring.factories

@@ -1,4 +0,0 @@
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-  com.ruoyi.system.api.factory.RemoteUserFallbackFactory,\
-  com.ruoyi.system.api.factory.RemoteLogFallbackFactory, \
-  com.ruoyi.system.api.factory.RemoteFileFallbackFactory

+ 0 - 47
base-modules/service-system/service-system-biz/pom.xml

@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xmlns="http://maven.apache.org/POM/4.0.0"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <groupId>com.usky</groupId>
-        <artifactId>service-system</artifactId>
-        <version>0.0.1</version>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-	
-    <artifactId>service-system-biz</artifactId>
-
-    <description>
-            service-system系统模块
-    </description>
-
-    <dependencies>
-        <!--  Common Cloud Starter -->
-        <dependency>
-            <groupId>com.ruoyi</groupId>
-            <artifactId>common-cloud-starter</artifactId>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <finalName>${project.artifactId}</finalName>
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <fork>false</fork>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-   
-</project>

BIN
base-modules/service-system/service-system-biz/src/.DS_Store


+ 0 - 44
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/RuoYiSystemApplication.java

@@ -1,44 +0,0 @@
-package com.ruoyi.system;
-
-import com.ruoyi.common.security.annotation.EnableCustomConfig;
-import com.ruoyi.common.security.annotation.EnableRyFeignClients;
-import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.core.env.Environment;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-/**
- * 系统模块
- * 
- * @author ruoyi
- */
-
-@EnableCustomConfig
-@EnableCustomSwagger2
-@EnableRyFeignClients
-@SpringBootApplication
-public class RuoYiSystemApplication
-{
-    private static final Logger log = LoggerFactory.getLogger(RuoYiSystemApplication.class);
-
-    public static void main(String[] args)throws UnknownHostException
-    {
-//        SpringApplication.run(RuoYiSystemApplication.class, args);
-        ConfigurableApplicationContext application = SpringApplication.run(RuoYiSystemApplication.class, args);
-        Environment env = application.getEnvironment();
-        String ip = InetAddress.getLocalHost().getHostAddress();
-        String port = env.getProperty("server.port");
-        log.info("\n----------------------------------------------------------\n\t" +
-                "Application  is running! Access URLs:\n\t" +
-                "Local: \t\thttp://localhost:" + port  + "/\n\t" +
-                "External: \thttp://" + ip + ":" + port  + "/\n\t" +
-                "----------------------------------------------------------");
-
-    }
-}

+ 0 - 134
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysConfigController.java

@@ -1,134 +0,0 @@
-package com.ruoyi.system.controller;
-
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.core.constant.UserConstants;
-import com.ruoyi.common.core.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.core.web.page.TableDataInfo;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.security.annotation.RequiresPermissions;
-import com.ruoyi.common.security.utils.SecurityUtils;
-import com.ruoyi.system.domain.SysConfig;
-import com.ruoyi.system.service.ISysConfigService;
-
-/**
- * 参数配置 信息操作处理
- * 
- * @author ruoyi
- */
-@RestController
-@RequestMapping("/config")
-public class SysConfigController extends BaseController
-{
-    @Autowired
-    private ISysConfigService configService;
-
-    /**
-     * 获取参数配置列表
-     */
-    @RequiresPermissions("system:config:list")
-    @GetMapping("/list")
-    public TableDataInfo list(SysConfig config)
-    {
-        startPage();
-        List<SysConfig> list = configService.selectConfigList(config);
-        return getDataTable(list);
-    }
-
-    @Log(title = "参数管理", businessType = BusinessType.EXPORT)
-    @RequiresPermissions("system:config:export")
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, SysConfig config)
-    {
-        List<SysConfig> list = configService.selectConfigList(config);
-        ExcelUtil<SysConfig> util = new ExcelUtil<SysConfig>(SysConfig.class);
-        util.exportExcel(response, list, "参数数据");
-    }
-
-    /**
-     * 根据参数编号获取详细信息
-     */
-    @GetMapping(value = "/{configId}")
-    public AjaxResult getInfo(@PathVariable Long configId)
-    {
-        return AjaxResult.success(configService.selectConfigById(configId));
-    }
-
-    /**
-     * 根据参数键名查询参数值
-     */
-    @GetMapping(value = "/configKey/{configKey}")
-    public AjaxResult getConfigKey(@PathVariable String configKey)
-    {
-        return AjaxResult.success(configService.selectConfigByKey(configKey));
-    }
-
-    /**
-     * 新增参数配置
-     */
-    @RequiresPermissions("system:config:add")
-    @Log(title = "参数管理", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@Validated @RequestBody SysConfig config)
-    {
-        if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
-        {
-            return AjaxResult.error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
-        }
-        config.setCreateBy(SecurityUtils.getUsername());
-        return toAjax(configService.insertConfig(config));
-    }
-
-    /**
-     * 修改参数配置
-     */
-    @RequiresPermissions("system:config:edit")
-    @Log(title = "参数管理", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@Validated @RequestBody SysConfig config)
-    {
-        if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
-        {
-            return AjaxResult.error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
-        }
-        config.setUpdateBy(SecurityUtils.getUsername());
-        return toAjax(configService.updateConfig(config));
-    }
-
-    /**
-     * 删除参数配置
-     */
-    @RequiresPermissions("system:config:remove")
-    @Log(title = "参数管理", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{configIds}")
-    public AjaxResult remove(@PathVariable Long[] configIds)
-    {
-        configService.deleteConfigByIds(configIds);
-        return success();
-    }
-
-    /**
-     * 刷新参数缓存
-     */
-    @RequiresPermissions("system:config:remove")
-    @Log(title = "参数管理", businessType = BusinessType.CLEAN)
-    @DeleteMapping("/refreshCache")
-    public AjaxResult refreshCache()
-    {
-        configService.resetConfigCache();
-        return AjaxResult.success();
-    }
-}

+ 0 - 166
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysDeptController.java

@@ -1,166 +0,0 @@
-package com.ruoyi.system.controller;
-
-import java.util.Iterator;
-import java.util.List;
-import org.apache.commons.lang3.ArrayUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.core.constant.UserConstants;
-import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.security.annotation.RequiresPermissions;
-import com.ruoyi.common.security.utils.SecurityUtils;
-import com.ruoyi.system.api.domain.SysDept;
-import com.ruoyi.system.service.ISysDeptService;
-
-/**
- * 部门信息
- * 
- * @author ruoyi
- */
-@RestController
-@RequestMapping("/dept")
-public class SysDeptController extends BaseController
-{
-    @Autowired
-    private ISysDeptService deptService;
-
-    /**
-     * 获取部门列表
-     */
-    @RequiresPermissions("system:dept:list")
-    @GetMapping("/list")
-    public AjaxResult list(SysDept dept)
-    {
-        List<SysDept> depts = deptService.selectDeptList(dept);
-        return AjaxResult.success(depts);
-    }
-
-    /**
-     * 查询部门列表(排除节点)
-     */
-    @RequiresPermissions("system:dept:list")
-    @GetMapping("/list/exclude/{deptId}")
-    public AjaxResult excludeChild(@PathVariable(value = "deptId", required = false) Long deptId)
-    {
-        List<SysDept> depts = deptService.selectDeptList(new SysDept());
-        Iterator<SysDept> it = depts.iterator();
-        while (it.hasNext())
-        {
-            SysDept d = (SysDept) it.next();
-            if (d.getDeptId().intValue() == deptId
-                    || ArrayUtils.contains(StringUtils.split(d.getAncestors(), ","), deptId + ""))
-            {
-                it.remove();
-            }
-        }
-        return AjaxResult.success(depts);
-    }
-
-    /**
-     * 根据部门编号获取详细信息
-     */
-    @RequiresPermissions("system:dept:query")
-    @GetMapping(value = "/{deptId}")
-    public AjaxResult getInfo(@PathVariable Long deptId)
-    {
-        deptService.checkDeptDataScope(deptId);
-        return AjaxResult.success(deptService.selectDeptById(deptId));
-    }
-
-    /**
-     * 获取部门下拉树列表
-     */
-    @GetMapping("/treeselect")
-    public AjaxResult treeselect(SysDept dept)
-    {
-        List<SysDept> depts = deptService.selectDeptList(dept);
-        return AjaxResult.success(deptService.buildDeptTreeSelect(depts));
-    }
-
-    /**
-     * 加载对应角色部门列表树
-     */
-    @GetMapping(value = "/roleDeptTreeselect/{roleId}")
-    public AjaxResult roleDeptTreeselect(@PathVariable("roleId") Long roleId)
-    {
-        List<SysDept> depts = deptService.selectDeptList(new SysDept());
-        AjaxResult ajax = AjaxResult.success();
-        ajax.put("checkedKeys", deptService.selectDeptListByRoleId(roleId));
-        ajax.put("depts", deptService.buildDeptTreeSelect(depts));
-        return ajax;
-    }
-
-    /**
-     * 新增部门
-     */
-    @RequiresPermissions("system:dept:add")
-    @Log(title = "部门管理", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@Validated @RequestBody SysDept dept)
-    {
-        if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
-        {
-            return AjaxResult.error("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在");
-        }
-        dept.setCreateBy(SecurityUtils.getUsername());
-        return toAjax(deptService.insertDept(dept));
-    }
-
-    /**
-     * 修改部门
-     */
-    @RequiresPermissions("system:dept:edit")
-    @Log(title = "部门管理", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@Validated @RequestBody SysDept dept)
-    {
-        Long deptId = dept.getDeptId();
-        deptService.checkDeptDataScope(deptId);
-        if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
-        {
-            return AjaxResult.error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在");
-        }
-        else if (dept.getParentId().equals(deptId))
-        {
-            return AjaxResult.error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己");
-        }
-        else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus()) && deptService.selectNormalChildrenDeptById(deptId) > 0)
-        {
-            return AjaxResult.error("该部门包含未停用的子部门!");
-        }
-        dept.setUpdateBy(SecurityUtils.getUsername());
-        return toAjax(deptService.updateDept(dept));
-    }
-
-    /**
-     * 删除部门
-     */
-    @RequiresPermissions("system:dept:remove")
-    @Log(title = "部门管理", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{deptId}")
-    public AjaxResult remove(@PathVariable Long deptId)
-    {
-        if (deptService.hasChildByDeptId(deptId))
-        {
-            return AjaxResult.error("存在下级部门,不允许删除");
-        }
-        if (deptService.checkDeptExistUser(deptId))
-        {
-            return AjaxResult.error("部门存在用户,不允许删除");
-        }
-        deptService.checkDeptDataScope(deptId);
-        return toAjax(deptService.deleteDeptById(deptId));
-    }
-}

+ 0 - 122
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysDictDataController.java

@@ -1,122 +0,0 @@
-package com.ruoyi.system.controller;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.common.core.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.core.web.page.TableDataInfo;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.security.annotation.RequiresPermissions;
-import com.ruoyi.common.security.utils.SecurityUtils;
-import com.ruoyi.system.api.domain.SysDictData;
-import com.ruoyi.system.service.ISysDictDataService;
-import com.ruoyi.system.service.ISysDictTypeService;
-
-/**
- * 数据字典信息
- * 
- * @author ruoyi
- */
-@RestController
-@RequestMapping("/dict/data")
-public class SysDictDataController extends BaseController
-{
-    @Autowired
-    private ISysDictDataService dictDataService;
-    
-    @Autowired
-    private ISysDictTypeService dictTypeService;
-
-    @RequiresPermissions("system:dict:list")
-    @GetMapping("/list")
-    public TableDataInfo list(SysDictData dictData)
-    {
-        startPage();
-        List<SysDictData> list = dictDataService.selectDictDataList(dictData);
-        return getDataTable(list);
-    }
-
-    @Log(title = "字典数据", businessType = BusinessType.EXPORT)
-    @RequiresPermissions("system:dict:export")
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, SysDictData dictData)
-    {
-        List<SysDictData> list = dictDataService.selectDictDataList(dictData);
-        ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class);
-        util.exportExcel(response, list, "字典数据");
-    }
-
-    /**
-     * 查询字典数据详细
-     */
-    @RequiresPermissions("system:dict:query")
-    @GetMapping(value = "/{dictCode}")
-    public AjaxResult getInfo(@PathVariable Long dictCode)
-    {
-        return AjaxResult.success(dictDataService.selectDictDataById(dictCode));
-    }
-
-    /**
-     * 根据字典类型查询字典数据信息
-     */
-    @GetMapping(value = "/type/{dictType}")
-    public AjaxResult dictType(@PathVariable String dictType)
-    {
-        List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
-        if (StringUtils.isNull(data))
-        {
-            data = new ArrayList<SysDictData>();
-        }
-        return AjaxResult.success(data);
-    }
-
-    /**
-     * 新增字典类型
-     */
-    @RequiresPermissions("system:dict:add")
-    @Log(title = "字典数据", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@Validated @RequestBody SysDictData dict)
-    {
-        dict.setCreateBy(SecurityUtils.getUsername());
-        return toAjax(dictDataService.insertDictData(dict));
-    }
-
-    /**
-     * 修改保存字典类型
-     */
-    @RequiresPermissions("system:dict:edit")
-    @Log(title = "字典数据", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@Validated @RequestBody SysDictData dict)
-    {
-        dict.setUpdateBy(SecurityUtils.getUsername());
-        return toAjax(dictDataService.updateDictData(dict));
-    }
-
-    /**
-     * 删除字典类型
-     */
-    @RequiresPermissions("system:dict:remove")
-    @Log(title = "字典类型", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{dictCodes}")
-    public AjaxResult remove(@PathVariable Long[] dictCodes)
-    {
-        dictDataService.deleteDictDataByIds(dictCodes);
-        return success();
-    }
-}

+ 0 - 133
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysDictTypeController.java

@@ -1,133 +0,0 @@
-package com.ruoyi.system.controller;
-
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.core.constant.UserConstants;
-import com.ruoyi.common.core.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.core.web.page.TableDataInfo;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.security.annotation.RequiresPermissions;
-import com.ruoyi.common.security.utils.SecurityUtils;
-import com.ruoyi.system.api.domain.SysDictType;
-import com.ruoyi.system.service.ISysDictTypeService;
-
-/**
- * 数据字典信息
- * 
- * @author ruoyi
- */
-@RestController
-@RequestMapping("/dict/type")
-public class SysDictTypeController extends BaseController
-{
-    @Autowired
-    private ISysDictTypeService dictTypeService;
-
-    @RequiresPermissions("system:dict:list")
-    @GetMapping("/list")
-    public TableDataInfo list(SysDictType dictType)
-    {
-        startPage();
-        List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
-        return getDataTable(list);
-    }
-
-    @Log(title = "字典类型", businessType = BusinessType.EXPORT)
-    @RequiresPermissions("system:dict:export")
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, SysDictType dictType)
-    {
-        List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
-        ExcelUtil<SysDictType> util = new ExcelUtil<SysDictType>(SysDictType.class);
-        util.exportExcel(response, list, "字典类型");
-    }
-
-    /**
-     * 查询字典类型详细
-     */
-    @RequiresPermissions("system:dict:query")
-    @GetMapping(value = "/{dictId}")
-    public AjaxResult getInfo(@PathVariable Long dictId)
-    {
-        return AjaxResult.success(dictTypeService.selectDictTypeById(dictId));
-    }
-
-    /**
-     * 新增字典类型
-     */
-    @RequiresPermissions("system:dict:add")
-    @Log(title = "字典类型", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@Validated @RequestBody SysDictType dict)
-    {
-        if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
-        {
-            return AjaxResult.error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在");
-        }
-        dict.setCreateBy(SecurityUtils.getUsername());
-        return toAjax(dictTypeService.insertDictType(dict));
-    }
-
-    /**
-     * 修改字典类型
-     */
-    @RequiresPermissions("system:dict:edit")
-    @Log(title = "字典类型", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@Validated @RequestBody SysDictType dict)
-    {
-        if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
-        {
-            return AjaxResult.error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
-        }
-        dict.setUpdateBy(SecurityUtils.getUsername());
-        return toAjax(dictTypeService.updateDictType(dict));
-    }
-
-    /**
-     * 删除字典类型
-     */
-    @RequiresPermissions("system:dict:remove")
-    @Log(title = "字典类型", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{dictIds}")
-    public AjaxResult remove(@PathVariable Long[] dictIds)
-    {
-        dictTypeService.deleteDictTypeByIds(dictIds);
-        return success();
-    }
-
-    /**
-     * 刷新字典缓存
-     */
-    @RequiresPermissions("system:dict:remove")
-    @Log(title = "字典类型", businessType = BusinessType.CLEAN)
-    @DeleteMapping("/refreshCache")
-    public AjaxResult refreshCache()
-    {
-        dictTypeService.resetDictCache();
-        return AjaxResult.success();
-    }
-
-    /**
-     * 获取字典选择框列表
-     */
-    @GetMapping("/optionselect")
-    public AjaxResult optionselect()
-    {
-        List<SysDictType> dictTypes = dictTypeService.selectDictTypeAll();
-        return AjaxResult.success(dictTypes);
-    }
-}

+ 0 - 85
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysLoginController.java

@@ -1,85 +0,0 @@
-package com.ruoyi.system.controller;
-
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.core.utils.JwtUtils;
-import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.common.security.auth.AuthUtil;
-import com.ruoyi.common.security.service.TokenService;
-import com.ruoyi.common.security.utils.SecurityUtils;
-import com.ruoyi.system.api.model.LoginUser;
-import com.ruoyi.system.domain.vo.LoginBody;
-import com.ruoyi.system.domain.vo.RegisterBody;
-import com.ruoyi.system.service.SysLoginService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * token 控制
- * 
- * @author ruoyi
- */
-@RestController
-public class SysLoginController
-{
-    @Autowired
-    private TokenService tokenService;
-
-    @Autowired
-    private SysLoginService sysLoginService;
-
-    @PostMapping("login")
-    public R<?> login(@RequestBody LoginBody form)
-    {
-        // 用户登录
-        LoginUser userInfo = sysLoginService.login(form.getUsername(), form.getPassword());
-        // 获取登录token
-        return R.ok(tokenService.createToken(userInfo));
-    }
-
-    @PostMapping("login1")
-    public R<?> login1(@RequestBody LoginBody form)
-    {
-        // 用户登录
-        LoginUser userInfo = sysLoginService.login(form.getUsername(), form.getPassword());
-        // 获取登录token
-        return R.ok(tokenService.createToken(userInfo));
-    }
-
-    @DeleteMapping("logout")
-    public R<?> logout(HttpServletRequest request)
-    {
-        String token = SecurityUtils.getToken(request);
-        if (StringUtils.isNotEmpty(token))
-        {
-            String username = JwtUtils.getUserName(token);
-            // 删除用户缓存记录
-            AuthUtil.logoutByToken(token);
-            // 记录用户退出日志
-            sysLoginService.logout(username);
-        }
-        return R.ok();
-    }
-
-    @PostMapping("refresh")
-    public R<?> refresh(HttpServletRequest request)
-    {
-        LoginUser loginUser = tokenService.getLoginUser(request);
-        if (StringUtils.isNotNull(loginUser))
-        {
-            // 刷新令牌有效期
-            tokenService.refreshToken(loginUser);
-            return R.ok();
-        }
-        return R.ok();
-    }
-
-    @PostMapping("register")
-    public R<?> register(@RequestBody RegisterBody registerBody)
-    {
-        // 用户注册
-        sysLoginService.register(registerBody.getUsername(), registerBody.getPassword());
-        return R.ok();
-    }
-}

+ 0 - 78
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysLogininforController.java

@@ -1,78 +0,0 @@
-package com.ruoyi.system.controller;
-
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.core.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.core.web.page.TableDataInfo;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.security.annotation.InnerAuth;
-import com.ruoyi.common.security.annotation.RequiresPermissions;
-import com.ruoyi.system.api.domain.SysLogininfor;
-import com.ruoyi.system.service.ISysLogininforService;
-
-/**
- * 系统访问记录
- * 
- * @author ruoyi
- */
-@RestController
-@RequestMapping("/logininfor")
-public class SysLogininforController extends BaseController
-{
-    @Autowired
-    private ISysLogininforService logininforService;
-
-    @RequiresPermissions("system:logininfor:list")
-    @GetMapping("/list")
-    public TableDataInfo list(SysLogininfor logininfor)
-    {
-        startPage();
-        List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
-        return getDataTable(list);
-    }
-
-    @Log(title = "登录日志", businessType = BusinessType.EXPORT)
-    @RequiresPermissions("system:logininfor:export")
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, SysLogininfor logininfor)
-    {
-        List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
-        ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class);
-        util.exportExcel(response, list, "登录日志");
-    }
-
-    @RequiresPermissions("system:logininfor:remove")
-    @Log(title = "登录日志", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{infoIds}")
-    public AjaxResult remove(@PathVariable Long[] infoIds)
-    {
-        return toAjax(logininforService.deleteLogininforByIds(infoIds));
-    }
-
-    @RequiresPermissions("system:logininfor:remove")
-    @Log(title = "登录日志", businessType = BusinessType.DELETE)
-    @DeleteMapping("/clean")
-    public AjaxResult clean()
-    {
-        logininforService.cleanLogininfor();
-        return AjaxResult.success();
-    }
-
-    @InnerAuth
-    @PostMapping
-    public AjaxResult add(@RequestBody SysLogininfor logininfor)
-    {
-        return toAjax(logininforService.insertLogininfor(logininfor));
-    }
-}

+ 0 - 159
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysMenuController.java

@@ -1,159 +0,0 @@
-package com.ruoyi.system.controller;
-
-import java.util.List;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.core.constant.UserConstants;
-import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.security.annotation.RequiresPermissions;
-import com.ruoyi.common.security.utils.SecurityUtils;
-import com.ruoyi.system.domain.SysMenu;
-import com.ruoyi.system.service.ISysMenuService;
-
-/**
- * 菜单信息
- * 
- * @author ruoyi
- */
-@RestController
-@RequestMapping("/menu")
-public class SysMenuController extends BaseController
-{
-    @Autowired
-    private ISysMenuService menuService;
-
-    /**
-     * 获取菜单列表
-     */
-    @RequiresPermissions("system:menu:list")
-    @GetMapping("/list")
-    public AjaxResult list(SysMenu menu)
-    {
-        Long userId = SecurityUtils.getUserId();
-        List<SysMenu> menus = menuService.selectMenuList(menu, userId);
-        return AjaxResult.success(menus);
-    }
-
-    /**
-     * 根据菜单编号获取详细信息
-     */
-    @RequiresPermissions("system:menu:query")
-    @GetMapping(value = "/{menuId}")
-    public AjaxResult getInfo(@PathVariable Long menuId)
-    {
-        return AjaxResult.success(menuService.selectMenuById(menuId));
-    }
-
-    /**
-     * 获取菜单下拉树列表
-     */
-    @GetMapping("/treeselect")
-    public AjaxResult treeselect(SysMenu menu)
-    {
-        Long userId = SecurityUtils.getUserId();
-        List<SysMenu> menus = menuService.selectMenuList(menu, userId);
-        return AjaxResult.success(menuService.buildMenuTreeSelect(menus));
-    }
-
-    /**
-     * 加载对应角色菜单列表树
-     */
-    @GetMapping(value = "/roleMenuTreeselect/{roleId}")
-    public AjaxResult roleMenuTreeselect(@PathVariable("roleId") Long roleId)
-    {
-        Long userId = SecurityUtils.getUserId();
-        List<SysMenu> menus = menuService.selectMenuList(userId);
-        AjaxResult ajax = AjaxResult.success();
-        ajax.put("checkedKeys", menuService.selectMenuListByRoleId(roleId));
-        ajax.put("menus", menuService.buildMenuTreeSelect(menus));
-        return ajax;
-    }
-
-    /**
-     * 新增菜单
-     */
-    @RequiresPermissions("system:menu:add")
-    @Log(title = "菜单管理", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@Validated @RequestBody SysMenu menu)
-    {
-        if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu)))
-        {
-            return AjaxResult.error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
-        }
-        else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath()))
-        {
-            return AjaxResult.error("新增菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头");
-        }
-        menu.setCreateBy(SecurityUtils.getUsername());
-        return toAjax(menuService.insertMenu(menu));
-    }
-
-    /**
-     * 修改菜单
-     */
-    @RequiresPermissions("system:menu:edit")
-    @Log(title = "菜单管理", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@Validated @RequestBody SysMenu menu)
-    {
-        if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu)))
-        {
-            return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
-        }
-        else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath()))
-        {
-            return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头");
-        }
-        else if (menu.getMenuId().equals(menu.getParentId()))
-        {
-            return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,上级菜单不能选择自己");
-        }
-        menu.setUpdateBy(SecurityUtils.getUsername());
-        return toAjax(menuService.updateMenu(menu));
-    }
-
-    /**
-     * 删除菜单
-     */
-    @RequiresPermissions("system:menu:remove")
-    @Log(title = "菜单管理", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{menuId}")
-    public AjaxResult remove(@PathVariable("menuId") Long menuId)
-    {
-        if (menuService.hasChildByMenuId(menuId))
-        {
-            return AjaxResult.error("存在子菜单,不允许删除");
-        }
-        if (menuService.checkMenuExistRole(menuId))
-        {
-            return AjaxResult.error("菜单已分配,不允许删除");
-        }
-        return toAjax(menuService.deleteMenuById(menuId));
-    }
-
-    /**
-     * 获取路由信息
-     * 
-     * @return 路由信息
-     */
-    @GetMapping("getRouters")
-    public AjaxResult getRouters()
-    {
-        Long userId = SecurityUtils.getUserId();
-        List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
-        return AjaxResult.success(menuService.buildMenus(menus));
-    }
-}

+ 0 - 92
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysNoticeController.java

@@ -1,92 +0,0 @@
-package com.ruoyi.system.controller;
-
-import java.util.List;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.core.web.page.TableDataInfo;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.security.annotation.RequiresPermissions;
-import com.ruoyi.common.security.utils.SecurityUtils;
-import com.ruoyi.system.domain.SysNotice;
-import com.ruoyi.system.service.ISysNoticeService;
-
-/**
- * 公告 信息操作处理
- * 
- * @author ruoyi
- */
-@RestController
-@RequestMapping("/notice")
-public class SysNoticeController extends BaseController
-{
-    @Autowired
-    private ISysNoticeService noticeService;
-
-    /**
-     * 获取通知公告列表
-     */
-    @RequiresPermissions("system:notice:list")
-    @GetMapping("/list")
-    public TableDataInfo list(SysNotice notice)
-    {
-        startPage();
-        List<SysNotice> list = noticeService.selectNoticeList(notice);
-        return getDataTable(list);
-    }
-
-    /**
-     * 根据通知公告编号获取详细信息
-     */
-    @RequiresPermissions("system:notice:query")
-    @GetMapping(value = "/{noticeId}")
-    public AjaxResult getInfo(@PathVariable Long noticeId)
-    {
-        return AjaxResult.success(noticeService.selectNoticeById(noticeId));
-    }
-
-    /**
-     * 新增通知公告
-     */
-    @RequiresPermissions("system:notice:add")
-    @Log(title = "通知公告", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@Validated @RequestBody SysNotice notice)
-    {
-        notice.setCreateBy(SecurityUtils.getUsername());
-        return toAjax(noticeService.insertNotice(notice));
-    }
-
-    /**
-     * 修改通知公告
-     */
-    @RequiresPermissions("system:notice:edit")
-    @Log(title = "通知公告", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@Validated @RequestBody SysNotice notice)
-    {
-        notice.setUpdateBy(SecurityUtils.getUsername());
-        return toAjax(noticeService.updateNotice(notice));
-    }
-
-    /**
-     * 删除通知公告
-     */
-    @RequiresPermissions("system:notice:remove")
-    @Log(title = "通知公告", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{noticeIds}")
-    public AjaxResult remove(@PathVariable Long[] noticeIds)
-    {
-        return toAjax(noticeService.deleteNoticeByIds(noticeIds));
-    }
-}

+ 0 - 78
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysOperlogController.java

@@ -1,78 +0,0 @@
-package com.ruoyi.system.controller;
-
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.core.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.core.web.page.TableDataInfo;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.security.annotation.InnerAuth;
-import com.ruoyi.common.security.annotation.RequiresPermissions;
-import com.ruoyi.system.api.domain.SysOperLog;
-import com.ruoyi.system.service.ISysOperLogService;
-
-/**
- * 操作日志记录
- * 
- * @author ruoyi
- */
-@RestController
-@RequestMapping("/operlog")
-public class SysOperlogController extends BaseController
-{
-    @Autowired
-    private ISysOperLogService operLogService;
-
-    @RequiresPermissions("system:operlog:list")
-    @GetMapping("/list")
-    public TableDataInfo list(SysOperLog operLog)
-    {
-        startPage();
-        List<SysOperLog> list = operLogService.selectOperLogList(operLog);
-        return getDataTable(list);
-    }
-
-    @Log(title = "操作日志", businessType = BusinessType.EXPORT)
-    @RequiresPermissions("system:operlog:export")
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, SysOperLog operLog)
-    {
-        List<SysOperLog> list = operLogService.selectOperLogList(operLog);
-        ExcelUtil<SysOperLog> util = new ExcelUtil<SysOperLog>(SysOperLog.class);
-        util.exportExcel(response, list, "操作日志");
-    }
-
-    @Log(title = "操作日志", businessType = BusinessType.DELETE)
-    @RequiresPermissions("system:operlog:remove")
-    @DeleteMapping("/{operIds}")
-    public AjaxResult remove(@PathVariable Long[] operIds)
-    {
-        return toAjax(operLogService.deleteOperLogByIds(operIds));
-    }
-
-    @RequiresPermissions("system:operlog:remove")
-    @Log(title = "操作日志", businessType = BusinessType.CLEAN)
-    @DeleteMapping("/clean")
-    public AjaxResult clean()
-    {
-        operLogService.cleanOperLog();
-        return AjaxResult.success();
-    }
-
-    @InnerAuth
-    @PostMapping
-    public AjaxResult add(@RequestBody SysOperLog operLog)
-    {
-        return toAjax(operLogService.insertOperlog(operLog));
-    }
-}

+ 0 - 106
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysPlatformController.java

@@ -1,106 +0,0 @@
-package com.ruoyi.system.controller;
-
-import java.util.List;
-import java.io.IOException;
-import javax.servlet.http.HttpServletResponse;
-
-import com.ruoyi.system.domain.SysPlatform;
-import com.ruoyi.system.service.ISysPlatformService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.security.annotation.RequiresPermissions;
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.core.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.web.page.TableDataInfo;
-
-/**
- * 平台信息Controller
- * 
- * @author usky
- * @date 2022-04-29
- */
-@RestController
-@RequestMapping("/platform")
-public class SysPlatformController extends BaseController
-{
-    @Autowired
-    private ISysPlatformService sysPlatformService;
-
-    /**
-     * 查询平台信息列表
-     */
-    @RequiresPermissions("system:platform:list")
-    @GetMapping("/list")
-    public TableDataInfo list(SysPlatform sysPlatform)
-    {
-        startPage();
-        List<SysPlatform> list = sysPlatformService.selectSysPlatformList(sysPlatform);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出平台信息列表
-     */
-    @RequiresPermissions("system:platform:export")
-    @Log(title = "平台信息", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, SysPlatform sysPlatform)
-    {
-        List<SysPlatform> list = sysPlatformService.selectSysPlatformList(sysPlatform);
-        ExcelUtil<SysPlatform> util = new ExcelUtil<SysPlatform>(SysPlatform.class);
-        util.exportExcel(response, list, "平台信息数据");
-    }
-
-    /**
-     * 获取平台信息详细信息
-     */
-    @RequiresPermissions("system:platform:query")
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
-        return AjaxResult.success(sysPlatformService.selectSysPlatformById(id));
-    }
-
-    /**
-     * 新增平台信息
-     */
-    @RequiresPermissions("system:platform:add")
-    @Log(title = "平台信息", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody SysPlatform sysPlatform)
-    {
-        return toAjax(sysPlatformService.insertSysPlatform(sysPlatform));
-    }
-
-    /**
-     * 修改平台信息
-     */
-    @RequiresPermissions("system:platform:edit")
-    @Log(title = "平台信息", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody SysPlatform sysPlatform)
-    {
-        return toAjax(sysPlatformService.updateSysPlatform(sysPlatform));
-    }
-
-    /**
-     * 删除平台信息
-     */
-    @RequiresPermissions("system:platform:remove")
-    @Log(title = "平台信息", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
-        return toAjax(sysPlatformService.deleteSysPlatformByIds(ids));
-    }
-}

+ 0 - 106
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysPlatformMenuController.java

@@ -1,106 +0,0 @@
-package com.ruoyi.system.controller;
-
-import java.util.List;
-import java.io.IOException;
-import javax.servlet.http.HttpServletResponse;
-
-import com.ruoyi.system.domain.SysPlatformMenu;
-import com.ruoyi.system.service.ISysPlatformMenuService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.security.annotation.RequiresPermissions;
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.core.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.web.page.TableDataInfo;
-
-/**
- * 平台和菜单关联Controller
- * 
- * @author usky
- * @date 2022-04-29
- */
-@RestController
-@RequestMapping("/platformMenu")
-public class SysPlatformMenuController extends BaseController
-{
-    @Autowired
-    private ISysPlatformMenuService sysPlatformMenuService;
-
-    /**
-     * 查询平台和菜单关联列表
-     */
-    @RequiresPermissions("system:menu:list")
-    @GetMapping("/list")
-    public TableDataInfo list(SysPlatformMenu sysPlatformMenu)
-    {
-        startPage();
-        List<SysPlatformMenu> list = sysPlatformMenuService.selectSysPlatformMenuList(sysPlatformMenu);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出平台和菜单关联列表
-     */
-    @RequiresPermissions("system:menu:export")
-    @Log(title = "平台和菜单关联", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, SysPlatformMenu sysPlatformMenu)
-    {
-        List<SysPlatformMenu> list = sysPlatformMenuService.selectSysPlatformMenuList(sysPlatformMenu);
-        ExcelUtil<SysPlatformMenu> util = new ExcelUtil<SysPlatformMenu>(SysPlatformMenu.class);
-        util.exportExcel(response, list, "平台和菜单关联数据");
-    }
-
-    /**
-     * 获取平台和菜单关联详细信息
-     */
-    @RequiresPermissions("system:menu:query")
-    @GetMapping(value = "/{platformId}")
-    public AjaxResult getInfo(@PathVariable("platformId") Long platformId)
-    {
-        return AjaxResult.success(sysPlatformMenuService.selectSysPlatformMenuByPlatformId(platformId));
-    }
-
-    /**
-     * 新增平台和菜单关联
-     */
-    @RequiresPermissions("system:menu:add")
-    @Log(title = "平台和菜单关联", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody SysPlatformMenu sysPlatformMenu)
-    {
-        return toAjax(sysPlatformMenuService.insertSysPlatformMenu(sysPlatformMenu));
-    }
-
-    /**
-     * 修改平台和菜单关联
-     */
-    @RequiresPermissions("system:menu:edit")
-    @Log(title = "平台和菜单关联", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody SysPlatformMenu sysPlatformMenu)
-    {
-        return toAjax(sysPlatformMenuService.updateSysPlatformMenu(sysPlatformMenu));
-    }
-
-    /**
-     * 删除平台和菜单关联
-     */
-    @RequiresPermissions("system:menu:remove")
-    @Log(title = "平台和菜单关联", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{platformIds}")
-    public AjaxResult remove(@PathVariable Long[] platformIds)
-    {
-        return toAjax(sysPlatformMenuService.deleteSysPlatformMenuByPlatformIds(platformIds));
-    }
-}

+ 0 - 131
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysPostController.java

@@ -1,131 +0,0 @@
-package com.ruoyi.system.controller;
-
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.core.constant.UserConstants;
-import com.ruoyi.common.core.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.core.web.page.TableDataInfo;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.security.annotation.RequiresPermissions;
-import com.ruoyi.common.security.utils.SecurityUtils;
-import com.ruoyi.system.domain.SysPost;
-import com.ruoyi.system.service.ISysPostService;
-
-/**
- * 岗位信息操作处理
- * 
- * @author ruoyi
- */
-@RestController
-@RequestMapping("/post")
-public class SysPostController extends BaseController
-{
-    @Autowired
-    private ISysPostService postService;
-
-    /**
-     * 获取岗位列表
-     */
-    @RequiresPermissions("system:post:list")
-    @GetMapping("/list")
-    public TableDataInfo list(SysPost post)
-    {
-        startPage();
-        List<SysPost> list = postService.selectPostList(post);
-        return getDataTable(list);
-    }
-
-    @Log(title = "岗位管理", businessType = BusinessType.EXPORT)
-    @RequiresPermissions("system:post:export")
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, SysPost post)
-    {
-        List<SysPost> list = postService.selectPostList(post);
-        ExcelUtil<SysPost> util = new ExcelUtil<SysPost>(SysPost.class);
-        util.exportExcel(response, list, "岗位数据");
-    }
-
-    /**
-     * 根据岗位编号获取详细信息
-     */
-    @RequiresPermissions("system:post:query")
-    @GetMapping(value = "/{postId}")
-    public AjaxResult getInfo(@PathVariable Long postId)
-    {
-        return AjaxResult.success(postService.selectPostById(postId));
-    }
-
-    /**
-     * 新增岗位
-     */
-    @RequiresPermissions("system:post:add")
-    @Log(title = "岗位管理", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@Validated @RequestBody SysPost post)
-    {
-        if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
-        {
-            return AjaxResult.error("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在");
-        }
-        else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
-        {
-            return AjaxResult.error("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在");
-        }
-        post.setCreateBy(SecurityUtils.getUsername());
-        return toAjax(postService.insertPost(post));
-    }
-
-    /**
-     * 修改岗位
-     */
-    @RequiresPermissions("system:post:edit")
-    @Log(title = "岗位管理", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@Validated @RequestBody SysPost post)
-    {
-        if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
-        {
-            return AjaxResult.error("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在");
-        }
-        else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
-        {
-            return AjaxResult.error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在");
-        }
-        post.setUpdateBy(SecurityUtils.getUsername());
-        return toAjax(postService.updatePost(post));
-    }
-
-    /**
-     * 删除岗位
-     */
-    @RequiresPermissions("system:post:remove")
-    @Log(title = "岗位管理", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{postIds}")
-    public AjaxResult remove(@PathVariable Long[] postIds)
-    {
-        return toAjax(postService.deletePostByIds(postIds));
-    }
-
-    /**
-     * 获取岗位选择框列表
-     */
-    @GetMapping("/optionselect")
-    public AjaxResult optionselect()
-    {
-        List<SysPost> posts = postService.selectPostAll();
-        return AjaxResult.success(posts);
-    }
-}

+ 0 - 152
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysProfileController.java

@@ -1,152 +0,0 @@
-package com.ruoyi.system.controller;
-
-import java.io.IOException;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-import com.ruoyi.common.core.constant.UserConstants;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.security.service.TokenService;
-import com.ruoyi.common.security.utils.SecurityUtils;
-import com.ruoyi.system.api.RemoteFileService;
-import com.ruoyi.system.api.domain.SysFile;
-import com.ruoyi.system.api.domain.SysUser;
-import com.ruoyi.system.api.model.LoginUser;
-import com.ruoyi.system.service.ISysUserService;
-
-/**
- * 个人信息 业务处理
- * 
- * @author ruoyi
- */
-@RestController
-@RequestMapping("/user/profile")
-public class SysProfileController extends BaseController
-{
-    @Autowired
-    private ISysUserService userService;
-    
-    @Autowired
-    private TokenService tokenService;
-    
-    @Autowired
-    private RemoteFileService remoteFileService;
-
-    /**
-     * 个人信息
-     */
-    @GetMapping
-    public AjaxResult profile()
-    {
-        String username = SecurityUtils.getUsername();
-        SysUser user = userService.selectUserByUserName(username);
-        AjaxResult ajax = AjaxResult.success(user);
-        ajax.put("roleGroup", userService.selectUserRoleGroup(username));
-        ajax.put("postGroup", userService.selectUserPostGroup(username));
-        return ajax;
-    }
-
-    /**
-     * 修改用户
-     */
-    @Log(title = "个人信息", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult updateProfile(@RequestBody SysUser user)
-    {
-        LoginUser loginUser = SecurityUtils.getLoginUser();
-        SysUser sysUser = loginUser.getSysUser();
-        user.setUserName(sysUser.getUserName());
-        if (StringUtils.isNotEmpty(user.getPhonenumber())
-                && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
-        {
-            return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
-        }
-        else if (StringUtils.isNotEmpty(user.getEmail())
-                && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
-        {
-            return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
-        }
-        user.setUserId(sysUser.getUserId());
-        user.setPassword(null);
-        if (userService.updateUserProfile(user) > 0)
-        {
-            // 更新缓存用户信息
-            loginUser.getSysUser().setNickName(user.getNickName());
-            loginUser.getSysUser().setPhonenumber(user.getPhonenumber());
-            loginUser.getSysUser().setEmail(user.getEmail());
-            loginUser.getSysUser().setSex(user.getSex());
-            tokenService.setLoginUser(loginUser);
-            return AjaxResult.success();
-        }
-        return AjaxResult.error("修改个人信息异常,请联系管理员");
-    }
-
-    /**
-     * 重置密码
-     */
-    @Log(title = "个人信息", businessType = BusinessType.UPDATE)
-    @PutMapping("/updatePwd")
-    public AjaxResult updatePwd(String oldPassword, String newPassword)
-    {
-        String username = SecurityUtils.getUsername();
-        SysUser user = userService.selectUserByUserName(username);
-        String password = user.getPassword();
-        if (!SecurityUtils.matchesPassword(oldPassword, password))
-        {
-            return AjaxResult.error("修改密码失败,旧密码错误");
-        }
-        if (SecurityUtils.matchesPassword(newPassword, password))
-        {
-            return AjaxResult.error("新密码不能与旧密码相同");
-        }
-        if (userService.resetUserPwd(username, SecurityUtils.encryptPassword(newPassword)) > 0)
-        {
-            // 更新缓存用户密码
-            LoginUser loginUser = SecurityUtils.getLoginUser();
-            loginUser.getSysUser().setPassword(SecurityUtils.encryptPassword(newPassword));
-            tokenService.setLoginUser(loginUser);
-            return AjaxResult.success();
-        }
-        return AjaxResult.error("修改密码异常,请联系管理员");
-    }
-    
-    /**
-     * 头像上传
-     */
-    @Log(title = "用户头像", businessType = BusinessType.UPDATE)
-    @PostMapping("/avatar")
-    public AjaxResult avatar(@RequestParam("avatarfile") MultipartFile file) throws IOException
-    {
-        if (!file.isEmpty())
-        {
-            LoginUser loginUser = SecurityUtils.getLoginUser();
-            R<SysFile> fileResult = remoteFileService.upload(file);
-            if (StringUtils.isNull(fileResult) || StringUtils.isNull(fileResult.getData()))
-            {
-                return AjaxResult.error("文件服务异常,请联系管理员");
-            }
-            String url = fileResult.getData().getUrl();
-            if (userService.updateUserAvatar(loginUser.getUsername(), url))
-            {
-                AjaxResult ajax = AjaxResult.success();
-                ajax.put("imgUrl", url);
-                // 更新缓存用户头像
-                loginUser.getSysUser().setAvatar(url);
-                tokenService.setLoginUser(loginUser);
-                return ajax;
-            }
-        }
-        return AjaxResult.error("上传图片异常,请联系管理员");
-    }
-}

+ 0 - 222
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysRoleController.java

@@ -1,222 +0,0 @@
-package com.ruoyi.system.controller;
-
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.core.constant.UserConstants;
-import com.ruoyi.common.core.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.core.web.page.TableDataInfo;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.security.annotation.RequiresPermissions;
-import com.ruoyi.common.security.utils.SecurityUtils;
-import com.ruoyi.system.api.domain.SysRole;
-import com.ruoyi.system.api.domain.SysUser;
-import com.ruoyi.system.domain.SysUserRole;
-import com.ruoyi.system.service.ISysRoleService;
-import com.ruoyi.system.service.ISysUserService;
-
-/**
- * 角色信息
- * 
- * @author ruoyi
- */
-@RestController
-@RequestMapping("/role")
-public class SysRoleController extends BaseController
-{
-    @Autowired
-    private ISysRoleService roleService;
-
-    @Autowired
-    private ISysUserService userService;
-
-    @RequiresPermissions("system:role:list")
-    @GetMapping("/list")
-    public TableDataInfo list(SysRole role)
-    {
-        startPage();
-        List<SysRole> list = roleService.selectRoleList(role);
-        return getDataTable(list);
-    }
-
-    @Log(title = "角色管理", businessType = BusinessType.EXPORT)
-    @RequiresPermissions("system:role:export")
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, SysRole role)
-    {
-        List<SysRole> list = roleService.selectRoleList(role);
-        ExcelUtil<SysRole> util = new ExcelUtil<SysRole>(SysRole.class);
-        util.exportExcel(response, list, "角色数据");
-    }
-
-    /**
-     * 根据角色编号获取详细信息
-     */
-    @RequiresPermissions("system:role:query")
-    @GetMapping(value = "/{roleId}")
-    public AjaxResult getInfo(@PathVariable Long roleId)
-    {
-        roleService.checkRoleDataScope(roleId);
-        return AjaxResult.success(roleService.selectRoleById(roleId));
-    }
-
-    /**
-     * 新增角色
-     */
-    @RequiresPermissions("system:role:add")
-    @Log(title = "角色管理", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@Validated @RequestBody SysRole role)
-    {
-        if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
-        {
-            return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色名称已存在");
-        }
-        else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
-        {
-            return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
-        }
-        role.setCreateBy(SecurityUtils.getUsername());
-        return toAjax(roleService.insertRole(role));
-
-    }
-
-    /**
-     * 修改保存角色
-     */
-    @RequiresPermissions("system:role:edit")
-    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@Validated @RequestBody SysRole role)
-    {
-        roleService.checkRoleAllowed(role);
-        roleService.checkRoleDataScope(role.getRoleId());
-        if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
-        {
-            return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在");
-        }
-        else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
-        {
-            return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在");
-        }
-        role.setUpdateBy(SecurityUtils.getUsername());
-        return toAjax(roleService.updateRole(role));
-    }
-
-    /**
-     * 修改保存数据权限
-     */
-    @RequiresPermissions("system:role:edit")
-    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
-    @PutMapping("/dataScope")
-    public AjaxResult dataScope(@RequestBody SysRole role)
-    {
-        roleService.checkRoleAllowed(role);
-        roleService.checkRoleDataScope(role.getRoleId());
-        return toAjax(roleService.authDataScope(role));
-    }
-
-    /**
-     * 状态修改
-     */
-    @RequiresPermissions("system:role:edit")
-    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
-    @PutMapping("/changeStatus")
-    public AjaxResult changeStatus(@RequestBody SysRole role)
-    {
-        roleService.checkRoleAllowed(role);
-        roleService.checkRoleDataScope(role.getRoleId());
-        role.setUpdateBy(SecurityUtils.getUsername());
-        return toAjax(roleService.updateRoleStatus(role));
-    }
-
-    /**
-     * 删除角色
-     */
-    @RequiresPermissions("system:role:remove")
-    @Log(title = "角色管理", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{roleIds}")
-    public AjaxResult remove(@PathVariable Long[] roleIds)
-    {
-        return toAjax(roleService.deleteRoleByIds(roleIds));
-    }
-
-    /**
-     * 获取角色选择框列表
-     */
-    @RequiresPermissions("system:role:query")
-    @GetMapping("/optionselect")
-    public AjaxResult optionselect()
-    {
-        return AjaxResult.success(roleService.selectRoleAll());
-    }
-    /**
-     * 查询已分配用户角色列表
-     */
-    @RequiresPermissions("system:role:list")
-    @GetMapping("/authUser/allocatedList")
-    public TableDataInfo allocatedList(SysUser user)
-    {
-        startPage();
-        List<SysUser> list = userService.selectAllocatedList(user);
-        return getDataTable(list);
-    }
-
-    /**
-     * 查询未分配用户角色列表
-     */
-    @RequiresPermissions("system:role:list")
-    @GetMapping("/authUser/unallocatedList")
-    public TableDataInfo unallocatedList(SysUser user)
-    {
-        startPage();
-        List<SysUser> list = userService.selectUnallocatedList(user);
-        return getDataTable(list);
-    }
-
-    /**
-     * 取消授权用户
-     */
-    @RequiresPermissions("system:role:edit")
-    @Log(title = "角色管理", businessType = BusinessType.GRANT)
-    @PutMapping("/authUser/cancel")
-    public AjaxResult cancelAuthUser(@RequestBody SysUserRole userRole)
-    {
-        return toAjax(roleService.deleteAuthUser(userRole));
-    }
-
-    /**
-     * 批量取消授权用户
-     */
-    @RequiresPermissions("system:role:edit")
-    @Log(title = "角色管理", businessType = BusinessType.GRANT)
-    @PutMapping("/authUser/cancelAll")
-    public AjaxResult cancelAuthUserAll(Long roleId, Long[] userIds)
-    {
-        return toAjax(roleService.deleteAuthUsers(roleId, userIds));
-    }
-
-    /**
-     * 批量选择用户授权
-     */
-    @RequiresPermissions("system:role:edit")
-    @Log(title = "角色管理", businessType = BusinessType.GRANT)
-    @PutMapping("/authUser/selectAll")
-    public AjaxResult selectAuthUserAll(Long roleId, Long[] userIds)
-    {
-        roleService.checkRoleDataScope(roleId);
-        return toAjax(roleService.insertAuthUsers(roleId, userIds));
-    }
-}

+ 0 - 101
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysTenantController.java

@@ -1,101 +0,0 @@
-package com.ruoyi.system.controller;
-
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-
-import com.ruoyi.system.service.ISysTenantService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.security.annotation.RequiresPermissions;
-import com.ruoyi.system.domain.SysTenant;
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.core.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.web.page.TableDataInfo;
-
-/**
- * 租户信息Controller
- * 
- * @author ruoyi
- * @date 2022-04-25
- */
-@RestController
-@RequestMapping("/tenant")
-public class SysTenantController extends BaseController
-{
-    @Autowired
-    private ISysTenantService sysTenantService;
-
-    /**
-     * 查询租户信息列表
-     */
-//    @RequiresPermissions("system:tenant:list")
-    @GetMapping("/list")
-    public TableDataInfo list(SysTenant sysTenant)
-    {
-        startPage();
-        List<SysTenant> list = sysTenantService.selectSysTenantList(sysTenant);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出租户信息列表
-     */
-    @RequiresPermissions("system:tenant:export")
-    @Log(title = "租户信息", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, SysTenant sysTenant)
-    {
-        List<SysTenant> list = sysTenantService.selectSysTenantList(sysTenant);
-        ExcelUtil<SysTenant> util = new ExcelUtil<SysTenant>(SysTenant.class);
-        util.exportExcel(response, list, "租户信息数据");
-    }
-
-    /**
-     * 获取租户信息详细信息
-     */
-    @RequiresPermissions("system:tenant:query")
-    @GetMapping(value = "/{tenantCode}")
-    public AjaxResult getInfo(@PathVariable("tenantCode") String tenantCode)
-    {
-        return AjaxResult.success(sysTenantService.selectSysTenantByTenantCode(tenantCode));
-    }
-
-    /**
-     * 新增租户信息
-     */
-    @RequiresPermissions("system:tenant:add")
-    @Log(title = "租户信息", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody SysTenant sysTenant)
-    {
-        return toAjax(sysTenantService.insertSysTenant(sysTenant));
-    }
-
-    /**
-     * 修改租户信息
-     */
-    @RequiresPermissions("system:tenant:edit")
-    @Log(title = "租户信息", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody SysTenant sysTenant)
-    {
-        return toAjax(sysTenantService.updateSysTenant(sysTenant));
-    }
-
-    /**
-     * 删除租户信息
-     */
-    @RequiresPermissions("system:tenant:remove")
-    @Log(title = "租户信息", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{tenantCodes}")
-    public AjaxResult remove(@PathVariable String[] tenantCodes)
-    {
-        return toAjax(sysTenantService.deleteSysTenantByTenantCodes(tenantCodes));
-    }
-
-
-}

+ 0 - 105
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysTenantMenuController.java

@@ -1,105 +0,0 @@
-package com.ruoyi.system.controller;
-
-import java.util.List;
-import java.io.IOException;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.security.annotation.RequiresPermissions;
-import com.ruoyi.system.domain.SysTenantMenu;
-import com.ruoyi.system.service.ISysTenantMenuService;
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.core.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.web.page.TableDataInfo;
-
-/**
- * 租户和菜单关联Controller
- * 
- * @author usky
- * @date 2022-04-29
- */
-@RestController
-@RequestMapping("/tenantMenu")
-public class SysTenantMenuController extends BaseController
-{
-    @Autowired
-    private ISysTenantMenuService sysTenantMenuService;
-
-    /**
-     * 查询租户和菜单关联列表
-     */
-    @RequiresPermissions("system:menu:list")
-    @GetMapping("/list")
-    public TableDataInfo list(SysTenantMenu sysTenantMenu)
-    {
-        startPage();
-        List<SysTenantMenu> list = sysTenantMenuService.selectSysTenantMenuList(sysTenantMenu);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出租户和菜单关联列表
-     */
-    @RequiresPermissions("system:menu:export")
-    @Log(title = "租户和菜单关联", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, SysTenantMenu sysTenantMenu)
-    {
-        List<SysTenantMenu> list = sysTenantMenuService.selectSysTenantMenuList(sysTenantMenu);
-        ExcelUtil<SysTenantMenu> util = new ExcelUtil<SysTenantMenu>(SysTenantMenu.class);
-        util.exportExcel(response, list, "租户和菜单关联数据");
-    }
-
-    /**
-     * 获取租户和菜单关联详细信息
-     */
-    @RequiresPermissions("system:menu:query")
-    @GetMapping(value = "/{tenantId}")
-    public AjaxResult getInfo(@PathVariable("tenantId") Long tenantId)
-    {
-        return AjaxResult.success(sysTenantMenuService.selectSysTenantMenuByTenantId(tenantId));
-    }
-
-    /**
-     * 新增租户和菜单关联
-     */
-    @RequiresPermissions("system:menu:add")
-    @Log(title = "租户和菜单关联", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody SysTenantMenu sysTenantMenu)
-    {
-        return toAjax(sysTenantMenuService.insertSysTenantMenu(sysTenantMenu));
-    }
-
-    /**
-     * 修改租户和菜单关联
-     */
-    @RequiresPermissions("system:menu:edit")
-    @Log(title = "租户和菜单关联", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody SysTenantMenu sysTenantMenu)
-    {
-        return toAjax(sysTenantMenuService.updateSysTenantMenu(sysTenantMenu));
-    }
-
-    /**
-     * 删除租户和菜单关联
-     */
-    @RequiresPermissions("system:menu:remove")
-    @Log(title = "租户和菜单关联", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{tenantIds}")
-    public AjaxResult remove(@PathVariable Long[] tenantIds)
-    {
-        return toAjax(sysTenantMenuService.deleteSysTenantMenuByTenantIds(tenantIds));
-    }
-}

+ 0 - 287
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysUserController.java

@@ -1,287 +0,0 @@
-package com.ruoyi.system.controller;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.stream.Collectors;
-import javax.servlet.http.HttpServletResponse;
-import org.apache.commons.lang3.ArrayUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-import com.ruoyi.common.core.constant.UserConstants;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.common.core.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.core.web.page.TableDataInfo;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.security.annotation.InnerAuth;
-import com.ruoyi.common.security.annotation.RequiresPermissions;
-import com.ruoyi.common.security.utils.SecurityUtils;
-import com.ruoyi.system.api.domain.SysRole;
-import com.ruoyi.system.api.domain.SysUser;
-import com.ruoyi.system.api.model.LoginUser;
-import com.ruoyi.system.service.ISysConfigService;
-import com.ruoyi.system.service.ISysPermissionService;
-import com.ruoyi.system.service.ISysPostService;
-import com.ruoyi.system.service.ISysRoleService;
-import com.ruoyi.system.service.ISysUserService;
-
-/**
- * 用户信息
- * 
- * @author ruoyi
- */
-@RestController
-@RequestMapping("/user")
-public class SysUserController extends BaseController
-{
-    @Autowired
-    private ISysUserService userService;
-
-    @Autowired
-    private ISysRoleService roleService;
-
-    @Autowired
-    private ISysPostService postService;
-
-    @Autowired
-    private ISysPermissionService permissionService;
-
-    @Autowired
-    private ISysConfigService configService;
-
-    /**
-     * 获取用户列表
-     */
-    @RequiresPermissions("system:user:list")
-    @GetMapping("/list")
-    public TableDataInfo list(SysUser user)
-    {
-        startPage();
-        List<SysUser> list = userService.selectUserList(user);
-        return getDataTable(list);
-    }
-
-    @Log(title = "用户管理", businessType = BusinessType.EXPORT)
-    @RequiresPermissions("system:user:export")
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, SysUser user)
-    {
-        List<SysUser> list = userService.selectUserList(user);
-        ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
-        util.exportExcel(response, list, "用户数据");
-    }
-
-    @Log(title = "用户管理", businessType = BusinessType.IMPORT)
-    @RequiresPermissions("system:user:import")
-    @PostMapping("/importData")
-    public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
-    {
-        ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
-        List<SysUser> userList = util.importExcel(file.getInputStream());
-        String operName = SecurityUtils.getUsername();
-        String message = userService.importUser(userList, updateSupport, operName);
-        return AjaxResult.success(message);
-    }
-
-    @PostMapping("/importTemplate")
-    public void importTemplate(HttpServletResponse response) throws IOException
-    {
-        ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
-        util.importTemplateExcel(response, "用户数据");
-    }
-
-
-    /**
-     * 获取用户信息
-     * 
-     * @return 用户信息
-     */
-    @GetMapping("getInfo")
-    public AjaxResult getInfo()
-    {
-        Long userId = SecurityUtils.getUserId();
-        // 角色集合
-        Set<String> roles = permissionService.getRolePermission(userId);
-        // 权限集合
-        Set<String> permissions = permissionService.getMenuPermission(userId);
-        AjaxResult ajax = AjaxResult.success();
-        ajax.put("user", userService.selectUserById(userId));
-        ajax.put("roles", roles);
-        ajax.put("permissions", permissions);
-        return ajax;
-    }
-
-    /**
-     * 根据用户编号获取详细信息
-     */
-    @RequiresPermissions("system:user:query")
-    @GetMapping(value = { "/", "/{userId}" })
-    public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId)
-    {
-        userService.checkUserDataScope(userId);
-        AjaxResult ajax = AjaxResult.success();
-        List<SysRole> roles = roleService.selectRoleAll();
-        ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
-        ajax.put("posts", postService.selectPostAll());
-        if (StringUtils.isNotNull(userId))
-        {
-            SysUser sysUser = userService.selectUserById(userId);
-            ajax.put(AjaxResult.DATA_TAG, sysUser);
-            ajax.put("postIds", postService.selectPostListByUserId(userId));
-            ajax.put("roleIds", sysUser.getRoles().stream().map(SysRole::getRoleId).collect(Collectors.toList()));
-        }
-        return ajax;
-    }
-
-    /**
-     * 新增用户
-     */
-    @RequiresPermissions("system:user:add")
-    @Log(title = "用户管理", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@Validated @RequestBody SysUser user)
-    {
-        if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user.getUserName())))
-        {
-            return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,登录账号已存在");
-        }
-        else if (StringUtils.isNotEmpty(user.getPhonenumber())
-                && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
-        {
-            return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,手机号码已存在");
-        }
-        else if (StringUtils.isNotEmpty(user.getEmail())
-                && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
-        {
-            return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在");
-        }
-        user.setCreateBy(SecurityUtils.getUsername());
-        user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
-        return toAjax(userService.insertUser(user));
-    }
-
-    /**
-     * 修改用户
-     */
-    @RequiresPermissions("system:user:edit")
-    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@Validated @RequestBody SysUser user)
-    {
-        userService.checkUserAllowed(user);
-        userService.checkUserDataScope(user.getUserId());
-        if (StringUtils.isNotEmpty(user.getPhonenumber())
-                && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
-        {
-            return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
-        }
-        else if (StringUtils.isNotEmpty(user.getEmail())
-                && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
-        {
-            return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
-        }
-        user.setUpdateBy(SecurityUtils.getUsername());
-        return toAjax(userService.updateUser(user));
-    }
-
-    /**
-     * 删除用户
-     */
-    @RequiresPermissions("system:user:remove")
-    @Log(title = "用户管理", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{userIds}")
-    public AjaxResult remove(@PathVariable Long[] userIds)
-    {
-        if (ArrayUtils.contains(userIds, SecurityUtils.getUserId()))
-        {
-            return AjaxResult.error("当前用户不能删除");
-        }
-        return toAjax(userService.deleteUserByIds(userIds));
-    }
-
-    /**
-     * 重置密码
-     */
-    @RequiresPermissions("system:user:edit")
-    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
-    @PutMapping("/resetPwd")
-    public AjaxResult resetPwd(@RequestBody SysUser user)
-    {
-        userService.checkUserAllowed(user);
-        userService.checkUserDataScope(user.getUserId());
-        user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
-        user.setUpdateBy(SecurityUtils.getUsername());
-        return toAjax(userService.resetPwd(user));
-    }
-
-    /**
-     * 状态修改
-     */
-    @RequiresPermissions("system:user:edit")
-    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
-    @PutMapping("/changeStatus")
-    public AjaxResult changeStatus(@RequestBody SysUser user)
-    {
-        userService.checkUserAllowed(user);
-        userService.checkUserDataScope(user.getUserId());
-        user.setUpdateBy(SecurityUtils.getUsername());
-        return toAjax(userService.updateUserStatus(user));
-    }
-
-    /**
-     * 根据用户编号获取授权角色
-     */
-    @RequiresPermissions("system:user:query")
-    @GetMapping("/authRole/{userId}")
-    public AjaxResult authRole(@PathVariable("userId") Long userId)
-    {
-        AjaxResult ajax = AjaxResult.success();
-        SysUser user = userService.selectUserById(userId);
-        List<SysRole> roles = roleService.selectRolesByUserId(userId);
-        ajax.put("user", user);
-        ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
-        return ajax;
-    }
-
-    /**
-     * 用户授权角色
-     */
-    @RequiresPermissions("system:user:edit")
-    @Log(title = "用户管理", businessType = BusinessType.GRANT)
-    @PutMapping("/authRole")
-    public AjaxResult insertAuthRole(Long userId, Long[] roleIds)
-    {
-        userService.checkUserDataScope(userId);
-        userService.insertUserAuth(userId, roleIds);
-        return success();
-    }
-
-    @GetMapping("/getUserInfo")
-    public AjaxResult getUserInfo()
-    {
-        Map<String,Object> result = new HashMap<>();
-        LoginUser loginUser = SecurityUtils.getLoginUser();
-        Integer tenantId = SecurityUtils.getTenantId();
-        Long userId = SecurityUtils.getUserId();
-        result.put("loginUser",loginUser);
-        result.put("tenantId",tenantId);
-        result.put("userId",userId);
-        return AjaxResult.success(result);
-    }
-
-}

+ 0 - 92
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/SysUserOnlineController.java

@@ -1,92 +0,0 @@
-package com.ruoyi.system.controller;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.core.constant.CacheConstants;
-import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.core.web.page.TableDataInfo;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.redis.service.RedisService;
-import com.ruoyi.common.security.annotation.RequiresPermissions;
-import com.ruoyi.system.api.model.LoginUser;
-import com.ruoyi.system.domain.SysUserOnline;
-import com.ruoyi.system.service.ISysUserOnlineService;
-
-/**
- * 在线用户监控
- * 
- * @author ruoyi
- */
-@RestController
-@RequestMapping("/online")
-public class SysUserOnlineController extends BaseController
-{
-    @Autowired
-    private ISysUserOnlineService userOnlineService;
-
-    @Autowired
-    private RedisService redisService;
-
-    @RequiresPermissions("monitor:online:list")
-    @GetMapping("/list")
-    public TableDataInfo list(String ipaddr, String userName)
-    {
-        Collection<String> keys = redisService.keys(CacheConstants.LOGIN_TOKEN_KEY + "*");
-        List<SysUserOnline> userOnlineList = new ArrayList<SysUserOnline>();
-        for (String key : keys)
-        {
-            LoginUser user = redisService.getCacheObject(key);
-            if (StringUtils.isNotEmpty(ipaddr) && StringUtils.isNotEmpty(userName))
-            {
-                if (StringUtils.equals(ipaddr, user.getIpaddr()) && StringUtils.equals(userName, user.getUsername()))
-                {
-                    userOnlineList.add(userOnlineService.selectOnlineByInfo(ipaddr, userName, user));
-                }
-            }
-            else if (StringUtils.isNotEmpty(ipaddr))
-            {
-                if (StringUtils.equals(ipaddr, user.getIpaddr()))
-                {
-                    userOnlineList.add(userOnlineService.selectOnlineByIpaddr(ipaddr, user));
-                }
-            }
-            else if (StringUtils.isNotEmpty(userName))
-            {
-                if (StringUtils.equals(userName, user.getUsername()))
-                {
-                    userOnlineList.add(userOnlineService.selectOnlineByUserName(userName, user));
-                }
-            }
-            else
-            {
-                userOnlineList.add(userOnlineService.loginUserToUserOnline(user));
-            }
-        }
-        Collections.reverse(userOnlineList);
-        userOnlineList.removeAll(Collections.singleton(null));
-        return getDataTable(userOnlineList);
-    }
-
-    /**
-     * 强退用户
-     */
-    @RequiresPermissions("monitor:online:forceLogout")
-    @Log(title = "在线用户", businessType = BusinessType.FORCE)
-    @DeleteMapping("/{tokenId}")
-    public AjaxResult forceLogout(@PathVariable String tokenId)
-    {
-        redisService.deleteObject(CacheConstants.LOGIN_TOKEN_KEY + tokenId);
-        return AjaxResult.success();
-    }
-}

+ 0 - 44
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/controller/api/RemoteUserApi.java

@@ -1,44 +0,0 @@
-package com.ruoyi.system.controller.api;
-
-import com.ruoyi.common.core.constant.UserConstants;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.system.api.RemoteUserService;
-import com.ruoyi.system.api.domain.SysUser;
-import com.ruoyi.system.api.model.LoginUser;
-import com.ruoyi.system.service.ISysConfigService;
-import com.ruoyi.system.service.ISysUserService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-@RestController
-public class RemoteUserApi implements RemoteUserService {
-
-    @Autowired
-    private ISysUserService iSysUserService;
-
-    @Autowired
-    private ISysConfigService iSysConfigService;
-
-    @Override
-    public R<LoginUser> getUserInfo(String username, String source) {
-        LoginUser info = iSysUserService.getInfo(username);
-        return R.ok(info);
-    }
-
-    @Override
-    public R<Boolean> registerUserInfo(SysUser sysUser, String source) {
-        String username = sysUser.getUserName();
-        if (!("true".equals(iSysConfigService.selectConfigByKey("sys.account.registerUser"))))
-        {
-            return R.fail("当前系统没有开启注册功能!");
-        }
-        if (UserConstants.NOT_UNIQUE.equals(iSysUserService.checkUserNameUnique(username)))
-        {
-            return R.fail("保存用户'" + username + "'失败,注册账号已存在");
-        }
-        return R.ok(iSysUserService.registerUser(sysUser));
-    }
-
-
-
-}

+ 0 - 111
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysConfig.java

@@ -1,111 +0,0 @@
-package com.ruoyi.system.domain;
-
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.Size;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.core.annotation.Excel;
-import com.ruoyi.common.core.annotation.Excel.ColumnType;
-import com.ruoyi.common.core.web.domain.BaseEntity;
-
-/**
- * 参数配置表 sys_config
- * 
- * @author ruoyi
- */
-public class SysConfig extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 参数主键 */
-    @Excel(name = "参数主键", cellType = ColumnType.NUMERIC)
-    private Long configId;
-
-    /** 参数名称 */
-    @Excel(name = "参数名称")
-    private String configName;
-
-    /** 参数键名 */
-    @Excel(name = "参数键名")
-    private String configKey;
-
-    /** 参数键值 */
-    @Excel(name = "参数键值")
-    private String configValue;
-
-    /** 系统内置(Y是 N否) */
-    @Excel(name = "系统内置", readConverterExp = "Y=是,N=否")
-    private String configType;
-
-    public Long getConfigId()
-    {
-        return configId;
-    }
-
-    public void setConfigId(Long configId)
-    {
-        this.configId = configId;
-    }
-
-    @NotBlank(message = "参数名称不能为空")
-    @Size(min = 0, max = 100, message = "参数名称不能超过100个字符")
-    public String getConfigName()
-    {
-        return configName;
-    }
-
-    public void setConfigName(String configName)
-    {
-        this.configName = configName;
-    }
-
-    @NotBlank(message = "参数键名长度不能为空")
-    @Size(min = 0, max = 100, message = "参数键名长度不能超过100个字符")
-    public String getConfigKey()
-    {
-        return configKey;
-    }
-
-    public void setConfigKey(String configKey)
-    {
-        this.configKey = configKey;
-    }
-
-    @NotBlank(message = "参数键值不能为空")
-    @Size(min = 0, max = 500, message = "参数键值长度不能超过500个字符")
-    public String getConfigValue()
-    {
-        return configValue;
-    }
-
-    public void setConfigValue(String configValue)
-    {
-        this.configValue = configValue;
-    }
-
-    public String getConfigType()
-    {
-        return configType;
-    }
-
-    public void setConfigType(String configType)
-    {
-        this.configType = configType;
-    }
-    
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("configId", getConfigId())
-            .append("configName", getConfigName())
-            .append("configKey", getConfigKey())
-            .append("configValue", getConfigValue())
-            .append("configType", getConfigType())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .toString();
-    }
-}

+ 0 - 259
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysMenu.java

@@ -1,259 +0,0 @@
-package com.ruoyi.system.domain;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.core.web.domain.BaseEntity;
-
-/**
- * 菜单权限表 sys_menu
- * 
- * @author ruoyi
- */
-public class SysMenu extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 菜单ID */
-    private Long menuId;
-
-    /** 菜单名称 */
-    private String menuName;
-
-    /** 父菜单名称 */
-    private String parentName;
-
-    /** 父菜单ID */
-    private Long parentId;
-
-    /** 显示顺序 */
-    private Integer orderNum;
-
-    /** 路由地址 */
-    private String path;
-
-    /** 组件路径 */
-    private String component;
-
-    /** 路由参数 */
-    private String query;
-
-    /** 是否为外链(0是 1否) */
-    private String isFrame;
-
-    /** 是否缓存(0缓存 1不缓存) */
-    private String isCache;
-
-    /** 类型(M目录 C菜单 F按钮) */
-    private String menuType;
-
-    /** 显示状态(0显示 1隐藏) */
-    private String visible;
-    
-    /** 菜单状态(0显示 1隐藏) */
-    private String status;
-
-    /** 权限字符串 */
-    private String perms;
-
-    /** 菜单图标 */
-    private String icon;
-
-    /** 子菜单 */
-    private List<SysMenu> children = new ArrayList<SysMenu>();
-
-    public Long getMenuId()
-    {
-        return menuId;
-    }
-
-    public void setMenuId(Long menuId)
-    {
-        this.menuId = menuId;
-    }
-
-    @NotBlank(message = "菜单名称不能为空")
-    @Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符")
-    public String getMenuName()
-    {
-        return menuName;
-    }
-
-    public void setMenuName(String menuName)
-    {
-        this.menuName = menuName;
-    }
-
-    public String getParentName()
-    {
-        return parentName;
-    }
-
-    public void setParentName(String parentName)
-    {
-        this.parentName = parentName;
-    }
-
-    public Long getParentId()
-    {
-        return parentId;
-    }
-
-    public void setParentId(Long parentId)
-    {
-        this.parentId = parentId;
-    }
-
-    @NotNull(message = "显示顺序不能为空")
-    public Integer getOrderNum()
-    {
-        return orderNum;
-    }
-
-    public void setOrderNum(Integer orderNum)
-    {
-        this.orderNum = orderNum;
-    }
-
-    @Size(min = 0, max = 200, message = "路由地址不能超过200个字符")
-    public String getPath()
-    {
-        return path;
-    }
-
-    public void setPath(String path)
-    {
-        this.path = path;
-    }
-
-    @Size(min = 0, max = 200, message = "组件路径不能超过255个字符")
-    public String getComponent()
-    {
-        return component;
-    }
-
-    public void setComponent(String component)
-    {
-        this.component = component;
-    }
-
-    public String getQuery()
-    {
-        return query;
-    }
-
-    public void setQuery(String query)
-    {
-        this.query = query;
-    }
-
-    public String getIsFrame()
-    {
-        return isFrame;
-    }
-
-    public void setIsFrame(String isFrame)
-    {
-        this.isFrame = isFrame;
-    }
-
-    public String getIsCache()
-    {
-        return isCache;
-    }
-
-    public void setIsCache(String isCache)
-    {
-        this.isCache = isCache;
-    }
-
-    @NotBlank(message = "菜单类型不能为空")
-    public String getMenuType()
-    {
-        return menuType;
-    }
-
-    public void setMenuType(String menuType)
-    {
-        this.menuType = menuType;
-    }
-
-    public String getVisible()
-    {
-        return visible;
-    }
-
-    public void setVisible(String visible)
-    {
-        this.visible = visible;
-    }
-
-    public String getStatus()
-    {
-        return status;
-    }
-
-    public void setStatus(String status)
-    {
-        this.status = status;
-    }
-
-    @Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符")
-    public String getPerms()
-    {
-        return perms;
-    }
-
-    public void setPerms(String perms)
-    {
-        this.perms = perms;
-    }
-
-    public String getIcon()
-    {
-        return icon;
-    }
-
-    public void setIcon(String icon)
-    {
-        this.icon = icon;
-    }
-
-    public List<SysMenu> getChildren()
-    {
-        return children;
-    }
-
-    public void setChildren(List<SysMenu> children)
-    {
-        this.children = children;
-    }
-    
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("menuId", getMenuId())
-            .append("menuName", getMenuName())
-            .append("parentId", getParentId())
-            .append("orderNum", getOrderNum())
-            .append("path", getPath())
-            .append("component", getComponent())
-            .append("isFrame", getIsFrame())
-            .append("IsCache", getIsCache())
-            .append("menuType", getMenuType())
-            .append("visible", getVisible())
-            .append("status ", getStatus())
-            .append("perms", getPerms())
-            .append("icon", getIcon())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .toString();
-    }
-}

+ 0 - 102
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysNotice.java

@@ -1,102 +0,0 @@
-package com.ruoyi.system.domain;
-
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.Size;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.core.web.domain.BaseEntity;
-import com.ruoyi.common.core.xss.Xss;
-
-/**
- * 通知公告表 sys_notice
- * 
- * @author ruoyi
- */
-public class SysNotice extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 公告ID */
-    private Long noticeId;
-
-    /** 公告标题 */
-    private String noticeTitle;
-
-    /** 公告类型(1通知 2公告) */
-    private String noticeType;
-
-    /** 公告内容 */
-    private String noticeContent;
-
-    /** 公告状态(0正常 1关闭) */
-    private String status;
-
-    public Long getNoticeId()
-    {
-        return noticeId;
-    }
-
-    public void setNoticeId(Long noticeId)
-    {
-        this.noticeId = noticeId;
-    }
-
-    public void setNoticeTitle(String noticeTitle)
-    {
-        this.noticeTitle = noticeTitle;
-    }
-
-    @Xss(message = "公告标题不能包含脚本字符")
-    @NotBlank(message = "公告标题不能为空")
-    @Size(min = 0, max = 50, message = "公告标题不能超过50个字符")
-    public String getNoticeTitle()
-    {
-        return noticeTitle;
-    }
-
-    public void setNoticeType(String noticeType)
-    {
-        this.noticeType = noticeType;
-    }
-
-    public String getNoticeType()
-    {
-        return noticeType;
-    }
-
-    public void setNoticeContent(String noticeContent)
-    {
-        this.noticeContent = noticeContent;
-    }
-
-    public String getNoticeContent()
-    {
-        return noticeContent;
-    }
-
-    public void setStatus(String status)
-    {
-        this.status = status;
-    }
-
-    public String getStatus()
-    {
-        return status;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("noticeId", getNoticeId())
-            .append("noticeTitle", getNoticeTitle())
-            .append("noticeType", getNoticeType())
-            .append("noticeContent", getNoticeContent())
-            .append("status", getStatus())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .toString();
-    }
-}

+ 0 - 84
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysPlatform.java

@@ -1,84 +0,0 @@
-package com.ruoyi.system.domain;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.core.annotation.Excel;
-import com.ruoyi.common.core.web.domain.BaseEntity;
-
-/**
- * 平台信息对象 sys_platform
- * 
- * @author usky
- * @date 2022-04-29
- */
-public class SysPlatform extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 主键ID */
-    private Long id;
-
-    /** 平台名称 */
-    @Excel(name = "平台名称")
-    private String platformName;
-
-    /** 平台状态(0 停用 1 启用) */
-    @Excel(name = "平台状态", readConverterExp = "0=,停=用,1=,启=用")
-    private String status;
-
-    /** 激活码 */
-    @Excel(name = "激活码")
-    private String tenantkey;
-
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
-
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setPlatformName(String platformName) 
-    {
-        this.platformName = platformName;
-    }
-
-    public String getPlatformName() 
-    {
-        return platformName;
-    }
-    public void setStatus(String status) 
-    {
-        this.status = status;
-    }
-
-    public String getStatus() 
-    {
-        return status;
-    }
-    public void setTenantkey(String tenantkey) 
-    {
-        this.tenantkey = tenantkey;
-    }
-
-    public String getTenantkey() 
-    {
-        return tenantkey;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("platformName", getPlatformName())
-            .append("status", getStatus())
-            .append("remark", getRemark())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("tenantkey", getTenantkey())
-            .toString();
-    }
-}

+ 0 - 50
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysPlatformMenu.java

@@ -1,50 +0,0 @@
-package com.ruoyi.system.domain;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.core.annotation.Excel;
-import com.ruoyi.common.core.web.domain.BaseEntity;
-
-/**
- * 平台和菜单关联对象 sys_platform_menu
- * 
- * @author usky
- * @date 2022-04-29
- */
-public class SysPlatformMenu extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 平台ID */
-    private Long platformId;
-
-    /** 菜单ID */
-    private Long menuId;
-
-    public void setPlatformId(Long platformId) 
-    {
-        this.platformId = platformId;
-    }
-
-    public Long getPlatformId() 
-    {
-        return platformId;
-    }
-    public void setMenuId(Long menuId) 
-    {
-        this.menuId = menuId;
-    }
-
-    public Long getMenuId() 
-    {
-        return menuId;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("platformId", getPlatformId())
-            .append("menuId", getMenuId())
-            .toString();
-    }
-}

+ 0 - 123
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysPost.java

@@ -1,123 +0,0 @@
-package com.ruoyi.system.domain;
-
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.Size;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.core.annotation.Excel;
-import com.ruoyi.common.core.annotation.Excel.ColumnType;
-import com.ruoyi.common.core.web.domain.BaseEntity;
-
-/**
- * 岗位表 sys_post
- * 
- * @author ruoyi
- */
-public class SysPost extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 岗位序号 */
-    @Excel(name = "岗位序号", cellType = ColumnType.NUMERIC)
-    private Long postId;
-
-    /** 岗位编码 */
-    @Excel(name = "岗位编码")
-    private String postCode;
-
-    /** 岗位名称 */
-    @Excel(name = "岗位名称")
-    private String postName;
-
-    /** 岗位排序 */
-    @Excel(name = "岗位排序")
-    private String postSort;
-
-    /** 状态(0正常 1停用) */
-    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
-    private String status;
-
-    /** 用户是否存在此岗位标识 默认不存在 */
-    private boolean flag = false;
-
-    public Long getPostId()
-    {
-        return postId;
-    }
-
-    public void setPostId(Long postId)
-    {
-        this.postId = postId;
-    }
-
-    @NotBlank(message = "岗位编码不能为空")
-    @Size(min = 0, max = 64, message = "岗位编码长度不能超过64个字符")
-    public String getPostCode()
-    {
-        return postCode;
-    }
-
-    public void setPostCode(String postCode)
-    {
-        this.postCode = postCode;
-    }
-
-    @NotBlank(message = "岗位名称不能为空")
-    @Size(min = 0, max = 50, message = "岗位名称长度不能超过50个字符")
-    public String getPostName()
-    {
-        return postName;
-    }
-
-    public void setPostName(String postName)
-    {
-        this.postName = postName;
-    }
-
-    @NotBlank(message = "显示顺序不能为空")
-    public String getPostSort()
-    {
-        return postSort;
-    }
-
-    public void setPostSort(String postSort)
-    {
-        this.postSort = postSort;
-    }
-
-    public String getStatus()
-    {
-        return status;
-    }
-
-    public void setStatus(String status)
-    {
-        this.status = status;
-    }
-
-    public boolean isFlag()
-    {
-        return flag;
-    }
-
-    public void setFlag(boolean flag)
-    {
-        this.flag = flag;
-    }
-    
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("postId", getPostId())
-            .append("postCode", getPostCode())
-            .append("postName", getPostName())
-            .append("postSort", getPostSort())
-            .append("status", getStatus())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .toString();
-    }
-}

+ 0 - 46
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysRoleDept.java

@@ -1,46 +0,0 @@
-package com.ruoyi.system.domain;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-/**
- * 角色和部门关联 sys_role_dept
- * 
- * @author ruoyi
- */
-public class SysRoleDept
-{
-    /** 角色ID */
-    private Long roleId;
-    
-    /** 部门ID */
-    private Long deptId;
-
-    public Long getRoleId()
-    {
-        return roleId;
-    }
-
-    public void setRoleId(Long roleId)
-    {
-        this.roleId = roleId;
-    }
-
-    public Long getDeptId()
-    {
-        return deptId;
-    }
-
-    public void setDeptId(Long deptId)
-    {
-        this.deptId = deptId;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("roleId", getRoleId())
-            .append("deptId", getDeptId())
-            .toString();
-    }
-}

+ 0 - 46
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysRoleMenu.java

@@ -1,46 +0,0 @@
-package com.ruoyi.system.domain;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-/**
- * 角色和菜单关联 sys_role_menu
- * 
- * @author ruoyi
- */
-public class SysRoleMenu
-{
-    /** 角色ID */
-    private Long roleId;
-    
-    /** 菜单ID */
-    private Long menuId;
-
-    public Long getRoleId()
-    {
-        return roleId;
-    }
-
-    public void setRoleId(Long roleId)
-    {
-        this.roleId = roleId;
-    }
-
-    public Long getMenuId()
-    {
-        return menuId;
-    }
-
-    public void setMenuId(Long menuId)
-    {
-        this.menuId = menuId;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("roleId", getRoleId())
-            .append("menuId", getMenuId())
-            .toString();
-    }
-}

+ 0 - 182
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysTenant.java

@@ -1,182 +0,0 @@
-package com.ruoyi.system.domain;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.core.annotation.Excel;
-import com.ruoyi.common.core.web.domain.BaseEntity;
-
-/**
- * 租户信息对象 sys_tenant
- * 
- * @author ruoyi
- * @date 2022-04-25
- */
-public class SysTenant extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 租户ID */
-    private Long id;
-
-    /** 租户编号 */
-    @Excel(name = "租户编号")
-    private String tenantCode;
-
-    /** 租户名称 */
-    @Excel(name = "租户名称")
-    private String tenantName;
-
-    /** 租户负责人 */
-    @Excel(name = "租户负责人")
-    private String tenantManager;
-
-    /** 租户类型(0 试用租户  1 正式租户) */
-    @Excel(name = "租户类型", readConverterExp = "0=,试=用租户,1=,正=式租户")
-    private String tenantType;
-
-    /** 租户站点域名 */
-    @Excel(name = "租户站点域名")
-    private String domain;
-
-    /** 租户邮箱 */
-    @Excel(name = "租户邮箱")
-    private String email;
-
-    /** 手机号码 */
-    @Excel(name = "手机号码")
-    private String phoneNumber;
-
-    /** 联系地址 */
-    @Excel(name = "联系地址")
-    private String address;
-
-    /** 有效期限 */
-    @Excel(name = "有效期限")
-    private String tenantTerm;
-
-    /** 租户状态(0正常 1停用) */
-    @Excel(name = "租户状态", readConverterExp = "0=正常,1=停用")
-    private String status;
-
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
-
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setTenantCode(String tenantCode) 
-    {
-        this.tenantCode = tenantCode;
-    }
-
-    public String getTenantCode() 
-    {
-        return tenantCode;
-    }
-    public void setTenantName(String tenantName) 
-    {
-        this.tenantName = tenantName;
-    }
-
-    public String getTenantName() 
-    {
-        return tenantName;
-    }
-    public void setTenantManager(String tenantManager) 
-    {
-        this.tenantManager = tenantManager;
-    }
-
-    public String getTenantManager() 
-    {
-        return tenantManager;
-    }
-    public void setTenantType(String tenantType) 
-    {
-        this.tenantType = tenantType;
-    }
-
-    public String getTenantType() 
-    {
-        return tenantType;
-    }
-    public void setDomain(String domain) 
-    {
-        this.domain = domain;
-    }
-
-    public String getDomain() 
-    {
-        return domain;
-    }
-    public void setEmail(String email) 
-    {
-        this.email = email;
-    }
-
-    public String getEmail() 
-    {
-        return email;
-    }
-    public void setPhoneNumber(String phoneNumber) 
-    {
-        this.phoneNumber = phoneNumber;
-    }
-
-    public String getPhoneNumber() 
-    {
-        return phoneNumber;
-    }
-    public void setAddress(String address) 
-    {
-        this.address = address;
-    }
-
-    public String getAddress() 
-    {
-        return address;
-    }
-    public void setTenantTerm(String tenantTerm) 
-    {
-        this.tenantTerm = tenantTerm;
-    }
-
-    public String getTenantTerm() 
-    {
-        return tenantTerm;
-    }
-    public void setStatus(String status) 
-    {
-        this.status = status;
-    }
-
-    public String getStatus() 
-    {
-        return status;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("tenantCode", getTenantCode())
-            .append("tenantName", getTenantName())
-            .append("tenantManager", getTenantManager())
-            .append("tenantType", getTenantType())
-            .append("domain", getDomain())
-            .append("email", getEmail())
-            .append("phoneNumber", getPhoneNumber())
-            .append("address", getAddress())
-            .append("tenantTerm", getTenantTerm())
-            .append("remark", getRemark())
-            .append("status", getStatus())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .toString();
-    }
-}

+ 0 - 64
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysTenantMenu.java

@@ -1,64 +0,0 @@
-package com.ruoyi.system.domain;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.core.annotation.Excel;
-import com.ruoyi.common.core.web.domain.BaseEntity;
-
-/**
- * 租户和菜单关联对象 sys_tenant_menu
- * 
- * @author usky
- * @date 2022-04-29
- */
-public class SysTenantMenu extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 角色ID */
-    private Long tenantId;
-
-    /** 菜单ID */
-    private Long menuId;
-
-    /** $column.columnComment */
-    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
-    private String menuAliasName;
-
-    public void setTenantId(Long tenantId) 
-    {
-        this.tenantId = tenantId;
-    }
-
-    public Long getTenantId() 
-    {
-        return tenantId;
-    }
-    public void setMenuId(Long menuId) 
-    {
-        this.menuId = menuId;
-    }
-
-    public Long getMenuId() 
-    {
-        return menuId;
-    }
-    public void setMenuAliasName(String menuAliasName) 
-    {
-        this.menuAliasName = menuAliasName;
-    }
-
-    public String getMenuAliasName() 
-    {
-        return menuAliasName;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("tenantId", getTenantId())
-            .append("menuId", getMenuId())
-            .append("menuAliasName", getMenuAliasName())
-            .toString();
-    }
-}

+ 0 - 100
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysUserOnline.java

@@ -1,100 +0,0 @@
-package com.ruoyi.system.domain;
-
-/**
- * 当前在线会话
- * 
- * @author ruoyi
- */
-public class SysUserOnline
-{
-    /** 会话编号 */
-    private String tokenId;
-
-    /** 用户名称 */
-    private String userName;
-
-    /** 登录IP地址 */
-    private String ipaddr;
-
-    /** 登录地址 */
-    private String loginLocation;
-
-    /** 浏览器类型 */
-    private String browser;
-
-    /** 操作系统 */
-    private String os;
-
-    /** 登录时间 */
-    private Long loginTime;
-
-    public String getTokenId()
-    {
-        return tokenId;
-    }
-
-    public void setTokenId(String tokenId)
-    {
-        this.tokenId = tokenId;
-    }
-
-    public String getUserName()
-    {
-        return userName;
-    }
-
-    public void setUserName(String userName)
-    {
-        this.userName = userName;
-    }
-
-    public String getIpaddr()
-    {
-        return ipaddr;
-    }
-
-    public void setIpaddr(String ipaddr)
-    {
-        this.ipaddr = ipaddr;
-    }
-
-    public String getLoginLocation()
-    {
-        return loginLocation;
-    }
-
-    public void setLoginLocation(String loginLocation)
-    {
-        this.loginLocation = loginLocation;
-    }
-
-    public String getBrowser()
-    {
-        return browser;
-    }
-
-    public void setBrowser(String browser)
-    {
-        this.browser = browser;
-    }
-
-    public String getOs()
-    {
-        return os;
-    }
-
-    public void setOs(String os)
-    {
-        this.os = os;
-    }
-
-    public Long getLoginTime()
-    {
-        return loginTime;
-    }
-
-    public void setLoginTime(Long loginTime)
-    {
-        this.loginTime = loginTime;
-    }
-}

+ 0 - 46
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysUserPost.java

@@ -1,46 +0,0 @@
-package com.ruoyi.system.domain;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-/**
- * 用户和岗位关联 sys_user_post
- * 
- * @author ruoyi
- */
-public class SysUserPost
-{
-    /** 用户ID */
-    private Long userId;
-    
-    /** 岗位ID */
-    private Long postId;
-
-    public Long getUserId()
-    {
-        return userId;
-    }
-
-    public void setUserId(Long userId)
-    {
-        this.userId = userId;
-    }
-
-    public Long getPostId()
-    {
-        return postId;
-    }
-
-    public void setPostId(Long postId)
-    {
-        this.postId = postId;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("userId", getUserId())
-            .append("postId", getPostId())
-            .toString();
-    }
-}

+ 0 - 46
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/SysUserRole.java

@@ -1,46 +0,0 @@
-package com.ruoyi.system.domain;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-/**
- * 用户和角色关联 sys_user_role
- * 
- * @author ruoyi
- */
-public class SysUserRole
-{
-    /** 用户ID */
-    private Long userId;
-    
-    /** 角色ID */
-    private Long roleId;
-
-    public Long getUserId()
-    {
-        return userId;
-    }
-
-    public void setUserId(Long userId)
-    {
-        this.userId = userId;
-    }
-
-    public Long getRoleId()
-    {
-        return roleId;
-    }
-
-    public void setRoleId(Long roleId)
-    {
-        this.roleId = roleId;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("userId", getUserId())
-            .append("roleId", getRoleId())
-            .toString();
-    }
-}

+ 0 - 59
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/vo/ConfigDomainVo.java

@@ -1,59 +0,0 @@
-package com.ruoyi.system.domain.vo;
-
-public class ConfigDomainVo {
-
-     private String loginTitle;
-     private String loginLogo;
-     private String loginBackImg;
-     private String loginFooter;
-     private String loginType;
-     private String loginIcon;
-
-     public String getLoginTitle() {
-          return loginTitle;
-     }
-
-     public void setLoginTitle(String loginTitle) {
-          this.loginTitle = loginTitle;
-     }
-
-     public String getLoginLogo() {
-          return loginLogo;
-     }
-
-     public void setLoginLogo(String loginLogo) {
-          this.loginLogo = loginLogo;
-     }
-
-     public String getLoginBackImg() {
-          return loginBackImg;
-     }
-
-     public void setLoginBackImg(String loginBackImg) {
-          this.loginBackImg = loginBackImg;
-     }
-
-     public String getLoginFooter() {
-          return loginFooter;
-     }
-
-     public void setLoginFooter(String loginFooter) {
-          this.loginFooter = loginFooter;
-     }
-
-     public String getLoginType() {
-          return loginType;
-     }
-
-     public void setLoginType(String loginType) {
-          this.loginType = loginType;
-     }
-
-     public String getLoginIcon() {
-          return loginIcon;
-     }
-
-     public void setLoginIcon(String loginIcon) {
-          this.loginIcon = loginIcon;
-     }
-}

+ 0 - 39
base-modules/service-system/service-system-biz/src/main/java/com/ruoyi/system/domain/vo/LoginBody.java

@@ -1,39 +0,0 @@
-package com.ruoyi.system.domain.vo;
-
-/**
- * 用户登录对象
- * 
- * @author ruoyi
- */
-public class LoginBody
-{
-    /**
-     * 用户名
-     */
-    private String username;
-
-    /**
-     * 用户密码
-     */
-    private String password;
-
-    public String getUsername()
-    {
-        return username;
-    }
-
-    public void setUsername(String username)
-    {
-        this.username = username;
-    }
-
-    public String getPassword()
-    {
-        return password;
-    }
-
-    public void setPassword(String password)
-    {
-        this.password = password;
-    }
-}

Some files were not shown because too many files changed in this diff