Browse Source

warewms api 1.0 example

ChenYang 1 year ago
parent
commit
64cba8241b
49 changed files with 319 additions and 396 deletions
  1. 1 1
      warewms-admin/pom.xml
  2. 1 1
      warewms-framework/pom.xml
  3. 1 1
      warewms-framework/src/main/java/com/warewms/framework/web/exception/GlobalExceptionHandler.java
  4. 1 1
      warewms-system/pom.xml
  5. 9 8
      warewms-framework/src/main/java/com/warewms/framework/aspectj/DataScopeAspect.java
  6. 6 5
      warewms-framework/src/main/java/com/warewms/framework/aspectj/DataSourceAspect.java
  7. 19 18
      warewms-framework/src/main/java/com/warewms/framework/aspectj/LogAspect.java
  8. 10 9
      warewms-framework/src/main/java/com/warewms/framework/aspectj/RateLimiterAspect.java
  9. 5 4
      warewms-framework/src/main/java/com/warewms/framework/manager/factory/AsyncFactory.java
  10. 1 1
      warewms-framework/src/main/java/com/warewms/framework/security/context/AuthenticationContextHolder.java
  11. 2 2
      warewms-framework/src/main/java/com/warewms/framework/security/context/PermissionContextHolder.java
  12. 11 10
      warewms-framework/src/main/java/com/warewms/framework/security/filter/JwtAuthenticationTokenFilter.java
  13. 9 8
      warewms-framework/src/main/java/com/warewms/framework/security/handle/AuthenticationEntryPointImpl.java
  14. 12 11
      warewms-framework/src/main/java/com/warewms/framework/security/handle/LogoutSuccessHandlerImpl.java
  15. 5 5
      warewms-framework/src/main/java/com/warewms/framework/config/SecurityConfig.java
  16. 12 11
      warewms-admin/src/main/java/com/warewms/web/controller/common/CaptchaController.java
  17. 13 12
      warewms-admin/src/main/java/com/warewms/web/controller/common/CommonController.java
  18. 8 17
      warewms-admin/src/main/java/com/warewms/web/controller/monitor/CacheController.java
  19. 3 3
      warewms-admin/src/main/java/com/warewms/web/controller/monitor/ServerController.java
  20. 8 12
      warewms-admin/src/main/java/com/warewms/web/controller/monitor/SysLogininforController.java
  21. 7 10
      warewms-admin/src/main/java/com/warewms/web/controller/monitor/SysOperlogController.java
  22. 10 13
      warewms-admin/src/main/java/com/warewms/web/controller/monitor/SysUserOnlineController.java
  23. 8 14
      warewms-admin/src/main/java/com/warewms/web/controller/system/SysConfigController.java
  24. 8 14
      warewms-admin/src/main/java/com/warewms/web/controller/system/SysDeptController.java
  25. 9 15
      warewms-admin/src/main/java/com/warewms/web/controller/system/SysDictDataController.java
  26. 1 3
      warewms-admin/src/main/java/com/warewms/web/controller/system/SysDictTypeController.java
  27. 3 3
      warewms-admin/src/main/java/com/warewms/web/controller/system/SysIndexController.java
  28. 11 10
      warewms-admin/src/main/java/com/warewms/web/controller/system/SysLoginController.java
  29. 7 13
      warewms-admin/src/main/java/com/warewms/web/controller/system/SysMenuController.java
  30. 5 12
      warewms-admin/src/main/java/com/warewms/web/controller/system/SysNoticeController.java
  31. 8 14
      warewms-admin/src/main/java/com/warewms/web/controller/system/SysPostController.java
  32. 5 11
      warewms-admin/src/main/java/com/warewms/web/controller/system/SysProfileController.java
  33. 6 6
      warewms-admin/src/main/java/com/warewms/web/controller/system/SysRegisterController.java
  34. 10 16
      warewms-admin/src/main/java/com/warewms/web/controller/system/SysRoleController.java
  35. 11 17
      warewms-admin/src/main/java/com/warewms/web/controller/system/SysUserController.java
  36. 7 18
      warewms-admin/src/main/java/com/warewms/web/controller/tool/TestController.java
  37. 1 1
      warewms-framework/src/main/java/com/warewms/framework/web/domain/server/Cpu.java
  38. 3 2
      warewms-framework/src/main/java/com/warewms/framework/web/domain/server/Jvm.java
  39. 1 1
      warewms-framework/src/main/java/com/warewms/framework/web/domain/server/Mem.java
  40. 6 10
      warewms-framework/src/main/java/com/warewms/framework/web/domain/Server.java
  41. 1 1
      warewms-framework/src/main/java/com/warewms/framework/web/domain/server/Sys.java
  42. 1 1
      warewms-framework/src/main/java/com/warewms/framework/web/domain/server/SysFile.java
  43. 6 5
      warewms-framework/src/main/java/com/warewms/framework/web/service/PermissionService.java
  44. 11 13
      warewms-framework/src/main/java/com/warewms/framework/web/service/SysLoginService.java
  45. 9 8
      warewms-framework/src/main/java/com/warewms/framework/web/service/SysPasswordService.java
  46. 7 6
      warewms-framework/src/main/java/com/warewms/framework/web/service/SysPermissionService.java
  47. 4 4
      warewms-framework/src/main/java/com/warewms/framework/web/service/SysRegisterService.java
  48. 9 8
      warewms-framework/src/main/java/com/warewms/framework/web/service/TokenService.java
  49. 7 7
      warewms-framework/src/main/java/com/warewms/framework/web/service/UserDetailsServiceImpl.java

+ 1 - 1
warewms-admin/pom.xml

@@ -23,7 +23,7 @@
         <!-- 核心模块-->
         <dependency>
             <groupId>com.warewms</groupId>
-            <artifactId>warewms-framework</artifactId>
+            <artifactId>warewms-system</artifactId>
         </dependency>
 
         <!-- 定时任务-->

+ 1 - 1
warewms-framework/pom.xml

@@ -53,7 +53,7 @@
         <!-- 系统模块-->
         <dependency>
             <groupId>com.warewms</groupId>
-            <artifactId>warewms-system</artifactId>
+            <artifactId>warewms-common</artifactId>
         </dependency>
 
     </dependencies>

+ 1 - 1
warewms-framework/src/main/java/com/warewms/framework/web/exception/GlobalExceptionHandler.java

@@ -1,4 +1,4 @@
-package com.warewms.framework.web.exception;
+package com.warewms.framework.exception.handler;
 
 import javax.servlet.http.HttpServletRequest;
 import org.slf4j.Logger;

+ 1 - 1
warewms-system/pom.xml

@@ -18,7 +18,7 @@
         <!-- 通用工具-->
         <dependency>
             <groupId>com.warewms</groupId>
-            <artifactId>warewms-common</artifactId>
+            <artifactId>warewms-framework</artifactId>
         </dependency>
 
     </dependencies>

+ 9 - 8
warewms-framework/src/main/java/com/warewms/framework/aspectj/DataScopeAspect.java

@@ -1,11 +1,5 @@
-package com.warewms.framework.aspectj;
+package com.warewms.system.common.aspectj;
 
-import java.util.ArrayList;
-import java.util.List;
-import org.aspectj.lang.JoinPoint;
-import org.aspectj.lang.annotation.Aspect;
-import org.aspectj.lang.annotation.Before;
-import org.springframework.stereotype.Component;
 import com.warewms.common.annotation.DataScope;
 import com.warewms.common.core.domain.base.BaseEntity;
 import com.warewms.common.core.domain.entity.SysRole;
@@ -14,7 +8,14 @@ import com.warewms.common.core.domain.model.LoginUser;
 import com.warewms.common.core.text.Convert;
 import com.warewms.common.utils.SecurityUtils;
 import com.warewms.common.utils.StringUtils;
-import com.warewms.framework.security.context.PermissionContextHolder;
+import com.warewms.system.common.security.context.PermissionContextHolder;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Before;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 数据过滤处理

+ 6 - 5
warewms-framework/src/main/java/com/warewms/framework/aspectj/DataSourceAspect.java

@@ -1,6 +1,8 @@
-package com.warewms.framework.aspectj;
+package com.warewms.system.common.aspectj;
 
-import java.util.Objects;
+import com.warewms.common.annotation.DataSource;
+import com.warewms.common.utils.StringUtils;
+import com.warewms.framework.datasource.DynamicDataSourceContextHolder;
 import org.aspectj.lang.ProceedingJoinPoint;
 import org.aspectj.lang.annotation.Around;
 import org.aspectj.lang.annotation.Aspect;
@@ -11,9 +13,8 @@ import org.slf4j.LoggerFactory;
 import org.springframework.core.annotation.AnnotationUtils;
 import org.springframework.core.annotation.Order;
 import org.springframework.stereotype.Component;
-import com.warewms.common.annotation.DataSource;
-import com.warewms.common.utils.StringUtils;
-import com.warewms.framework.datasource.DynamicDataSourceContextHolder;
+
+import java.util.Objects;
 
 /**
  * 多数据源处理

+ 19 - 18
warewms-framework/src/main/java/com/warewms/framework/aspectj/LogAspect.java

@@ -1,21 +1,5 @@
-package com.warewms.framework.aspectj;
+package com.warewms.system.common.aspectj;
 
-import java.util.Collection;
-import java.util.Map;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.apache.commons.lang3.ArrayUtils;
-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.aspectj.lang.annotation.Before;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.core.NamedThreadLocal;
-import org.springframework.stereotype.Component;
-import org.springframework.validation.BindingResult;
-import org.springframework.web.multipart.MultipartFile;
 import com.alibaba.fastjson2.JSON;
 import com.warewms.common.annotation.Log;
 import com.warewms.common.core.domain.model.LoginUser;
@@ -27,8 +11,25 @@ import com.warewms.common.utils.ServletUtils;
 import com.warewms.common.utils.StringUtils;
 import com.warewms.common.utils.ip.IpUtils;
 import com.warewms.framework.manager.AsyncManager;
-import com.warewms.framework.manager.factory.AsyncFactory;
+import com.warewms.system.common.factory.AsyncFactory;
 import com.warewms.system.domain.SysOperLog;
+import org.apache.commons.lang3.ArrayUtils;
+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.aspectj.lang.annotation.Before;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.core.NamedThreadLocal;
+import org.springframework.stereotype.Component;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Collection;
+import java.util.Map;
 
 /**
  * 操作日志记录处理

+ 10 - 9
warewms-framework/src/main/java/com/warewms/framework/aspectj/RateLimiterAspect.java

@@ -1,8 +1,10 @@
-package com.warewms.framework.aspectj;
+package com.warewms.system.common.aspectj;
 
-import java.lang.reflect.Method;
-import java.util.Collections;
-import java.util.List;
+import com.warewms.common.annotation.RateLimiter;
+import com.warewms.common.enums.LimitType;
+import com.warewms.common.exception.ServiceException;
+import com.warewms.common.utils.StringUtils;
+import com.warewms.common.utils.ip.IpUtils;
 import org.aspectj.lang.JoinPoint;
 import org.aspectj.lang.annotation.Aspect;
 import org.aspectj.lang.annotation.Before;
@@ -13,11 +15,10 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.data.redis.core.script.RedisScript;
 import org.springframework.stereotype.Component;
-import com.warewms.common.annotation.RateLimiter;
-import com.warewms.common.enums.LimitType;
-import com.warewms.common.exception.ServiceException;
-import com.warewms.common.utils.StringUtils;
-import com.warewms.common.utils.ip.IpUtils;
+
+import java.lang.reflect.Method;
+import java.util.Collections;
+import java.util.List;
 
 /**
  * 限流处理

+ 5 - 4
warewms-framework/src/main/java/com/warewms/framework/manager/factory/AsyncFactory.java

@@ -1,8 +1,5 @@
-package com.warewms.framework.manager.factory;
+package com.warewms.system.common.factory;
 
-import java.util.TimerTask;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import com.warewms.common.constant.Constants;
 import com.warewms.common.utils.LogUtils;
 import com.warewms.common.utils.ServletUtils;
@@ -15,6 +12,10 @@ import com.warewms.system.domain.SysOperLog;
 import com.warewms.system.service.ISysLogininforService;
 import com.warewms.system.service.ISysOperLogService;
 import eu.bitwalker.useragentutils.UserAgent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.TimerTask;
 
 /**
  * 异步工厂(产生任务用)

+ 1 - 1
warewms-framework/src/main/java/com/warewms/framework/security/context/AuthenticationContextHolder.java

@@ -1,4 +1,4 @@
-package com.warewms.framework.security.context;
+package com.warewms.system.common.security.context;
 
 import org.springframework.security.core.Authentication;
 

+ 2 - 2
warewms-framework/src/main/java/com/warewms/framework/security/context/PermissionContextHolder.java

@@ -1,8 +1,8 @@
-package com.warewms.framework.security.context;
+package com.warewms.system.common.security.context;
 
+import com.warewms.common.core.text.Convert;
 import org.springframework.web.context.request.RequestAttributes;
 import org.springframework.web.context.request.RequestContextHolder;
-import com.warewms.common.core.text.Convert;
 
 /**
  * 权限信息

+ 11 - 10
warewms-framework/src/main/java/com/warewms/framework/security/filter/JwtAuthenticationTokenFilter.java

@@ -1,20 +1,21 @@
-package com.warewms.framework.security.filter;
+package com.warewms.system.common.security.filter;
 
-import java.io.IOException;
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import com.warewms.common.core.domain.model.LoginUser;
+import com.warewms.common.utils.SecurityUtils;
+import com.warewms.common.utils.StringUtils;
+import com.warewms.system.service.monitor.service.TokenService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;
 import org.springframework.stereotype.Component;
 import org.springframework.web.filter.OncePerRequestFilter;
-import com.warewms.common.core.domain.model.LoginUser;
-import com.warewms.common.utils.SecurityUtils;
-import com.warewms.common.utils.StringUtils;
-import com.warewms.framework.web.service.TokenService;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 
 /**
  * token过滤器 验证token有效性

+ 9 - 8
warewms-framework/src/main/java/com/warewms/framework/security/handle/AuthenticationEntryPointImpl.java

@@ -1,17 +1,18 @@
-package com.warewms.framework.security.handle;
+package com.warewms.system.common.security.handle;
 
-import java.io.IOException;
-import java.io.Serializable;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.security.core.AuthenticationException;
-import org.springframework.security.web.AuthenticationEntryPoint;
-import org.springframework.stereotype.Component;
 import com.alibaba.fastjson2.JSON;
 import com.warewms.common.constant.HttpStatus;
 import com.warewms.common.core.domain.AjaxResult;
 import com.warewms.common.utils.ServletUtils;
 import com.warewms.common.utils.StringUtils;
+import org.springframework.security.core.AuthenticationException;
+import org.springframework.security.web.AuthenticationEntryPoint;
+import org.springframework.stereotype.Component;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.Serializable;
 
 /**
  * 认证失败处理类 返回未授权

+ 12 - 11
warewms-framework/src/main/java/com/warewms/framework/security/handle/LogoutSuccessHandlerImpl.java

@@ -1,13 +1,5 @@
-package com.warewms.framework.security.handle;
+package com.warewms.system.common.security.handle;
 
-import java.io.IOException;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
 import com.alibaba.fastjson2.JSON;
 import com.warewms.common.constant.Constants;
 import com.warewms.common.core.domain.AjaxResult;
@@ -15,8 +7,17 @@ import com.warewms.common.core.domain.model.LoginUser;
 import com.warewms.common.utils.ServletUtils;
 import com.warewms.common.utils.StringUtils;
 import com.warewms.framework.manager.AsyncManager;
-import com.warewms.framework.manager.factory.AsyncFactory;
-import com.warewms.framework.web.service.TokenService;
+import com.warewms.system.common.factory.AsyncFactory;
+import com.warewms.system.service.monitor.service.TokenService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 
 /**
  * 自定义退出处理类 返回成功

+ 5 - 5
warewms-framework/src/main/java/com/warewms/framework/config/SecurityConfig.java

@@ -1,5 +1,9 @@
-package com.warewms.framework.config;
+package com.warewms.system.config;
 
+import com.warewms.framework.config.properties.PermitAllUrlProperties;
+import com.warewms.system.common.security.filter.JwtAuthenticationTokenFilter;
+import com.warewms.system.common.security.handle.AuthenticationEntryPointImpl;
+import com.warewms.system.common.security.handle.LogoutSuccessHandlerImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Bean;
 import org.springframework.http.HttpMethod;
@@ -15,10 +19,6 @@ import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
 import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
 import org.springframework.security.web.authentication.logout.LogoutFilter;
 import org.springframework.web.filter.CorsFilter;
-import com.warewms.framework.config.properties.PermitAllUrlProperties;
-import com.warewms.framework.security.filter.JwtAuthenticationTokenFilter;
-import com.warewms.framework.security.handle.AuthenticationEntryPointImpl;
-import com.warewms.framework.security.handle.LogoutSuccessHandlerImpl;
 
 /**
  * spring security配置

+ 12 - 11
warewms-admin/src/main/java/com/warewms/web/controller/common/CaptchaController.java

@@ -1,15 +1,5 @@
-package com.warewms.web.controller.common;
+package com.warewms.system.controller.common;
 
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.util.concurrent.TimeUnit;
-import javax.annotation.Resource;
-import javax.imageio.ImageIO;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.util.FastByteArrayOutputStream;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RestController;
 import com.google.code.kaptcha.Producer;
 import com.warewms.common.config.RuoYiConfig;
 import com.warewms.common.constant.CacheConstants;
@@ -19,6 +9,17 @@ import com.warewms.common.core.redis.RedisCache;
 import com.warewms.common.utils.sign.Base64;
 import com.warewms.common.utils.uuid.IdUtils;
 import com.warewms.system.service.ISysConfigService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.FastByteArrayOutputStream;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import javax.imageio.ImageIO;
+import javax.servlet.http.HttpServletResponse;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
 
 /**
  * 验证码操作处理

+ 13 - 12
warewms-admin/src/main/java/com/warewms/web/controller/common/CommonController.java

@@ -1,9 +1,12 @@
-package com.warewms.web.controller.common;
+package com.warewms.system.controller.common;
 
-import java.util.ArrayList;
-import java.util.List;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import com.warewms.common.config.RuoYiConfig;
+import com.warewms.common.constant.Constants;
+import com.warewms.common.core.domain.AjaxResult;
+import com.warewms.common.utils.StringUtils;
+import com.warewms.common.utils.file.FileUploadUtils;
+import com.warewms.common.utils.file.FileUtils;
+import com.warewms.framework.config.ServerConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -13,13 +16,11 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
-import com.warewms.common.config.RuoYiConfig;
-import com.warewms.common.constant.Constants;
-import com.warewms.common.core.domain.AjaxResult;
-import com.warewms.common.utils.StringUtils;
-import com.warewms.common.utils.file.FileUploadUtils;
-import com.warewms.common.utils.file.FileUtils;
-import com.warewms.framework.config.ServerConfig;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 通用请求处理

+ 8 - 17
warewms-admin/src/main/java/com/warewms/web/controller/monitor/CacheController.java

@@ -1,25 +1,16 @@
-package com.warewms.web.controller.monitor;
+package com.warewms.system.controller.monitor;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.redis.core.RedisCallback;
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.security.access.prepost.PreAuthorize;
-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.warewms.common.constant.CacheConstants;
 import com.warewms.common.core.domain.AjaxResult;
 import com.warewms.common.utils.StringUtils;
 import com.warewms.system.domain.SysCache;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisCallback;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
 
 /**
  * 缓存监控

+ 3 - 3
warewms-admin/src/main/java/com/warewms/web/controller/monitor/ServerController.java

@@ -1,11 +1,11 @@
-package com.warewms.web.controller.monitor;
+package com.warewms.system.controller.monitor;
 
+import com.warewms.common.core.domain.AjaxResult;
+import com.warewms.system.mapper.server.Server;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
-import com.warewms.common.core.domain.AjaxResult;
-import com.warewms.framework.web.domain.Server;
 
 /**
  * 服务器监控

+ 8 - 12
warewms-admin/src/main/java/com/warewms/web/controller/monitor/SysLogininforController.java

@@ -1,23 +1,19 @@
-package com.warewms.web.controller.monitor;
+package com.warewms.system.controller.monitor;
 
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-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.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
 import com.warewms.common.annotation.Log;
 import com.warewms.common.core.controller.BaseController;
 import com.warewms.common.core.domain.AjaxResult;
 import com.warewms.common.enums.BusinessType;
 import com.warewms.common.utils.poi.ExcelUtil;
-import com.warewms.framework.web.service.SysPasswordService;
 import com.warewms.system.domain.SysLogininfor;
 import com.warewms.system.service.ISysLogininforService;
+import com.warewms.system.service.monitor.service.SysPasswordService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
 
 /**
  * 系统访问记录

+ 7 - 10
warewms-admin/src/main/java/com/warewms/web/controller/monitor/SysOperlogController.java

@@ -1,14 +1,5 @@
-package com.warewms.web.controller.monitor;
+package com.warewms.system.controller.monitor;
 
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
 import com.warewms.common.annotation.Log;
 import com.warewms.common.core.controller.BaseController;
 import com.warewms.common.core.domain.AjaxResult;
@@ -16,6 +7,12 @@ import com.warewms.common.enums.BusinessType;
 import com.warewms.common.utils.poi.ExcelUtil;
 import com.warewms.system.domain.SysOperLog;
 import com.warewms.system.service.ISysOperLogService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
 
 /**
  * 操作日志记录

+ 10 - 13
warewms-admin/src/main/java/com/warewms/web/controller/monitor/SysUserOnlineController.java

@@ -1,27 +1,24 @@
-package com.warewms.web.controller.monitor;
+package com.warewms.system.controller.monitor;
 
-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.security.access.prepost.PreAuthorize;
-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.warewms.common.annotation.Log;
 import com.warewms.common.constant.CacheConstants;
 import com.warewms.common.core.controller.BaseController;
 import com.warewms.common.core.domain.AjaxResult;
-import com.warewms.common.core.domain.model.LoginUser;
 import com.warewms.common.core.domain.base.page.TableDataInfo;
+import com.warewms.common.core.domain.model.LoginUser;
 import com.warewms.common.core.redis.RedisCache;
 import com.warewms.common.enums.BusinessType;
 import com.warewms.common.utils.StringUtils;
 import com.warewms.system.domain.SysUserOnline;
 import com.warewms.system.service.ISysUserOnlineService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
 
 /**
  * 在线用户监控

+ 8 - 14
warewms-admin/src/main/java/com/warewms/web/controller/system/SysConfigController.java

@@ -1,18 +1,5 @@
-package com.warewms.web.controller.system;
+package com.warewms.system.controller.system;
 
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-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.warewms.common.annotation.Log;
 import com.warewms.common.core.controller.BaseController;
 import com.warewms.common.core.domain.AjaxResult;
@@ -21,6 +8,13 @@ import com.warewms.common.enums.BusinessType;
 import com.warewms.common.utils.poi.ExcelUtil;
 import com.warewms.system.domain.SysConfig;
 import com.warewms.system.service.ISysConfigService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
 
 /**
  * 参数配置 信息操作处理

+ 8 - 14
warewms-admin/src/main/java/com/warewms/web/controller/system/SysDeptController.java

@@ -1,18 +1,5 @@
-package com.warewms.web.controller.system;
+package com.warewms.system.controller.system;
 
-import java.util.List;
-import org.apache.commons.lang3.ArrayUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-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.warewms.common.annotation.Log;
 import com.warewms.common.constant.UserConstants;
 import com.warewms.common.core.controller.BaseController;
@@ -21,6 +8,13 @@ import com.warewms.common.core.domain.entity.SysDept;
 import com.warewms.common.enums.BusinessType;
 import com.warewms.common.utils.StringUtils;
 import com.warewms.system.service.ISysDeptService;
+import org.apache.commons.lang3.ArrayUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
 
 /**
  * 部门信息

+ 9 - 15
warewms-admin/src/main/java/com/warewms/web/controller/system/SysDictDataController.java

@@ -1,19 +1,5 @@
-package com.warewms.web.controller.system;
+package com.warewms.system.controller.system;
 
-import java.util.ArrayList;
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-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.warewms.common.annotation.Log;
 import com.warewms.common.core.controller.BaseController;
 import com.warewms.common.core.domain.AjaxResult;
@@ -23,6 +9,14 @@ import com.warewms.common.utils.StringUtils;
 import com.warewms.common.utils.poi.ExcelUtil;
 import com.warewms.system.service.ISysDictDataService;
 import com.warewms.system.service.ISysDictTypeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 数据字典信息

+ 1 - 3
warewms-admin/src/main/java/com/warewms/web/controller/system/SysDictTypeController.java

@@ -1,4 +1,4 @@
-package com.warewms.web.controller.system;
+package com.warewms.system.controller.system;
 
 import com.warewms.common.annotation.Log;
 import com.warewms.common.core.controller.BaseController;
@@ -31,8 +31,6 @@ public class SysDictTypeController extends BaseController<SysDictType>
     @Autowired
     private ISysDictTypeService dictTypeService;
 
-
-    //TODO 示例代码
     @PreAuthorize("@ss.hasPermi('system:dict:list')")
     @GetMapping("/list")
     public TableDataInfo page(PageDomain pageDomain, SysDictType sysDictType) {

+ 3 - 3
warewms-admin/src/main/java/com/warewms/web/controller/system/SysIndexController.java

@@ -1,10 +1,10 @@
-package com.warewms.web.controller.system;
+package com.warewms.system.controller.system;
 
+import com.warewms.common.config.RuoYiConfig;
+import com.warewms.common.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
-import com.warewms.common.config.RuoYiConfig;
-import com.warewms.common.utils.StringUtils;
 
 /**
  * 首页

+ 11 - 10
warewms-admin/src/main/java/com/warewms/web/controller/system/SysLoginController.java

@@ -1,21 +1,22 @@
-package com.warewms.web.controller.system;
+package com.warewms.system.controller.system;
 
-import java.util.List;
-import java.util.Set;
-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.RequestBody;
-import org.springframework.web.bind.annotation.RestController;
 import com.warewms.common.constant.Constants;
 import com.warewms.common.core.domain.AjaxResult;
 import com.warewms.common.core.domain.entity.SysMenu;
 import com.warewms.common.core.domain.entity.SysUser;
 import com.warewms.common.core.domain.model.LoginBody;
 import com.warewms.common.utils.SecurityUtils;
-import com.warewms.framework.web.service.SysLoginService;
-import com.warewms.framework.web.service.SysPermissionService;
 import com.warewms.system.service.ISysMenuService;
+import com.warewms.system.service.monitor.service.SysLoginService;
+import com.warewms.system.service.monitor.service.SysPermissionService;
+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.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+import java.util.Set;
 
 /**
  * 登录验证

+ 7 - 13
warewms-admin/src/main/java/com/warewms/web/controller/system/SysMenuController.java

@@ -1,17 +1,5 @@
-package com.warewms.web.controller.system;
+package com.warewms.system.controller.system;
 
-import java.util.List;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-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.warewms.common.annotation.Log;
 import com.warewms.common.constant.UserConstants;
 import com.warewms.common.core.controller.BaseController;
@@ -20,6 +8,12 @@ import com.warewms.common.core.domain.entity.SysMenu;
 import com.warewms.common.enums.BusinessType;
 import com.warewms.common.utils.StringUtils;
 import com.warewms.system.service.ISysMenuService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
 
 /**
  * 菜单信息

+ 5 - 12
warewms-admin/src/main/java/com/warewms/web/controller/system/SysNoticeController.java

@@ -1,22 +1,15 @@
-package com.warewms.web.controller.system;
+package com.warewms.system.controller.system;
 
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-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.warewms.common.annotation.Log;
 import com.warewms.common.core.controller.BaseController;
 import com.warewms.common.core.domain.AjaxResult;
 import com.warewms.common.enums.BusinessType;
 import com.warewms.system.domain.SysNotice;
 import com.warewms.system.service.ISysNoticeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
 
 /**
  * 公告 信息操作处理

+ 8 - 14
warewms-admin/src/main/java/com/warewms/web/controller/system/SysPostController.java

@@ -1,18 +1,5 @@
-package com.warewms.web.controller.system;
+package com.warewms.system.controller.system;
 
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-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.warewms.common.annotation.Log;
 import com.warewms.common.core.controller.BaseController;
 import com.warewms.common.core.domain.AjaxResult;
@@ -20,6 +7,13 @@ import com.warewms.common.enums.BusinessType;
 import com.warewms.common.utils.poi.ExcelUtil;
 import com.warewms.system.domain.SysPost;
 import com.warewms.system.service.ISysPostService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
 
 /**
  * 岗位信息操作处理

+ 5 - 11
warewms-admin/src/main/java/com/warewms/web/controller/system/SysProfileController.java

@@ -1,14 +1,5 @@
-package com.warewms.web.controller.system;
+package com.warewms.system.controller.system;
 
-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.warewms.common.annotation.Log;
 import com.warewms.common.config.RuoYiConfig;
 import com.warewms.common.core.controller.BaseController;
@@ -20,8 +11,11 @@ import com.warewms.common.utils.SecurityUtils;
 import com.warewms.common.utils.StringUtils;
 import com.warewms.common.utils.file.FileUploadUtils;
 import com.warewms.common.utils.file.MimeTypeUtils;
-import com.warewms.framework.web.service.TokenService;
 import com.warewms.system.service.ISysUserService;
+import com.warewms.system.service.monitor.service.TokenService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 /**
  * 个人信息 业务处理

+ 6 - 6
warewms-admin/src/main/java/com/warewms/web/controller/system/SysRegisterController.java

@@ -1,15 +1,15 @@
-package com.warewms.web.controller.system;
+package com.warewms.system.controller.system;
 
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RestController;
 import com.warewms.common.core.controller.BaseController;
 import com.warewms.common.core.domain.AjaxResult;
 import com.warewms.common.core.domain.model.RegisterBody;
 import com.warewms.common.utils.StringUtils;
-import com.warewms.framework.web.service.SysRegisterService;
 import com.warewms.system.service.ISysConfigService;
+import com.warewms.system.service.monitor.service.SysRegisterService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * 注册验证

+ 10 - 16
warewms-admin/src/main/java/com/warewms/web/controller/system/SysRoleController.java

@@ -1,18 +1,5 @@
-package com.warewms.web.controller.system;
+package com.warewms.system.controller.system;
 
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-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.warewms.common.annotation.Log;
 import com.warewms.common.core.controller.BaseController;
 import com.warewms.common.core.domain.AjaxResult;
@@ -22,12 +9,19 @@ import com.warewms.common.core.domain.model.LoginUser;
 import com.warewms.common.enums.BusinessType;
 import com.warewms.common.utils.StringUtils;
 import com.warewms.common.utils.poi.ExcelUtil;
-import com.warewms.framework.web.service.SysPermissionService;
-import com.warewms.framework.web.service.TokenService;
 import com.warewms.system.domain.SysUserRole;
 import com.warewms.system.service.ISysDeptService;
 import com.warewms.system.service.ISysRoleService;
 import com.warewms.system.service.ISysUserService;
+import com.warewms.system.service.monitor.service.SysPermissionService;
+import com.warewms.system.service.monitor.service.TokenService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
 
 /**
  * 角色信息

+ 11 - 17
warewms-admin/src/main/java/com/warewms/web/controller/system/SysUserController.java

@@ -1,21 +1,5 @@
-package com.warewms.web.controller.system;
+package com.warewms.system.controller.system;
 
-import java.util.List;
-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.security.access.prepost.PreAuthorize;
-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.warewms.common.annotation.Log;
 import com.warewms.common.core.controller.BaseController;
 import com.warewms.common.core.domain.AjaxResult;
@@ -30,6 +14,16 @@ import com.warewms.system.service.ISysDeptService;
 import com.warewms.system.service.ISysPostService;
 import com.warewms.system.service.ISysRoleService;
 import com.warewms.system.service.ISysUserService;
+import org.apache.commons.lang3.ArrayUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 用户信息

+ 7 - 18
warewms-admin/src/main/java/com/warewms/web/controller/tool/TestController.java

@@ -1,26 +1,15 @@
-package com.warewms.web.controller.tool;
+package com.warewms.system.controller.tool;
+
+import com.warewms.common.core.controller.BaseController;
+import com.warewms.common.core.domain.R;
+import com.warewms.common.utils.StringUtils;
+import io.swagger.annotations.*;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
-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.warewms.common.core.controller.BaseController;
-import com.warewms.common.core.domain.R;
-import com.warewms.common.utils.StringUtils;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import io.swagger.annotations.ApiOperation;
 
 /**
  * swagger 用户测试方法

+ 1 - 1
warewms-framework/src/main/java/com/warewms/framework/web/domain/server/Cpu.java

@@ -1,4 +1,4 @@
-package com.warewms.framework.web.domain.server;
+package com.warewms.system.mapper.server;
 
 import com.warewms.common.utils.Arith;
 

+ 3 - 2
warewms-framework/src/main/java/com/warewms/framework/web/domain/server/Jvm.java

@@ -1,9 +1,10 @@
-package com.warewms.framework.web.domain.server;
+package com.warewms.system.mapper.server;
 
-import java.lang.management.ManagementFactory;
 import com.warewms.common.utils.Arith;
 import com.warewms.common.utils.DateUtils;
 
+import java.lang.management.ManagementFactory;
+
 /**
  * JVM相关信息
  * 

+ 1 - 1
warewms-framework/src/main/java/com/warewms/framework/web/domain/server/Mem.java

@@ -1,4 +1,4 @@
-package com.warewms.framework.web.domain.server;
+package com.warewms.system.mapper.server;
 
 import com.warewms.common.utils.Arith;
 

+ 6 - 10
warewms-framework/src/main/java/com/warewms/framework/web/domain/Server.java

@@ -1,16 +1,7 @@
-package com.warewms.framework.web.domain;
+package com.warewms.system.mapper.server;
 
-import java.net.UnknownHostException;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Properties;
 import com.warewms.common.utils.Arith;
 import com.warewms.common.utils.ip.IpUtils;
-import com.warewms.framework.web.domain.server.Cpu;
-import com.warewms.framework.web.domain.server.Jvm;
-import com.warewms.framework.web.domain.server.Mem;
-import com.warewms.framework.web.domain.server.Sys;
-import com.warewms.framework.web.domain.server.SysFile;
 import oshi.SystemInfo;
 import oshi.hardware.CentralProcessor;
 import oshi.hardware.CentralProcessor.TickType;
@@ -21,6 +12,11 @@ import oshi.software.os.OSFileStore;
 import oshi.software.os.OperatingSystem;
 import oshi.util.Util;
 
+import java.net.UnknownHostException;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Properties;
+
 /**
  * 服务器相关信息
  * 

+ 1 - 1
warewms-framework/src/main/java/com/warewms/framework/web/domain/server/Sys.java

@@ -1,4 +1,4 @@
-package com.warewms.framework.web.domain.server;
+package com.warewms.system.mapper.server;
 
 /**
  * 系统相关信息

+ 1 - 1
warewms-framework/src/main/java/com/warewms/framework/web/domain/server/SysFile.java

@@ -1,4 +1,4 @@
-package com.warewms.framework.web.domain.server;
+package com.warewms.system.mapper.server;
 
 /**
  * 系统文件相关信息

+ 6 - 5
warewms-framework/src/main/java/com/warewms/framework/web/service/PermissionService.java

@@ -1,13 +1,14 @@
-package com.warewms.framework.web.service;
+package com.warewms.system.service.monitor.service;
 
-import java.util.Set;
-import org.springframework.stereotype.Service;
-import org.springframework.util.CollectionUtils;
 import com.warewms.common.core.domain.entity.SysRole;
 import com.warewms.common.core.domain.model.LoginUser;
 import com.warewms.common.utils.SecurityUtils;
 import com.warewms.common.utils.StringUtils;
-import com.warewms.framework.security.context.PermissionContextHolder;
+import com.warewms.system.common.security.context.PermissionContextHolder;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.Set;
 
 /**
  * RuoYi首创 自定义权限实现,ss取自SpringSecurity首字母

+ 11 - 13
warewms-framework/src/main/java/com/warewms/framework/web/service/SysLoginService.java

@@ -1,13 +1,5 @@
-package com.warewms.framework.web.service;
+package com.warewms.system.service.monitor.service;
 
-import javax.annotation.Resource;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.authentication.AuthenticationManager;
-import org.springframework.security.authentication.BadCredentialsException;
-import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
-import org.springframework.security.core.Authentication;
-import org.springframework.stereotype.Component;
-import com.warewms.common.constant.CacheConstants;
 import com.warewms.common.constant.Constants;
 import com.warewms.common.constant.UserConstants;
 import com.warewms.common.core.domain.entity.SysUser;
@@ -15,8 +7,6 @@ import com.warewms.common.core.domain.model.LoginUser;
 import com.warewms.common.core.redis.RedisCache;
 import com.warewms.common.exception.ServiceException;
 import com.warewms.common.exception.user.BlackListException;
-import com.warewms.common.exception.user.CaptchaException;
-import com.warewms.common.exception.user.CaptchaExpireException;
 import com.warewms.common.exception.user.UserNotExistsException;
 import com.warewms.common.exception.user.UserPasswordNotMatchException;
 import com.warewms.common.utils.DateUtils;
@@ -24,10 +14,18 @@ import com.warewms.common.utils.MessageUtils;
 import com.warewms.common.utils.StringUtils;
 import com.warewms.common.utils.ip.IpUtils;
 import com.warewms.framework.manager.AsyncManager;
-import com.warewms.framework.manager.factory.AsyncFactory;
-import com.warewms.framework.security.context.AuthenticationContextHolder;
+import com.warewms.system.common.factory.AsyncFactory;
+import com.warewms.system.common.security.context.AuthenticationContextHolder;
 import com.warewms.system.service.ISysConfigService;
 import com.warewms.system.service.ISysUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.authentication.BadCredentialsException;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
 
 /**
  * 登录校验方法

+ 9 - 8
warewms-framework/src/main/java/com/warewms/framework/web/service/SysPasswordService.java

@@ -1,10 +1,5 @@
-package com.warewms.framework.web.service;
+package com.warewms.system.service.monitor.service;
 
-import java.util.concurrent.TimeUnit;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.security.core.Authentication;
-import org.springframework.stereotype.Component;
 import com.warewms.common.constant.CacheConstants;
 import com.warewms.common.constant.Constants;
 import com.warewms.common.core.domain.entity.SysUser;
@@ -14,8 +9,14 @@ import com.warewms.common.exception.user.UserPasswordRetryLimitExceedException;
 import com.warewms.common.utils.MessageUtils;
 import com.warewms.common.utils.SecurityUtils;
 import com.warewms.framework.manager.AsyncManager;
-import com.warewms.framework.manager.factory.AsyncFactory;
-import com.warewms.framework.security.context.AuthenticationContextHolder;
+import com.warewms.system.common.factory.AsyncFactory;
+import com.warewms.system.common.security.context.AuthenticationContextHolder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.security.core.Authentication;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.TimeUnit;
 
 /**
  * 登录密码方法

+ 7 - 6
warewms-framework/src/main/java/com/warewms/framework/web/service/SysPermissionService.java

@@ -1,14 +1,15 @@
-package com.warewms.framework.web.service;
+package com.warewms.system.service.monitor.service;
 
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
 import com.warewms.common.core.domain.entity.SysRole;
 import com.warewms.common.core.domain.entity.SysUser;
 import com.warewms.system.service.ISysMenuService;
 import com.warewms.system.service.ISysRoleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
 
 /**
  * 用户权限处理

+ 4 - 4
warewms-framework/src/main/java/com/warewms/framework/web/service/SysRegisterService.java

@@ -1,7 +1,5 @@
-package com.warewms.framework.web.service;
+package com.warewms.system.service.monitor.service;
 
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
 import com.warewms.common.constant.CacheConstants;
 import com.warewms.common.constant.Constants;
 import com.warewms.common.constant.UserConstants;
@@ -14,9 +12,11 @@ import com.warewms.common.utils.MessageUtils;
 import com.warewms.common.utils.SecurityUtils;
 import com.warewms.common.utils.StringUtils;
 import com.warewms.framework.manager.AsyncManager;
-import com.warewms.framework.manager.factory.AsyncFactory;
+import com.warewms.system.common.factory.AsyncFactory;
 import com.warewms.system.service.ISysConfigService;
 import com.warewms.system.service.ISysUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
 
 /**
  * 注册校验方法

+ 9 - 8
warewms-framework/src/main/java/com/warewms/framework/web/service/TokenService.java

@@ -1,12 +1,5 @@
-package com.warewms.framework.web.service;
+package com.warewms.system.service.monitor.service;
 
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.TimeUnit;
-import javax.servlet.http.HttpServletRequest;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
 import com.warewms.common.constant.CacheConstants;
 import com.warewms.common.constant.Constants;
 import com.warewms.common.core.domain.model.LoginUser;
@@ -20,6 +13,14 @@ import eu.bitwalker.useragentutils.UserAgent;
 import io.jsonwebtoken.Claims;
 import io.jsonwebtoken.Jwts;
 import io.jsonwebtoken.SignatureAlgorithm;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
 
 /**
  * token验证处理

+ 7 - 7
warewms-framework/src/main/java/com/warewms/framework/web/service/UserDetailsServiceImpl.java

@@ -1,5 +1,11 @@
-package com.warewms.framework.web.service;
+package com.warewms.system.service.monitor.service;
 
+import com.warewms.common.core.domain.entity.SysUser;
+import com.warewms.common.core.domain.model.LoginUser;
+import com.warewms.common.enums.UserStatus;
+import com.warewms.common.exception.ServiceException;
+import com.warewms.common.utils.StringUtils;
+import com.warewms.system.service.ISysUserService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -7,12 +13,6 @@ import org.springframework.security.core.userdetails.UserDetails;
 import org.springframework.security.core.userdetails.UserDetailsService;
 import org.springframework.security.core.userdetails.UsernameNotFoundException;
 import org.springframework.stereotype.Service;
-import com.warewms.common.core.domain.entity.SysUser;
-import com.warewms.common.core.domain.model.LoginUser;
-import com.warewms.common.enums.UserStatus;
-import com.warewms.common.exception.ServiceException;
-import com.warewms.common.utils.StringUtils;
-import com.warewms.system.service.ISysUserService;
 
 /**
  * 用户验证处理