RuoYi vor 4 Jahren
Ursprung
Commit
3603582c88
61 geänderte Dateien mit 1304 neuen und 305 gelöschten Zeilen
  1. 7 2
      README.md
  2. 3 11
      pom.xml
  3. 1 1
      ruoyi-api/pom.xml
  4. 1 1
      ruoyi-api/ruoyi-api-system/pom.xml
  5. 13 1
      ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteLogService.java
  6. 0 1
      ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteUserService.java
  7. 0 14
      ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysOperLog.java
  8. 7 0
      ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteLogFallbackFactory.java
  9. 1 1
      ruoyi-auth/pom.xml
  10. 14 0
      ruoyi-auth/src/main/java/com/ruoyi/auth/controller/TokenController.java
  11. 39 0
      ruoyi-auth/src/main/java/com/ruoyi/auth/handler/AuthenticationSuccessEventHandler.java
  12. 1 1
      ruoyi-common/pom.xml
  13. 1 1
      ruoyi-common/ruoyi-common-core/pom.xml
  14. 5 0
      ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java
  15. 1 0
      ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/SecurityConstants.java
  16. 1 1
      ruoyi-common/ruoyi-common-datascope/pom.xml
  17. 1 7
      ruoyi-common/ruoyi-common-log/pom.xml
  18. 1 1
      ruoyi-common/ruoyi-common-redis/pom.xml
  19. 0 2
      ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/configure/RedisConfig.java
  20. 1 1
      ruoyi-common/ruoyi-common-security/pom.xml
  21. 0 1
      ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/config/SecurityImportBeanDefinitionRegistrar.java
  22. 1 1
      ruoyi-common/ruoyi-common-swagger/pom.xml
  23. 33 15
      ruoyi-gateway/pom.xml
  24. 32 0
      ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/GatewayConfig.java
  25. 4 11
      ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/RouterFunctionConfiguration.java
  26. 0 36
      ruoyi-gateway/src/main/java/com/ruoyi/gateway/handler/HystrixFallbackHandler.java
  27. 47 0
      ruoyi-gateway/src/main/java/com/ruoyi/gateway/handler/SentinelFallbackHandler.java
  28. 0 3
      ruoyi-gateway/src/main/java/com/ruoyi/gateway/service/impl/ValidateCodeServiceImpl.java
  29. 17 0
      ruoyi-gateway/src/main/resources/bootstrap.yml
  30. 1 1
      ruoyi-modules/pom.xml
  31. 4 4
      ruoyi-modules/ruoyi-gen/pom.xml
  32. 1 1
      ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityUtils.java
  33. 11 9
      ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/controller.java.vm
  34. 0 9
      ruoyi-modules/ruoyi-gen/src/main/resources/vm/js/api.js.vm
  35. 4 11
      ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm
  36. 4 4
      ruoyi-modules/ruoyi-job/pom.xml
  37. 4 4
      ruoyi-modules/ruoyi-system/pom.xml
  38. 94 0
      ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysClientDetailsController.java
  39. 28 1
      ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysLogininforController.java
  40. 197 0
      ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysClientDetails.java
  41. 11 53
      ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysLogininfor.java
  42. 60 0
      ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysClientDetailsMapper.java
  43. 1 1
      ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java
  44. 60 0
      ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysClientDetailsService.java
  45. 1 1
      ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysLogininforService.java
  46. 92 0
      ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysClientDetailsServiceImpl.java
  47. 2 2
      ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java
  48. 95 0
      ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysClientDetailsMapper.xml
  49. 6 9
      ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml
  50. 3 4
      ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml
  51. 44 0
      ruoyi-ui/src/api/system/client.js
  52. 0 0
      ruoyi-ui/src/assets/icons/svg/client.svg
  53. 1 0
      ruoyi-ui/src/assets/icons/svg/nacos.svg
  54. 0 0
      ruoyi-ui/src/assets/icons/svg/sentinel.svg
  55. 271 0
      ruoyi-ui/src/views/system/client/index.vue
  56. 5 8
      ruoyi-ui/src/views/system/logininfor/index.vue
  57. 1 2
      ruoyi-ui/src/views/system/operlog/index.vue
  58. 1 1
      ruoyi-visual/pom.xml
  59. 3 3
      ruoyi-visual/ruoyi-monitor/pom.xml
  60. 62 60
      sql/ry_20200610.sql
  61. 5 4
      sql/ry_config_20200610.sql

+ 7 - 2
README.md

@@ -2,7 +2,8 @@
 
 * 采用前后端分离的模式,微服务版本前端(基于 [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue))。
 * 后端采用Spring Boot、Spring Cloud & Alibaba。
-* 注册中心、配置中心选型Nacos,为权限认证使用OAuth2。
+* 注册中心、配置中心选型Nacos,权限认证使用OAuth2。
+* 流量控制框架选型Sentinel。
 * 感谢[ruoyi-cloud-design](https://gitee.com/zhangmrit/ruoyi-cloud),[pig](https://gitee.com/log4j/pig)。
 * 如需不分离应用,请移步 [RuoYi](https://gitee.com/y_project/RuoYi),如需分离应用,请移步 [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue)
 * 阿里云优惠券:[点我进入](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)  
@@ -95,9 +96,13 @@ com.ruoyi
 	<tr>
         <td><img src="https://oscimg.oschina.net/oscnet/up-f1fd681cc9d295db74e85ad6d2fe4389454.png"/></td>
         <td><img src="https://oscimg.oschina.net/oscnet/up-c195234bbcd30be6927f037a6755e6ab69c.png"/></td>
+    </tr>
+	<tr>
+        <td><img src="https://oscimg.oschina.net/oscnet/up-ece3fd37a3d4bb75a3926e905a3c5629055.png"/></td>
+        <td><img src="https://oscimg.oschina.net/oscnet/up-92ffb7f3835855cff100fa0f754a6be0d99.png"/></td>
     </tr>
     <tr>
-        <td><img src="https://oscimg.oschina.net/oscnet/b6115bc8c31de52951982e509930b20684a.jpg"/></td>
+        <td><img src="https://oscimg.oschina.net/oscnet/up-d69a19493e5aff7ecdd5d02410862bcea40.png"/></td>
         <td><img src="https://oscimg.oschina.net/oscnet/up-6d73c2140ce694e3de4c05035fdc1868d4c.png"/></td>
     </tr>
 </table>

+ 3 - 11
pom.xml

@@ -6,14 +6,14 @@
 
     <groupId>com.ruoyi</groupId>
     <artifactId>ruoyi</artifactId>
-    <version>1.0.0</version>
+    <version>2.0.0</version>
 
     <name>ruoyi</name>
     <url>http://www.ruoyi.vip</url>
     <description>若依微服务系统</description>
 
     <properties>
-        <ruoyi.version>1.0.0</ruoyi.version>
+        <ruoyi.version>2.0.0</ruoyi.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
         <java.version>1.8</java.version>
@@ -31,7 +31,6 @@
         <fastjson.version>1.2.70</fastjson.version>
 		<poi.version>3.17</poi.version>
         <common-pool.version>2.6.2</common-pool.version>
-		<bitwalker.version>1.19</bitwalker.version>
     </properties>
 
     <!-- 依赖声明 -->
@@ -51,7 +50,7 @@
             <dependency>
                 <groupId>com.alibaba.cloud</groupId>
                 <artifactId>spring-cloud-alibaba-dependencies</artifactId>
-                <version>2.1.0.RELEASE</version>
+                <version>2.2.1.RELEASE</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
@@ -146,13 +145,6 @@
                 <artifactId>commons-pool2</artifactId>
                 <version>${common-pool.version}</version>
             </dependency>
-			
-            <!-- 解析客户端操作系统、浏览器等 -->
-            <dependency>
-                <groupId>eu.bitwalker</groupId>
-                <artifactId>UserAgentUtils</artifactId>
-                <version>${bitwalker.version}</version>
-            </dependency>
 
             <!-- 核心模块 -->
 	        <dependency>

+ 1 - 1
ruoyi-api/pom.xml

@@ -4,7 +4,7 @@
     <parent>
         <groupId>com.ruoyi</groupId>
         <artifactId>ruoyi</artifactId>
-        <version>1.0.0</version>
+        <version>2.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 1 - 1
ruoyi-api/ruoyi-api-system/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <groupId>com.ruoyi</groupId>
         <artifactId>ruoyi-api</artifactId>
-        <version>1.0.0</version>
+        <version>2.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     

+ 13 - 1
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteLogService.java

@@ -3,6 +3,7 @@ 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.RequestParam;
 import com.ruoyi.common.core.constant.ServiceNameConstants;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.system.api.domain.SysOperLog;
@@ -20,9 +21,20 @@ public interface RemoteLogService
      * 保存系统日志
      *
      * @param sysOperLog 日志实体
-     * @param from 内部调用标志
      * @return 结果
      */
     @PostMapping("/operlog")
     R<Boolean> saveLog(@RequestBody SysOperLog sysOperLog);
+
+    /**
+     * 保存访问记录
+     *
+     * @param username 用户名称
+     * @param status 状态
+     * @param message 消息
+     * @return 结果
+     */
+    @PostMapping("/logininfor")
+    R<Boolean> saveLogininfor(@RequestParam("username") String username, @RequestParam("status") String status,
+            @RequestParam("message") String message);
 }

+ 0 - 1
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteUserService.java

@@ -20,7 +20,6 @@ public interface RemoteUserService
      * 通过用户名查询用户信息
      *
      * @param username 用户名
-     * @param from 调用标志
      * @return 结果
      */
     @GetMapping(value = "/user/info/{username}")

+ 0 - 14
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysOperLog.java

@@ -58,10 +58,6 @@ public class SysOperLog extends BaseEntity
     @Excel(name = "操作地址")
     private String operIp;
 
-    /** 操作地点 */
-    @Excel(name = "操作地点")
-    private String operLocation;
-
     /** 请求参数 */
     @Excel(name = "请求参数")
     private String operParam;
@@ -193,16 +189,6 @@ public class SysOperLog extends BaseEntity
         this.operIp = operIp;
     }
 
-    public String getOperLocation()
-    {
-        return operLocation;
-    }
-
-    public void setOperLocation(String operLocation)
-    {
-        this.operLocation = operLocation;
-    }
-
     public String getOperParam()
     {
         return operParam;

+ 7 - 0
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteLogFallbackFactory.java

@@ -29,6 +29,13 @@ public class RemoteLogFallbackFactory implements FallbackFactory<RemoteLogServic
             {
                 return null;
             }
+
+            @Override
+            public R<Boolean> saveLogininfor(String username, String status, String message)
+            {
+                return null;
+            }
         };
+
     }
 }

+ 1 - 1
ruoyi-auth/pom.xml

@@ -4,7 +4,7 @@
     <parent>
         <groupId>com.ruoyi</groupId>
         <artifactId>ruoyi</artifactId>
-        <version>1.0.0</version>
+        <version>2.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     

+ 14 - 0
ruoyi-auth/src/main/java/com/ruoyi/auth/controller/TokenController.java

@@ -1,5 +1,6 @@
 package com.ruoyi.auth.controller;
 
+import java.util.Map;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpHeaders;
 import org.springframework.security.oauth2.common.OAuth2AccessToken;
@@ -9,8 +10,11 @@ import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.RequestHeader;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.core.constant.Constants;
+import com.ruoyi.common.core.constant.SecurityConstants;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.system.api.RemoteLogService;
 
 /**
  * token 控制
@@ -24,6 +28,9 @@ public class TokenController
     @Autowired
     private TokenStore tokenStore;
 
+    @Autowired
+    private RemoteLogService remoteLogService;
+
     @DeleteMapping("/logout")
     public R<?> logout(@RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authHeader)
     {
@@ -45,6 +52,13 @@ public class TokenController
         // 清空 refresh token
         OAuth2RefreshToken refreshToken = accessToken.getRefreshToken();
         tokenStore.removeRefreshToken(refreshToken);
+        Map<String, ?> map = accessToken.getAdditionalInformation();
+        if (map.containsKey(SecurityConstants.DETAILS_USERNAME))
+        {
+            String username = (String) map.get(SecurityConstants.DETAILS_USERNAME);
+            // 记录用户退出日志
+            remoteLogService.saveLogininfor(username, Constants.LOGOUT, "退出成功");
+        }
         return R.ok();
     }
 }

+ 39 - 0
ruoyi-auth/src/main/java/com/ruoyi/auth/handler/AuthenticationSuccessEventHandler.java

@@ -0,0 +1,39 @@
+package com.ruoyi.auth.handler;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.ApplicationListener;
+import org.springframework.security.authentication.event.AuthenticationSuccessEvent;
+import org.springframework.security.core.Authentication;
+import org.springframework.stereotype.Component;
+import com.ruoyi.common.core.constant.Constants;
+import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.security.domain.LoginUser;
+import com.ruoyi.system.api.RemoteLogService;
+
+/**
+ * 认证成功处理
+ * 
+ * @author ruoyi
+ */
+@Component
+public class AuthenticationSuccessEventHandler implements ApplicationListener<AuthenticationSuccessEvent>
+{
+    @Autowired
+    private RemoteLogService remoteLogService;
+
+    @Override
+    public void onApplicationEvent(AuthenticationSuccessEvent event)
+    {
+        Authentication authentication = (Authentication) event.getSource();
+        if (StringUtils.isNotEmpty(authentication.getAuthorities())
+                && authentication.getPrincipal() instanceof LoginUser)
+        {
+            LoginUser user = (LoginUser) authentication.getPrincipal();
+
+            String username = user.getUsername();
+
+            // 记录用户登录日志
+            remoteLogService.saveLogininfor(username, Constants.LOGIN_SUCCESS, "登录成功");
+        }
+    }
+}

+ 1 - 1
ruoyi-common/pom.xml

@@ -4,7 +4,7 @@
     <parent>
         <groupId>com.ruoyi</groupId>
         <artifactId>ruoyi</artifactId>
-        <version>1.0.0</version>
+        <version>2.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

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

@@ -5,7 +5,7 @@
     <parent>
         <groupId>com.ruoyi</groupId>
         <artifactId>ruoyi-common</artifactId>
-        <version>1.0.0</version>
+        <version>2.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 5 - 0
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java

@@ -12,6 +12,11 @@ public class Constants
      */
     public static final String UTF8 = "UTF-8";
 
+    /**
+     * GBK 字符集
+     */
+    public static final String GBK = "GBK";
+
     /**
      * http请求
      */

+ 1 - 0
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/SecurityConstants.java

@@ -16,6 +16,7 @@ public class SecurityConstants
      * 授权token url
      */
     public static final String AUTH_TOKEN = "/oauth/token";
+
     /**
      * 注销token url
      */

+ 1 - 1
ruoyi-common/ruoyi-common-datascope/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <groupId>com.ruoyi</groupId>
         <artifactId>ruoyi-common</artifactId>
-        <version>1.0.0</version>
+        <version>2.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     

+ 1 - 7
ruoyi-common/ruoyi-common-log/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <groupId>com.ruoyi</groupId>
         <artifactId>ruoyi-common</artifactId>
-        <version>1.0.0</version>
+        <version>2.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     
@@ -23,11 +23,5 @@
             <artifactId>ruoyi-common-security</artifactId>
         </dependency>
         
-        <!-- Bitwalker -->
-        <dependency>
-            <groupId>eu.bitwalker</groupId>
-            <artifactId>UserAgentUtils</artifactId>
-        </dependency>
-        
     </dependencies>
 </project>

+ 1 - 1
ruoyi-common/ruoyi-common-redis/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <groupId>com.ruoyi</groupId>
         <artifactId>ruoyi-common</artifactId>
-        <version>1.0.0</version>
+        <version>2.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     

+ 0 - 2
ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/configure/RedisConfig.java

@@ -1,6 +1,5 @@
 package com.ruoyi.common.redis.configure;
 
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.cache.annotation.CachingConfigurerSupport;
 import org.springframework.cache.annotation.EnableCaching;
 import org.springframework.context.annotation.Bean;
@@ -22,7 +21,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 public class RedisConfig extends CachingConfigurerSupport
 {
     @Bean
-    @ConditionalOnMissingBean(name = "redisTemplate")
     @SuppressWarnings(value = { "unchecked", "rawtypes", "deprecation" })
     public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory connectionFactory)
     {

+ 1 - 1
ruoyi-common/ruoyi-common-security/pom.xml

@@ -4,7 +4,7 @@
     <parent>
         <groupId>com.ruoyi</groupId>
         <artifactId>ruoyi-common</artifactId>
-        <version>1.0.0</version>
+        <version>2.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     

+ 0 - 1
ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/config/SecurityImportBeanDefinitionRegistrar.java

@@ -20,6 +20,5 @@ public class SecurityImportBeanDefinitionRegistrar implements ImportBeanDefiniti
         String beanName = StringUtils.uncapitalize(aClass.getSimpleName());
         BeanDefinitionBuilder beanDefinitionBuilder = BeanDefinitionBuilder.genericBeanDefinition(ResourceServerConfig.class);
         registry.registerBeanDefinition(beanName, beanDefinitionBuilder.getBeanDefinition());
-
     }
 }

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

@@ -5,7 +5,7 @@
     <parent>
         <groupId>com.ruoyi</groupId>
         <artifactId>ruoyi-common</artifactId>
-        <version>1.0.0</version>
+        <version>2.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     

+ 33 - 15
ruoyi-gateway/pom.xml

@@ -4,54 +4,72 @@
     <parent>
         <groupId>com.ruoyi</groupId>
         <artifactId>ruoyi</artifactId>
-        <version>1.0.0</version>
+        <version>2.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
-    
+
     <artifactId>ruoyi-gateway</artifactId>
-	
+
     <description>
         ruoyi-gateway网关模块
     </description>
-	
+
     <dependencies>
-        
-        <!-- SpringCloud Gateway-->
+
+        <!-- SpringCloud Gateway -->
         <dependency>
             <groupId>org.springframework.cloud</groupId>
             <artifactId>spring-cloud-starter-gateway</artifactId>
         </dependency>
-        
+
         <!-- SpringCloud Ailibaba Nacos -->
         <dependency>
             <groupId>com.alibaba.cloud</groupId>
             <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
         </dependency>
-        
+
         <!-- SpringCloud Ailibaba Nacos Config -->
         <dependency>
             <groupId>com.alibaba.cloud</groupId>
             <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
         </dependency>
-        
+
+        <!-- SpringCloud Ailibaba Sentinel -->
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
+        </dependency>
+
+        <!-- SpringCloud Ailibaba Sentinel Gateway -->
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-alibaba-sentinel-gateway</artifactId>
+        </dependency>
+
+        <!-- Sentinel Datasource Nacos -->
+        <dependency>
+            <groupId>com.alibaba.csp</groupId>
+            <artifactId>sentinel-datasource-nacos</artifactId>
+        </dependency>
+
         <!-- SpringBoot Actuator -->
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-actuator</artifactId>
         </dependency>
-        
+
         <!--验证码 -->
         <dependency>
             <groupId>com.github.penggle</groupId>
             <artifactId>kaptcha</artifactId>
         </dependency>
-        
+
         <!-- RuoYi Common Redis-->
         <dependency>
             <groupId>com.ruoyi</groupId>
             <artifactId>ruoyi-common-redis</artifactId>
         </dependency>
-        
+
         <!-- Swagger -->
         <dependency>
             <groupId>io.springfox</groupId>
@@ -63,9 +81,9 @@
             <artifactId>springfox-swagger2</artifactId>
             <version>${swagger.fox.version}</version>
         </dependency>
-        
+
     </dependencies>
-   
+
     <build>
         <plugins>
             <plugin>
@@ -81,5 +99,5 @@
             </plugin>
         </plugins>
     </build>
-   
+
 </project>

+ 32 - 0
ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/GatewayConfig.java

@@ -0,0 +1,32 @@
+package com.ruoyi.gateway.config;
+
+import org.springframework.cloud.gateway.filter.GlobalFilter;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.Ordered;
+import org.springframework.core.annotation.Order;
+import com.alibaba.csp.sentinel.adapter.gateway.sc.SentinelGatewayFilter;
+import com.ruoyi.gateway.handler.SentinelFallbackHandler;
+
+/**
+ * 网关限流配置
+ * 
+ * @author ruoyi
+ */
+@Configuration
+public class GatewayConfig
+{
+    @Bean
+    @Order(Ordered.HIGHEST_PRECEDENCE)
+    public SentinelFallbackHandler sentinelGatewayExceptionHandler()
+    {
+        return new SentinelFallbackHandler();
+    }
+
+    @Bean
+    @Order(-1)
+    public GlobalFilter sentinelGatewayFilter()
+    {
+        return new SentinelGatewayFilter();
+    }
+}

+ 4 - 11
ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/RouterFunctionConfiguration.java

@@ -7,7 +7,6 @@ import org.springframework.http.MediaType;
 import org.springframework.web.reactive.function.server.RequestPredicates;
 import org.springframework.web.reactive.function.server.RouterFunction;
 import org.springframework.web.reactive.function.server.RouterFunctions;
-import com.ruoyi.gateway.handler.HystrixFallbackHandler;
 import com.ruoyi.gateway.handler.ValidateCodeHandler;
 
 /**
@@ -19,20 +18,14 @@ import com.ruoyi.gateway.handler.ValidateCodeHandler;
 public class RouterFunctionConfiguration
 {
     @Autowired
-    private HystrixFallbackHandler hystrixFallbackHandler;
-
-    @Autowired
-    private ValidateCodeHandler imageCodeHandler;
+    private ValidateCodeHandler validateCodeHandler;
 
     @SuppressWarnings("rawtypes")
     @Bean
     public RouterFunction routerFunction()
     {
-        return RouterFunctions
-                .route(RequestPredicates.path("/fallback").and(RequestPredicates.accept(MediaType.TEXT_PLAIN)),
-                        hystrixFallbackHandler)
-                .andRoute(RequestPredicates.GET("/code").and(RequestPredicates.accept(MediaType.TEXT_PLAIN)),
-                        imageCodeHandler);
+        return RouterFunctions.route(
+                RequestPredicates.GET("/code").and(RequestPredicates.accept(MediaType.TEXT_PLAIN)),
+                validateCodeHandler);
     }
-
 }

+ 0 - 36
ruoyi-gateway/src/main/java/com/ruoyi/gateway/handler/HystrixFallbackHandler.java

@@ -1,36 +0,0 @@
-package com.ruoyi.gateway.handler;
-
-import com.alibaba.fastjson.JSON;
-import com.ruoyi.common.core.domain.R;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.stereotype.Component;
-import org.springframework.web.reactive.function.BodyInserters;
-import org.springframework.web.reactive.function.server.HandlerFunction;
-import org.springframework.web.reactive.function.server.ServerRequest;
-import org.springframework.web.reactive.function.server.ServerResponse;
-import reactor.core.publisher.Mono;
-import java.util.Optional;
-import static org.springframework.cloud.gateway.support.ServerWebExchangeUtils.GATEWAY_ORIGINAL_REQUEST_URL_ATTR;
-
-/**
- * 熔断降级处理
- * 
- * @author ruoyi
- */
-@Component
-public class HystrixFallbackHandler implements HandlerFunction<ServerResponse>
-{
-    private static final Logger log = LoggerFactory.getLogger(HystrixFallbackHandler.class);
-    
-    @Override
-    public Mono<ServerResponse> handle(ServerRequest serverRequest)
-    {
-        Optional<Object> originalUris = serverRequest.attribute(GATEWAY_ORIGINAL_REQUEST_URL_ATTR);
-        originalUris.ifPresent(originalUri -> log.error("网关执行请求:{}失败,hystrix服务降级处理", originalUri));
-        return ServerResponse.status(HttpStatus.INTERNAL_SERVER_ERROR.value()).contentType(MediaType.APPLICATION_JSON)
-                .body(BodyInserters.fromValue(JSON.toJSONString(R.failed("服务已被降级熔断"))));
-    }
-}

+ 47 - 0
ruoyi-gateway/src/main/java/com/ruoyi/gateway/handler/SentinelFallbackHandler.java

@@ -0,0 +1,47 @@
+package com.ruoyi.gateway.handler;
+
+import java.nio.charset.StandardCharsets;
+import com.alibaba.csp.sentinel.adapter.gateway.sc.callback.GatewayCallbackManager;
+import com.alibaba.csp.sentinel.slots.block.BlockException;
+import org.springframework.core.io.buffer.DataBuffer;
+import org.springframework.http.server.reactive.ServerHttpResponse;
+import org.springframework.web.reactive.function.server.ServerResponse;
+import org.springframework.web.server.ServerWebExchange;
+import org.springframework.web.server.WebExceptionHandler;
+import reactor.core.publisher.Mono;
+
+/**
+ * 自定义限流异常处理
+ * 
+ * @author ruoyi
+ */
+public class SentinelFallbackHandler implements WebExceptionHandler
+{
+    private Mono<Void> writeResponse(ServerResponse response, ServerWebExchange exchange)
+    {
+        ServerHttpResponse serverHttpResponse = exchange.getResponse();
+        serverHttpResponse.getHeaders().add("Content-Type", "application/json;charset=UTF-8");
+        byte[] datas = "{\"status\":429,\"message\":\"请求超过最大数,请稍后再试\"}".getBytes(StandardCharsets.UTF_8);
+        DataBuffer buffer = serverHttpResponse.bufferFactory().wrap(datas);
+        return serverHttpResponse.writeWith(Mono.just(buffer));
+    }
+
+    @Override
+    public Mono<Void> handle(ServerWebExchange exchange, Throwable ex)
+    {
+        if (exchange.getResponse().isCommitted())
+        {
+            return Mono.error(ex);
+        }
+        if (!BlockException.isBlockException(ex))
+        {
+            return Mono.error(ex);
+        }
+        return handleBlockedRequest(exchange, ex).flatMap(response -> writeResponse(response, exchange));
+    }
+
+    private Mono<ServerResponse> handleBlockedRequest(ServerWebExchange exchange, Throwable throwable)
+    {
+        return GatewayCallbackManager.getBlockHandler().handleRequest(exchange, throwable);
+    }
+}

+ 0 - 3
ruoyi-gateway/src/main/java/com/ruoyi/gateway/service/impl/ValidateCodeServiceImpl.java

@@ -3,13 +3,10 @@ package com.ruoyi.gateway.service.impl;
 import java.awt.image.BufferedImage;
 import java.io.IOException;
 import java.util.concurrent.TimeUnit;
-
 import javax.imageio.ImageIO;
-
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.FastByteArrayOutputStream;
-
 import com.google.code.kaptcha.Producer;
 import com.ruoyi.common.core.constant.Constants;
 import com.ruoyi.common.core.exception.CaptchaException;

+ 17 - 0
ruoyi-gateway/src/main/resources/bootstrap.yml

@@ -10,6 +10,8 @@ spring:
   profiles:
     # 环境配置
     active: dev
+  main:
+    allow-bean-definition-overriding: true
   cloud:
     nacos:
       discovery:
@@ -22,3 +24,18 @@ spring:
         file-extension: yml
         # 共享配置
         shared-dataids: 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

+ 1 - 1
ruoyi-modules/pom.xml

@@ -4,7 +4,7 @@
     <parent>
         <groupId>com.ruoyi</groupId>
         <artifactId>ruoyi</artifactId>
-        <version>1.0.0</version>
+        <version>2.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 4 - 4
ruoyi-modules/ruoyi-gen/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <groupId>com.ruoyi</groupId>
         <artifactId>ruoyi-modules</artifactId>
-        <version>1.0.0</version>
+        <version>2.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -29,10 +29,10 @@
             <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
         </dependency>
         
-        <!-- SpringCloud Netflix Hystrix -->
+        <!-- SpringCloud Ailibaba Sentinel -->
         <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
         </dependency>
         
         <!-- SpringBoot Web -->

+ 1 - 1
ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityUtils.java

@@ -22,7 +22,7 @@ public class VelocityUtils
     private static final String PROJECT_PATH = "main/java";
 
     /** mybatis空间路径 */
-    private static final String MYBATIS_PATH = "main/resources/mybatis";
+    private static final String MYBATIS_PATH = "main/resources/mapper";
 
     /**
      * 设置模板变量信息

+ 11 - 9
ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/controller.java.vm

@@ -1,6 +1,8 @@
 package ${packageName}.controller;
 
 import java.util.List;
+import java.io.IOException;
+import javax.servlet.http.HttpServletResponse;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -11,15 +13,15 @@ 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.framework.aspectj.lang.annotation.Log;
-import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
 import ${packageName}.domain.${ClassName};
 import ${packageName}.service.I${ClassName}Service;
-import com.ruoyi.framework.web.controller.BaseController;
-import com.ruoyi.framework.web.domain.AjaxResult;
-import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.core.utils.poi.ExcelUtil;
 #if($table.crud)
-import com.ruoyi.framework.web.page.TableDataInfo;
+import com.ruoyi.common.core.web.page.TableDataInfo;
 #elseif($table.tree)
 #end
 
@@ -30,7 +32,7 @@ import com.ruoyi.framework.web.page.TableDataInfo;
  * @date ${datetime}
  */
 @RestController
-@RequestMapping("/${moduleName}/${businessName}")
+@RequestMapping("/${businessName}")
 public class ${ClassName}Controller extends BaseController
 {
     @Autowired
@@ -62,11 +64,11 @@ public class ${ClassName}Controller extends BaseController
     @PreAuthorize("@ss.hasPermi('${permissionPrefix}:export')")
     @Log(title = "${functionName}", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
-    public AjaxResult export(${ClassName} ${className})
+    public void export(HttpServletResponse response, ${ClassName} ${className}) throws IOException
     {
         List<${ClassName}> list = ${className}Service.select${ClassName}List(${className});
         ExcelUtil<${ClassName}> util = new ExcelUtil<${ClassName}>(${ClassName}.class);
-        return util.exportExcel(list, "${businessName}");
+        return util.exportExcel(response, list, "${businessName}");
     }
 
     /**

+ 0 - 9
ruoyi-modules/ruoyi-gen/src/main/resources/vm/js/api.js.vm

@@ -42,12 +42,3 @@ export function del${BusinessName}(${pkColumn.javaField}) {
     method: 'delete'
   })
 }
-
-// 导出${functionName}
-export function export${BusinessName}(query) {
-  return request({
-    url: '/${moduleName}/${businessName}/export',
-    method: 'get',
-    params: query
-  })
-}

+ 4 - 11
ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm

@@ -229,7 +229,7 @@
 </template>
 
 <script>
-import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName}, export${BusinessName} } from "@/api/${moduleName}/${businessName}";
+import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
 
 export default {
   name: "${BusinessName}",
@@ -422,16 +422,9 @@ export default {
     },
     /** 导出按钮操作 */
     handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有${functionName}数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return export${BusinessName}(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-        }).catch(function() {});
+      this.download('${moduleName}/${businessName}/export', {
+        ...this.queryParams
+      }, `${moduleName}_${businessName}.xlsx`)
     }
   }
 };

+ 4 - 4
ruoyi-modules/ruoyi-job/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <groupId>com.ruoyi</groupId>
         <artifactId>ruoyi-modules</artifactId>
-        <version>1.0.0</version>
+        <version>2.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -29,10 +29,10 @@
             <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
         </dependency>
         
-        <!-- SpringCloud Netflix Hystrix -->
+        <!-- SpringCloud Ailibaba Sentinel -->
         <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
         </dependency>
         
         <!-- SpringBoot Web -->

+ 4 - 4
ruoyi-modules/ruoyi-system/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <groupId>com.ruoyi</groupId>
         <artifactId>ruoyi-modules</artifactId>
-        <version>1.0.0</version>
+        <version>2.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 	
@@ -29,10 +29,10 @@
             <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
         </dependency>
         
-    	<!-- SpringCloud Netflix Hystrix -->
+    	<!-- SpringCloud Ailibaba Sentinel -->
         <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
         </dependency>
         
     	<!-- SpringBoot Web -->

+ 94 - 0
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysClientDetailsController.java

@@ -0,0 +1,94 @@
+package com.ruoyi.system.controller;
+
+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.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.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.system.domain.SysClientDetails;
+import com.ruoyi.system.service.ISysClientDetailsService;
+
+/**
+ * 终端配置 信息操作处理
+ * 
+ * @author ruoyi
+ */
+@RestController
+@RequestMapping("/client")
+public class SysClientDetailsController extends BaseController
+{
+    @Autowired
+    private ISysClientDetailsService sysClientDetailsService;
+
+    /**
+     * 查询终端配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:client:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysClientDetails sysClientDetails)
+    {
+        startPage();
+        List<SysClientDetails> list = sysClientDetailsService.selectSysClientDetailsList(sysClientDetails);
+        return getDataTable(list);
+    }
+
+    /**
+     * 获取终端配置详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:client:query')")
+    @GetMapping(value = "/{clientId}")
+    public AjaxResult getInfo(@PathVariable("clientId") String clientId)
+    {
+        return AjaxResult.success(sysClientDetailsService.selectSysClientDetailsById(clientId));
+    }
+
+    /**
+     * 新增终端配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:client:add')")
+    @Log(title = "终端配置", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody SysClientDetails sysClientDetails)
+    {
+        String clientId = sysClientDetails.getClientId();
+        if (StringUtils.isNotNull(sysClientDetailsService.selectSysClientDetailsById(clientId)))
+        {
+            return AjaxResult.error("新增终端'" + clientId + "'失败,编号已存在");
+        }
+        return toAjax(sysClientDetailsService.insertSysClientDetails(sysClientDetails));
+    }
+
+    /**
+     * 修改终端配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:client:edit')")
+    @Log(title = "终端配置", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody SysClientDetails sysClientDetails)
+    {
+        return toAjax(sysClientDetailsService.updateSysClientDetails(sysClientDetails));
+    }
+
+    /**
+     * 删除终端配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:client:remove')")
+    @Log(title = "终端配置", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{clientIds}")
+    public AjaxResult remove(@PathVariable String[] clientIds)
+    {
+        return toAjax(sysClientDetailsService.deleteSysClientDetailsByIds(clientIds));
+    }
+}

+ 28 - 1
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysLogininforController.java

@@ -10,7 +10,11 @@ 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.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.core.constant.Constants;
+import com.ruoyi.common.core.utils.ServletUtils;
+import com.ruoyi.common.core.utils.ip.IpUtils;
 import com.ruoyi.common.core.utils.poi.ExcelUtil;
 import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.domain.AjaxResult;
@@ -40,7 +44,7 @@ public class SysLogininforController extends BaseController
         List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
         return getDataTable(list);
     }
-    
+
     @Log(title = "登陆日志", businessType = BusinessType.EXPORT)
     @PreAuthorize("@ss.hasPermi('system:logininfor:export')")
     @PostMapping("/export")
@@ -67,4 +71,27 @@ public class SysLogininforController extends BaseController
         logininforService.cleanLogininfor();
         return AjaxResult.success();
     }
+
+    @PostMapping
+    public AjaxResult add(@RequestParam("username") String username, @RequestParam("status") String status,
+            @RequestParam("message") String message)
+    {
+        String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
+
+        // 封装对象
+        SysLogininfor logininfor = new SysLogininfor();
+        logininfor.setUserName(username);
+        logininfor.setIpaddr(ip);
+        logininfor.setMsg(message);
+        // 日志状态
+        if (Constants.LOGIN_SUCCESS.equals(status) || Constants.LOGOUT.equals(status))
+        {
+            logininfor.setStatus("0");
+        }
+        else if (Constants.LOGIN_FAIL.equals(status))
+        {
+            logininfor.setStatus("1");
+        }
+        return toAjax(logininforService.insertLogininfor(logininfor));
+    }
 }

+ 197 - 0
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysClientDetails.java

@@ -0,0 +1,197 @@
+package com.ruoyi.system.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.core.web.domain.BaseEntity;
+
+/**
+ * 终端配置表 sys_oauth_client_details
+ *
+ * @author ruoyi
+ */
+public class SysClientDetails extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 终端编号
+     */
+    private String clientId;
+
+    /**
+     * 资源ID标识
+     */
+    private String resourceIds;
+
+    /**
+     * 终端安全码
+     */
+    private String clientSecret;
+
+    /**
+     * 终端授权范围
+     */
+    private String scope;
+
+    /**
+     * 终端授权类型
+     */
+    private String authorizedGrantTypes;
+
+    /**
+     * 服务器回调地址
+     */
+    private String webServerRedirectUri;
+
+    /**
+     * 访问资源所需权限
+     */
+    private String authorities;
+
+    /**
+     * 设定终端的access_token的有效时间值(秒)
+     */
+    private Integer accessTokenValidity;
+
+    /**
+     * 设定终端的refresh_token的有效时间值(秒)
+     */
+    private Integer refreshTokenValidity;
+
+    /**
+     * 附加信息
+     */
+    private String additionalInformation;
+
+    /**
+     * 是否登录时跳过授权
+     */
+    private String autoapprove;
+
+    public String getClientId()
+    {
+        return clientId;
+    }
+
+    public void setClientId(String clientId)
+    {
+        this.clientId = clientId;
+    }
+
+    public String getResourceIds()
+    {
+        return resourceIds;
+    }
+
+    public void setResourceIds(String resourceIds)
+    {
+        this.resourceIds = resourceIds;
+    }
+
+    public String getClientSecret()
+    {
+        return clientSecret;
+    }
+
+    public void setClientSecret(String clientSecret)
+    {
+        this.clientSecret = clientSecret;
+    }
+
+    public String getScope()
+    {
+        return scope;
+    }
+
+    public void setScope(String scope)
+    {
+        this.scope = scope;
+    }
+
+    public String getAuthorizedGrantTypes()
+    {
+        return authorizedGrantTypes;
+    }
+
+    public void setAuthorizedGrantTypes(String authorizedGrantTypes)
+    {
+        this.authorizedGrantTypes = authorizedGrantTypes;
+    }
+
+    public String getWebServerRedirectUri()
+    {
+        return webServerRedirectUri;
+    }
+
+    public void setWebServerRedirectUri(String webServerRedirectUri)
+    {
+        this.webServerRedirectUri = webServerRedirectUri;
+    }
+
+    public String getAuthorities()
+    {
+        return authorities;
+    }
+
+    public void setAuthorities(String authorities)
+    {
+        this.authorities = authorities;
+    }
+
+    public Integer getAccessTokenValidity()
+    {
+        return accessTokenValidity;
+    }
+
+    public void setAccessTokenValidity(Integer accessTokenValidity)
+    {
+        this.accessTokenValidity = accessTokenValidity;
+    }
+
+    public Integer getRefreshTokenValidity()
+    {
+        return refreshTokenValidity;
+    }
+
+    public void setRefreshTokenValidity(Integer refreshTokenValidity)
+    {
+        this.refreshTokenValidity = refreshTokenValidity;
+    }
+
+    public String getAdditionalInformation()
+    {
+        return additionalInformation;
+    }
+
+    public void setAdditionalInformation(String additionalInformation)
+    {
+        this.additionalInformation = additionalInformation;
+    }
+
+    public String getAutoapprove()
+    {
+        return autoapprove;
+    }
+
+    public void setAutoapprove(String autoapprove)
+    {
+        this.autoapprove = autoapprove;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("clientId", getClientId())
+            .append("resourceIds", getResourceIds())
+            .append("clientSecret", getClientSecret())
+            .append("scope", getScope())
+            .append("authorizedGrantTypes", getAuthorizedGrantTypes())
+            .append("webServerRedirectUri", getWebServerRedirectUri())
+            .append("authorities", getAuthorities())
+            .append("accessTokenValidity", getAccessTokenValidity())
+            .append("refreshTokenValidity", getRefreshTokenValidity())
+            .append("additionalInformation", getAdditionalInformation())
+            .append("autoapprove", getAutoapprove())
+            .toString();
+    }
+}

+ 11 - 53
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysLogininfor.java

@@ -23,34 +23,22 @@ public class SysLogininfor extends BaseEntity
     @Excel(name = "用户账号")
     private String userName;
 
-    /** 登录状态 0成功 1失败 */
-    @Excel(name = "登录状态", readConverterExp = "0=成功,1=失败")
+    /** 状态 0成功 1失败 */
+    @Excel(name = "状态", readConverterExp = "0=成功,1=失败")
     private String status;
 
-    /** 登录IP地址 */
-    @Excel(name = "登录地址")
+    /** 地址 */
+    @Excel(name = "地址")
     private String ipaddr;
 
-    /** 登录地点 */
-    @Excel(name = "登录地点")
-    private String loginLocation;
-
-    /** 浏览器类型 */
-    @Excel(name = "浏览器")
-    private String browser;
-
-    /** 操作系统 */
-    @Excel(name = "操作系统")
-    private String os;
-
-    /** 提示消息 */
-    @Excel(name = "提示消息")
+    /** 描述 */
+    @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 loginTime;
+    private Date accessTime;
 
     public Long getInfoId()
     {
@@ -92,36 +80,6 @@ public class SysLogininfor extends BaseEntity
         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 String getMsg()
     {
         return msg;
@@ -132,13 +90,13 @@ public class SysLogininfor extends BaseEntity
         this.msg = msg;
     }
 
-    public Date getLoginTime()
+    public Date getAccessTime()
     {
-        return loginTime;
+        return accessTime;
     }
 
-    public void setLoginTime(Date loginTime)
+    public void setAccessTime(Date accessTime)
     {
-        this.loginTime = loginTime;
+        this.accessTime = accessTime;
     }
 }

+ 60 - 0
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysClientDetailsMapper.java

@@ -0,0 +1,60 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.SysClientDetails;
+
+/**
+ * 终端配置Mapper接口
+ * 
+ * @author ruoyi
+ */
+public interface SysClientDetailsMapper
+{
+    /**
+     * 查询终端配置
+     * 
+     * @param clientId 终端配置ID
+     * @return 终端配置
+     */
+    public SysClientDetails selectSysClientDetailsById(String clientId);
+
+    /**
+     * 查询终端配置列表
+     * 
+     * @param sysClientDetails 终端配置
+     * @return 终端配置集合
+     */
+    public List<SysClientDetails> selectSysClientDetailsList(SysClientDetails sysClientDetails);
+
+    /**
+     * 新增终端配置
+     * 
+     * @param sysClientDetails 终端配置
+     * @return 结果
+     */
+    public int insertSysClientDetails(SysClientDetails sysClientDetails);
+
+    /**
+     * 修改终端配置
+     * 
+     * @param sysClientDetails 终端配置
+     * @return 结果
+     */
+    public int updateSysClientDetails(SysClientDetails sysClientDetails);
+
+    /**
+     * 删除终端配置
+     * 
+     * @param clientId 终端配置ID
+     * @return 结果
+     */
+    public int deleteSysClientDetailsById(String clientId);
+
+    /**
+     * 批量删除终端配置
+     * 
+     * @param clientIds 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteSysClientDetailsByIds(String[] clientIds);
+}

+ 1 - 1
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java

@@ -15,7 +15,7 @@ public interface SysLogininforMapper
      * 
      * @param logininfor 访问日志对象
      */
-    public void insertLogininfor(SysLogininfor logininfor);
+    public int insertLogininfor(SysLogininfor logininfor);
 
     /**
      * 查询系统登录日志集合

+ 60 - 0
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysClientDetailsService.java

@@ -0,0 +1,60 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.SysClientDetails;
+
+/**
+ * 终端配置Service接口
+ * 
+ * @author ruoyi
+ */
+public interface ISysClientDetailsService
+{
+    /**
+     * 查询终端配置
+     * 
+     * @param clientId 终端配置ID
+     * @return 终端配置
+     */
+    public SysClientDetails selectSysClientDetailsById(String clientId);
+
+    /**
+     * 查询终端配置列表
+     * 
+     * @param sysClientDetails 终端配置
+     * @return 终端配置集合
+     */
+    public List<SysClientDetails> selectSysClientDetailsList(SysClientDetails sysClientDetails);
+
+    /**
+     * 新增终端配置
+     * 
+     * @param sysClientDetails 终端配置
+     * @return 结果
+     */
+    public int insertSysClientDetails(SysClientDetails sysClientDetails);
+
+    /**
+     * 修改终端配置
+     * 
+     * @param sysClientDetails 终端配置
+     * @return 结果
+     */
+    public int updateSysClientDetails(SysClientDetails sysClientDetails);
+
+    /**
+     * 批量删除终端配置
+     * 
+     * @param clientIds 需要删除的终端配置ID
+     * @return 结果
+     */
+    public int deleteSysClientDetailsByIds(String[] clientIds);
+
+    /**
+     * 删除终端配置信息
+     * 
+     * @param clientId 终端配置ID
+     * @return 结果
+     */
+    public int deleteSysClientDetailsById(String clientId);
+}

+ 1 - 1
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysLogininforService.java

@@ -15,7 +15,7 @@ public interface ISysLogininforService
      * 
      * @param logininfor 访问日志对象
      */
-    public void insertLogininfor(SysLogininfor logininfor);
+    public int insertLogininfor(SysLogininfor logininfor);
 
     /**
      * 查询系统登录日志集合

+ 92 - 0
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysClientDetailsServiceImpl.java

@@ -0,0 +1,92 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.SysClientDetailsMapper;
+import com.ruoyi.system.domain.SysClientDetails;
+import com.ruoyi.system.service.ISysClientDetailsService;
+
+/**
+ * 终端配置Service业务层处理
+ * 
+ * @author ruoyi
+ */
+@Service
+public class SysClientDetailsServiceImpl implements ISysClientDetailsService
+{
+    @Autowired
+    private SysClientDetailsMapper sysClientDetailsMapper;
+
+    /**
+     * 查询终端配置
+     * 
+     * @param clientId 终端配置ID
+     * @return 终端配置
+     */
+    @Override
+    public SysClientDetails selectSysClientDetailsById(String clientId)
+    {
+        return sysClientDetailsMapper.selectSysClientDetailsById(clientId);
+    }
+
+    /**
+     * 查询终端配置列表
+     * 
+     * @param sysClientDetails 终端配置
+     * @return 终端配置
+     */
+    @Override
+    public List<SysClientDetails> selectSysClientDetailsList(SysClientDetails sysClientDetails)
+    {
+        return sysClientDetailsMapper.selectSysClientDetailsList(sysClientDetails);
+    }
+
+    /**
+     * 新增终端配置
+     * 
+     * @param sysClientDetails 终端配置
+     * @return 结果
+     */
+    @Override
+    public int insertSysClientDetails(SysClientDetails sysClientDetails)
+    {
+        return sysClientDetailsMapper.insertSysClientDetails(sysClientDetails);
+    }
+
+    /**
+     * 修改终端配置
+     * 
+     * @param sysClientDetails 终端配置
+     * @return 结果
+     */
+    @Override
+    public int updateSysClientDetails(SysClientDetails sysClientDetails)
+    {
+        return sysClientDetailsMapper.updateSysClientDetails(sysClientDetails);
+    }
+
+    /**
+     * 批量删除终端配置
+     * 
+     * @param clientIds 需要删除的终端配置ID
+     * @return 结果
+     */
+    @Override
+    public int deleteSysClientDetailsByIds(String[] clientIds)
+    {
+        return sysClientDetailsMapper.deleteSysClientDetailsByIds(clientIds);
+    }
+
+    /**
+     * 删除终端配置信息
+     * 
+     * @param clientId 终端配置ID
+     * @return 结果
+     */
+    @Override
+    public int deleteSysClientDetailsById(String clientId)
+    {
+        return sysClientDetailsMapper.deleteSysClientDetailsById(clientId);
+    }
+}

+ 2 - 2
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java

@@ -25,9 +25,9 @@ public class SysLogininforServiceImpl implements ISysLogininforService
      * @param logininfor 访问日志对象
      */
     @Override
-    public void insertLogininfor(SysLogininfor logininfor)
+    public int insertLogininfor(SysLogininfor logininfor)
     {
-        logininforMapper.insertLogininfor(logininfor);
+        return logininforMapper.insertLogininfor(logininfor);
     }
 
     /**

+ 95 - 0
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysClientDetailsMapper.xml

@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.SysClientDetailsMapper">
+    
+    <resultMap type="SysClientDetails" id="SysClientDetailsResult">
+        <result property="clientId"               column="client_id"                />
+        <result property="resourceIds"            column="resource_ids"             />
+        <result property="clientSecret"           column="client_secret"            />
+        <result property="scope"                  column="scope"                    />
+        <result property="authorizedGrantTypes"   column="authorized_grant_types"   />
+        <result property="webServerRedirectUri"   column="web_server_redirect_uri"  />
+        <result property="authorities"            column="authorities"              />
+        <result property="accessTokenValidity"    column="access_token_validity"    />
+        <result property="refreshTokenValidity"   column="refresh_token_validity"   />
+        <result property="additionalInformation"  column="additional_information"   />
+        <result property="autoapprove"            column="autoapprove"              />
+    </resultMap>
+
+    <sql id="selectSysClientDetailsVo">
+        select client_id, resource_ids, client_secret, scope, authorized_grant_types, web_server_redirect_uri, authorities, access_token_validity, refresh_token_validity, additional_information, autoapprove from sys_oauth_client_details
+    </sql>
+
+    <select id="selectSysClientDetailsList" parameterType="SysClientDetails" resultMap="SysClientDetailsResult">
+        <include refid="selectSysClientDetailsVo"/>
+        <where>  
+            <if test="clientId != null  and clientId != ''"> and client_id = #{clientId}</if>
+        </where>
+    </select>
+    
+    <select id="selectSysClientDetailsById" parameterType="String" resultMap="SysClientDetailsResult">
+        <include refid="selectSysClientDetailsVo"/>
+        where client_id = #{clientId}
+    </select>
+        
+    <insert id="insertSysClientDetails" parameterType="SysClientDetails">
+        insert into sys_oauth_client_details
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="clientId != null">client_id,</if>
+            <if test="resourceIds != null">resource_ids,</if>
+            <if test="clientSecret != null">client_secret,</if>
+            <if test="scope != null">scope,</if>
+            <if test="authorizedGrantTypes != null">authorized_grant_types,</if>
+            <if test="webServerRedirectUri != null">web_server_redirect_uri,</if>
+            <if test="authorities != null">authorities,</if>
+            <if test="accessTokenValidity != null">access_token_validity,</if>
+            <if test="refreshTokenValidity != null">refresh_token_validity,</if>
+            <if test="additionalInformation != null">additional_information,</if>
+            <if test="autoapprove != null">autoapprove,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="clientId != null">#{clientId},</if>
+            <if test="resourceIds != null">#{resourceIds},</if>
+            <if test="clientSecret != null">#{clientSecret},</if>
+            <if test="scope != null">#{scope},</if>
+            <if test="authorizedGrantTypes != null">#{authorizedGrantTypes},</if>
+            <if test="webServerRedirectUri != null">#{webServerRedirectUri},</if>
+            <if test="authorities != null">#{authorities},</if>
+            <if test="accessTokenValidity != null">#{accessTokenValidity},</if>
+            <if test="refreshTokenValidity != null">#{refreshTokenValidity},</if>
+            <if test="additionalInformation != null">#{additionalInformation},</if>
+            <if test="autoapprove != null ">#{autoapprove},</if>
+         </trim>
+    </insert>
+
+    <update id="updateSysClientDetails" parameterType="SysClientDetails">
+        update sys_oauth_client_details
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="resourceIds != null">resource_ids = #{resourceIds},</if>
+            <if test="clientSecret != null">client_secret = #{clientSecret},</if>
+            <if test="scope != null">scope = #{scope},</if>
+            <if test="authorizedGrantTypes != null">authorized_grant_types = #{authorizedGrantTypes},</if>
+            <if test="webServerRedirectUri != null">web_server_redirect_uri = #{webServerRedirectUri},</if>
+            <if test="authorities != null">authorities = #{authorities},</if>
+            <if test="accessTokenValidity != null">access_token_validity = #{accessTokenValidity},</if>
+            <if test="refreshTokenValidity != null">refresh_token_validity = #{refreshTokenValidity},</if>
+            <if test="additionalInformation != null">additional_information = #{additionalInformation},</if>
+            <if test="autoapprove != null">autoapprove = #{autoapprove},</if>
+        </trim>
+        where client_id = #{clientId}
+    </update>
+
+    <delete id="deleteSysClientDetailsById" parameterType="String">
+        delete from sys_oauth_client_details where client_id = #{clientId}
+    </delete>
+
+    <delete id="deleteSysClientDetailsByIds" parameterType="String">
+        delete from sys_oauth_client_details where client_id in 
+        <foreach item="clientId" collection="array" open="(" separator="," close=")">
+            #{clientId}
+        </foreach>
+    </delete>
+    
+</mapper>

+ 6 - 9
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml

@@ -9,20 +9,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<result property="userName"      column="user_name"         />
 		<result property="status"        column="status"            />
 		<result property="ipaddr"        column="ipaddr"            />
-		<result property="loginLocation" column="login_location"    />
-		<result property="browser"       column="browser"           />
-		<result property="os"            column="os"                />
 		<result property="msg"           column="msg"               />
-		<result property="loginTime"     column="login_time"        />
+		<result property="accessTime"    column="access_time"       />
 	</resultMap>
 
 	<insert id="insertLogininfor" parameterType="SysLogininfor">
-		insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time)
-		values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate())
+		insert into sys_logininfor (user_name, status, ipaddr, msg, access_time)
+		values (#{userName}, #{status}, #{ipaddr}, #{msg}, sysdate())
 	</insert>
 	
 	<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
-		select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from sys_logininfor
+		select info_id, user_name, ipaddr, status, msg, access_time from sys_logininfor
 		<where>
 			<if test="ipaddr != null and ipaddr != ''">
 				AND ipaddr like concat('%', #{ipaddr}, '%')
@@ -34,10 +31,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 				AND user_name like concat('%', #{userName}, '%')
 			</if>
 			<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
-				and date_format(login_time,'%y%m%d') &gt;= date_format(#{beginTime},'%y%m%d')
+				and date_format(access_time,'%y%m%d') &gt;= date_format(#{beginTime},'%y%m%d')
 			</if>
 			<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
-				and date_format(login_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
+				and date_format(access_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
 			</if>
 		</where>
 		order by info_id desc

+ 3 - 4
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml

@@ -15,7 +15,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<result property="deptName"       column="dept_name"      />
 		<result property="operUrl"        column="oper_url"       />
 		<result property="operIp"         column="oper_ip"        />
-		<result property="operLocation"   column="oper_location"  />
 		<result property="operParam"      column="oper_param"     />
 		<result property="jsonResult"     column="json_result"    />
 		<result property="status"         column="status"         />
@@ -24,13 +23,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</resultMap>
 
 	<sql id="selectOperLogVo">
-        select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time
+        select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_param, json_result, status, error_msg, oper_time
         from sys_oper_log
     </sql>
     
 	<insert id="insertOperlog" parameterType="SysOperLog">
-		insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time)
-        values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, sysdate())
+		insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_param, json_result, status, error_msg, oper_time)
+        values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, sysdate())
 	</insert>
 	
 	<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">

+ 44 - 0
ruoyi-ui/src/api/system/client.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询终端配置列表
+export function listClient(query) {
+  return request({
+    url: '/system/client/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询终端配置详细
+export function getClient(clientId) {
+  return request({
+    url: '/system/client/' + clientId,
+    method: 'get'
+  })
+}
+
+// 新增终端配置
+export function addClient(data) {
+  return request({
+    url: '/system/client',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改终端配置
+export function updateClient(data) {
+  return request({
+    url: '/system/client',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除终端配置
+export function delClient(clientId) {
+  return request({
+    url: '/system/client/' + clientId,
+    method: 'delete'
+  })
+}

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
ruoyi-ui/src/assets/icons/svg/client.svg


+ 1 - 0
ruoyi-ui/src/assets/icons/svg/nacos.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1591690694719" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="717" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#F4F5F9" p-id="718"></path><path d="M695.04 258.2784H328.96a35.9296 35.9296 0 0 0-36.0448 36.0448v435.6352a35.9296 35.9296 0 0 0 36.0448 36.0448h366.08a35.9296 35.9296 0 0 0 36.0448-36.0448V294.3232a35.9296 35.9296 0 0 0-36.0448-36.0448z m-187.5456 39.424v183.6032L461.312 452.864a17.472 17.472 0 0 0-9.0112-2.5344c-3.0976 0-6.1952 0.8448-9.0112 2.5344l-45.6192 28.4416V297.7024h109.824z m-178.5344-5.632h34.9184v219.648c0 6.1952 3.3792 11.8272 8.7296 14.6432 5.3504 3.0976 11.8272 2.816 17.1776-0.2816l62.7968-38.8608 62.7968 38.8608c2.816 1.6896 5.9136 2.5344 9.0112 2.5344 2.816 0 5.632-0.8448 8.1664-2.2528 5.3504-3.0976 8.7296-8.7296 8.7296-14.6432v-219.648H695.04a2.432 2.432 0 0 1 2.2528 2.2528v351.7184H326.7072V294.3232c0-1.408 1.1264-2.2528 2.2528-2.2528z m366.08 439.8592H328.96a2.432 2.432 0 0 1-2.2528-2.2528V679.552h370.5856v50.1248c0 1.408-1.1264 2.2528-2.2528 2.2528z" fill="#3A7FF6" p-id="719"></path><path d="M378.3552 317.7344v-9.6768 423.872h318.9376V317.7344z" fill="#3A7FF6" fill-opacity=".15" p-id="720"></path></svg>

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
ruoyi-ui/src/assets/icons/svg/sentinel.svg


+ 271 - 0
ruoyi-ui/src/views/system/client/index.vue

@@ -0,0 +1,271 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
+      <el-form-item label="终端编号" prop="clientId">
+        <el-input
+          v-model="queryParams.clientId"
+          placeholder="终端编号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['system:client:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['system:client:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['system:client:remove']"
+        >删除</el-button>
+      </el-col>
+    </el-row>
+
+    <el-table v-loading="loading" :data="clientList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="编号" align="center" prop="clientId" />
+      <el-table-column label="安全码" align="center" prop="clientSecret" :show-overflow-tooltip="true" />
+      <el-table-column label="授权范围" align="center" prop="scope" />
+      <el-table-column label="授权类型" align="center" prop="authorizedGrantTypes" :show-overflow-tooltip="true" />
+      <el-table-column label="令牌时效" align="center" prop="accessTokenValidity" />
+      <el-table-column label="刷新时效" align="center" prop="refreshTokenValidity" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['system:client:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['system:client:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改终端对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="编号" prop="clientId">
+          <el-input v-model="form.clientId" placeholder="请输入编号" :disabled="!isAdd" />
+        </el-form-item>
+        <el-form-item label="安全码" prop="clientSecret">
+          <el-input v-model="form.clientSecret" placeholder="请输入安全码" />
+        </el-form-item>
+        <el-form-item label="授权范围" prop="scope">
+          <el-input v-model="form.scope" placeholder="请输入授权范围" />
+        </el-form-item>
+        <el-form-item label="授权类型" prop="authorizedGrantTypes">
+          <el-input v-model="form.authorizedGrantTypes" placeholder="请输入授权类型" />
+        </el-form-item>
+        <el-form-item label="令牌时效" prop="accessTokenValidity">
+          <el-input-number v-model="form.accessTokenValidity" controls-position="right" :min="0" />
+        </el-form-item>
+        <el-form-item label="刷新时效" prop="refreshTokenValidity">
+          <el-input-number v-model="form.refreshTokenValidity" controls-position="right" :min="0" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listClient, getClient, delClient, addClient, updateClient } from "@/api/system/client";
+
+export default {
+  name: "Client",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 总条数
+      total: 0,
+      // 终端表格数据
+      clientList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        clientId: undefined
+      },
+      // 是否新增
+      isAdd: false,
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        clientId: [
+          { required: true, message: "编号不能为空", trigger: "blur" }
+        ],
+        clientSecret: [
+          { required: true, message: "安全码不能为空", trigger: "blur" }
+        ],
+        scope: [
+          { required: true, message: "授权范围不能为空", trigger: "blur" }
+        ],
+        authorizedGrantTypes: [
+          { required: true, message: "授权类型不能为空", trigger: "blur" }
+        ]
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询终端列表 */
+    getList() {
+      this.loading = true;
+      listClient(this.queryParams).then(response => {
+        this.clientList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        clientId: undefined,
+        clientSecret: undefined,
+        scope: "server",
+        authorizedGrantTypes: "password,refresh_token",
+        accessTokenValidity: 3600,
+        refreshTokenValidity: 7200
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.clientId);
+      this.single = selection.length != 1;
+      this.multiple = !selection.length;
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.isAdd = true;
+      this.title = "添加终端";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      this.isAdd = false;
+      const clientId = row.clientId || this.ids;
+      getClient(clientId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改终端";
+      });
+    },
+    /** 提交按钮 */
+    submitForm: function() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (!this.isAdd && this.form.clientId != undefined) {
+            updateClient(this.form).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              }
+            });
+          } else {
+            addClient(this.form).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              }
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const clientIds = row.clientId || this.ids;
+      this.$confirm('是否确认删除终端编号为"' + clientIds + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delClient(clientIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(function() {});
+    }
+  }
+};
+</script>

+ 5 - 8
ruoyi-ui/src/views/system/logininfor/index.vue

@@ -90,15 +90,12 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="访问编号" align="center" prop="infoId" />
       <el-table-column label="用户名称" align="center" prop="userName" />
-      <el-table-column label="登录地址" align="center" prop="ipaddr" width="130" :show-overflow-tooltip="true" />
-      <el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" />
-      <el-table-column label="浏览器" align="center" prop="browser" />
-      <el-table-column label="操作系统" align="center" prop="os" />
-      <el-table-column label="登录状态" align="center" prop="status" :formatter="statusFormat" />
-      <el-table-column label="操作信息" align="center" prop="msg" />
-      <el-table-column label="登录日期" align="center" prop="loginTime" width="180">
+      <el-table-column label="地址" align="center" prop="ipaddr" width="130" :show-overflow-tooltip="true" />
+      <el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" />
+      <el-table-column label="描述" align="center" prop="msg" />
+      <el-table-column label="访问时间" align="center" prop="accessTime" width="180">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.loginTime) }}</span>
+          <span>{{ parseTime(scope.row.accessTime) }}</span>
         </template>
       </el-table-column>
     </el-table>

+ 1 - 2
ruoyi-ui/src/views/system/operlog/index.vue

@@ -110,7 +110,6 @@
       <el-table-column label="请求方式" align="center" prop="requestMethod" />
       <el-table-column label="操作人员" align="center" prop="operName" />
       <el-table-column label="主机" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
-      <el-table-column label="操作地点" align="center" prop="operLocation" :show-overflow-tooltip="true" />
       <el-table-column label="操作状态" align="center" prop="status" :formatter="statusFormat" />
       <el-table-column label="操作日期" align="center" prop="operTime" width="180">
         <template slot-scope="scope">
@@ -146,7 +145,7 @@
             <el-form-item label="操作模块:">{{ form.title }} / {{ typeFormat(form) }}</el-form-item>
             <el-form-item
               label="登录信息:"
-            >{{ form.operName }} / {{ form.operIp }} / {{ form.operLocation }}</el-form-item>
+            >{{ form.operName }} / {{ form.operIp }}</el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="请求地址:">{{ form.operUrl }}</el-form-item>

+ 1 - 1
ruoyi-visual/pom.xml

@@ -4,7 +4,7 @@
     <parent>
         <groupId>com.ruoyi</groupId>
         <artifactId>ruoyi</artifactId>
-        <version>1.0.0</version>
+        <version>2.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 3 - 3
ruoyi-visual/ruoyi-monitor/pom.xml

@@ -35,10 +35,10 @@
             <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
         </dependency>
 
-        <!-- SpringCloud Netflix Hystrix -->
+        <!-- SpringCloud Ailibaba Sentinel -->
         <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
         </dependency>
 		
         <!-- SpringBoot Web -->

+ 62 - 60
sql/ry_20200520.sql → sql/ry_20200610.sql

@@ -158,25 +158,26 @@ insert into sys_menu values('2', '系统监控', '0', '2', 'monitor',          n
 insert into sys_menu values('3', '系统工具', '0', '3', 'tool',             null,   1, 'M', '0', '0', '', 'tool',     'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统工具目录');
 insert into sys_menu values('4', '若依官网', '0', '4', 'http://ruoyi.vip', null ,  0, 'M', '0', '0', '', 'guide',    'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '若依官网地址');
 -- 二级菜单
-insert into sys_menu values('100',  '用户管理', '1',   '1', 'user',       'system/user/index',           1, 'C', '0', '0', 'system:user:list',        'user',          'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '用户管理菜单');
-insert into sys_menu values('101',  '角色管理', '1',   '2', 'role',       'system/role/index',           1, 'C', '0', '0', 'system:role:list',        'peoples',       'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '角色管理菜单');
-insert into sys_menu values('102',  '菜单管理', '1',   '3', 'menu',       'system/menu/index',           1, 'C', '0', '0', 'system:menu:list',        'tree-table',    'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '菜单管理菜单');
-insert into sys_menu values('103',  '部门管理', '1',   '4', 'dept',       'system/dept/index',           1, 'C', '0', '0', 'system:dept:list',        'tree',          'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '部门管理菜单');
-insert into sys_menu values('104',  '岗位管理', '1',   '5', 'post',       'system/post/index',           1, 'C', '0', '0', 'system:post:list',        'post',          'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '岗位管理菜单');
-insert into sys_menu values('105',  '字典管理', '1',   '6', 'dict',       'system/dict/index',           1, 'C', '0', '0', 'system:dict:list',        'dict',          'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '字典管理菜单');
-insert into sys_menu values('106',  '参数设置', '1',   '7', 'config',     'system/config/index',         1, 'C', '0', '0', 'system:config:list',      'edit',          'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '参数设置菜单');
-insert into sys_menu values('107',  '通知公告', '1',   '8', 'notice',     'system/notice/index',         1, 'C', '0', '0', 'system:notice:list',      'message',       'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知公告菜单');
-insert into sys_menu values('108',  '日志管理', '1',   '9', 'log',        'system/log/index',            1, 'M', '0', '0', '',                        'log',           'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '日志管理菜单');
-insert into sys_menu values('109',  '在线用户', '2',   '1', 'online',     'monitor/online/index',        1, 'C', '0', '0', 'monitor:online:list',     'online',        'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '在线用户菜单');
-insert into sys_menu values('110',  '定时任务', '2',   '2', 'job',        'monitor/job/index',           1, 'C', '0', '0', 'monitor:job:list',        'job',           'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '定时任务菜单');
-insert into sys_menu values('111',  '数据监控', '2',   '3', 'druid',      'monitor/druid/index',         1, 'C', '0', '0', 'monitor:druid:list',      'druid',         'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '数据监控菜单');
-insert into sys_menu values('112',  '服务监控', '2',   '4', 'http://localhost:9100/login',           '', 1, 'C', '0', '0', 'monitor:server:list',     'server',        'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '服务监控菜单');
-insert into sys_menu values('113',  '表单构建', '3',   '1', 'build',      'tool/build/index',            1 ,'C', '0', '0', 'tool:build:list',         'build',         'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '表单构建菜单');
-insert into sys_menu values('114',  '代码生成', '3',   '2', 'gen',        'tool/gen/index',              1, 'C', '0', '0', 'tool:gen:list',           'code',          'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '代码生成菜单');
-insert into sys_menu values('115',  '系统接口', '3',   '3', 'http://localhost:8080/swagger-ui.html', '', 1, 'C', '0', '0', 'tool:swagger:list',       'swagger',       'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统接口菜单');
+insert into sys_menu values('100',  '用户管理',       '1',   '1',  'user',                                'system/user/index',       1, 'C', '0', '0', 'system:user:list',        'user',          'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '用户管理菜单');
+insert into sys_menu values('101',  '角色管理',       '1',   '2',  'role',                                'system/role/index',       1, 'C', '0', '0', 'system:role:list',        'peoples',       'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '角色管理菜单');
+insert into sys_menu values('102',  '菜单管理',       '1',   '3',  'menu',                                'system/menu/index',       1, 'C', '0', '0', 'system:menu:list',        'tree-table',    'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '菜单管理菜单');
+insert into sys_menu values('103',  '部门管理',       '1',   '4',  'dept',                                'system/dept/index',       1, 'C', '0', '0', 'system:dept:list',        'tree',          'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '部门管理菜单');
+insert into sys_menu values('104',  '岗位管理',       '1',   '5',  'post',                                'system/post/index',       1, 'C', '0', '0', 'system:post:list',        'post',          'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '岗位管理菜单');
+insert into sys_menu values('105',  '字典管理',       '1',   '6',  'dict',                                'system/dict/index',       1, 'C', '0', '0', 'system:dict:list',        'dict',          'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '字典管理菜单');
+insert into sys_menu values('106',  '参数设置',       '1',   '7',  'config',                              'system/config/index',     1, 'C', '0', '0', 'system:config:list',      'edit',          'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '参数设置菜单');
+insert into sys_menu values('107',  '终端设置',       '1',   '8',  'client',                              'system/client/index',     1, 'C', '0', '0', 'system:client:list',      'client',        'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '终端设置菜单');
+insert into sys_menu values('108',  '通知公告',       '1',   '9',  'notice',                              'system/notice/index',     1, 'C', '0', '0', 'system:notice:list',      'message',       'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知公告菜单');
+insert into sys_menu values('109',  '日志管理',       '1',   '10', 'log',                                 'system/log/index',        1, 'M', '0', '0', '',                        'log',           'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '日志管理菜单');
+insert into sys_menu values('110',  '定时任务',       '2',   '1',  'job',                                 'monitor/job/index',       1, 'C', '0', '0', 'monitor:job:list',        'job',           'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '定时任务菜单');
+insert into sys_menu values('111',  'Sentinel控制台', '2',   '2',  'http://localhost:8718',                '',                       1, 'C', '0', '0', 'monitor:sentinel:list',   'sentinel',      'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '流量控制菜单');
+insert into sys_menu values('112',  'Nacos控制台',    '2',   '3',  'http://localhost:8848/nacos',          '',                       1, 'C', '0', '0', 'monitor:nacos:list',      'nacos',         'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '服务治理菜单');
+insert into sys_menu values('113',  'Admin控制台',    '2',   '4',  'http://localhost:9100/login',          '',                       1, 'C', '0', '0', 'monitor:server:list',     'server',        'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '服务监控菜单');
+insert into sys_menu values('114',  '表单构建',       '3',   '1',  'build',                                'tool/build/index',       1 ,'C', '0', '0', 'tool:build:list',         'build',         'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '表单构建菜单');
+insert into sys_menu values('115',  '代码生成',       '3',   '2',  'gen',                                  'tool/gen/index',         1, 'C', '0', '0', 'tool:gen:list',           'code',          'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '代码生成菜单');
+insert into sys_menu values('116',  '系统接口',       '3',   '3',  'http://localhost:8080/swagger-ui.html', '',                      1, 'C', '0', '0', 'tool:swagger:list',       'swagger',       'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统接口菜单');
 -- 三级菜单
-insert into sys_menu values('500',  '操作日志', '108', '1', 'operlog',    'system/operlog/index',     1, 'C', '0', '0', 'system:operlog:list',     'form',          'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '操作日志菜单');
-insert into sys_menu values('501',  '登录日志', '108', '2', 'logininfor', 'system/logininfor/index',  1, 'C', '0', '0', 'system:logininfor:list',  'logininfor',    'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '登录日志菜单');
+insert into sys_menu values('500',  '操作日志', '109', '1', 'operlog',    'system/operlog/index',     1, 'C', '0', '0', 'system:operlog:list',     'form',          'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '操作日志菜单');
+insert into sys_menu values('501',  '登录日志', '109', '2', 'logininfor', 'system/logininfor/index',  1, 'C', '0', '0', 'system:logininfor:list',  'logininfor',    'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '登录日志菜单');
 -- 用户管理按钮
 insert into sys_menu values('1001', '用户查询', '100', '1',  '', '', 1, 'F', '0', '0', 'system:user:query',          '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
 insert into sys_menu values('1002', '用户新增', '100', '2',  '', '', 1, 'F', '0', '0', 'system:user:add',            '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
@@ -219,37 +220,39 @@ insert into sys_menu values('1032', '参数新增', '106', '2', '#', '', 1, 'F',
 insert into sys_menu values('1033', '参数修改', '106', '3', '#', '', 1, 'F', '0', '0', 'system:config:edit',         '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
 insert into sys_menu values('1034', '参数删除', '106', '4', '#', '', 1, 'F', '0', '0', 'system:config:remove',       '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
 insert into sys_menu values('1035', '参数导出', '106', '5', '#', '', 1, 'F', '0', '0', 'system:config:export',       '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+-- 终端设置按钮
+insert into sys_menu values('1036', '终端查询', '107', '1', '#', '', 1, 'F', '0', '0', 'system:client:query',        '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1037', '终端新增', '107', '2', '#', '', 1, 'F', '0', '0', 'system:client:add',          '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1038', '终端修改', '107', '3', '#', '', 1, 'F', '0', '0', 'system:client:edit',         '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1039', '终端删除', '107', '4', '#', '', 1, 'F', '0', '0', 'system:client:remove',       '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1040', '终端导出', '107', '5', '#', '', 1, 'F', '0', '0', 'system:client:export',       '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
 -- 通知公告按钮
-insert into sys_menu values('1036', '公告查询', '107', '1', '#', '', 1, 'F', '0', '0', 'system:notice:query',        '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
-insert into sys_menu values('1037', '公告新增', '107', '2', '#', '', 1, 'F', '0', '0', 'system:notice:add',          '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
-insert into sys_menu values('1038', '公告修改', '107', '3', '#', '', 1, 'F', '0', '0', 'system:notice:edit',         '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
-insert into sys_menu values('1039', '公告删除', '107', '4', '#', '', 1, 'F', '0', '0', 'system:notice:remove',       '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1041', '公告查询', '108', '1', '#', '', 1, 'F', '0', '0', 'system:notice:query',        '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1042', '公告新增', '108', '2', '#', '', 1, 'F', '0', '0', 'system:notice:add',          '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1043', '公告修改', '108', '3', '#', '', 1, 'F', '0', '0', 'system:notice:edit',         '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1044', '公告删除', '108', '4', '#', '', 1, 'F', '0', '0', 'system:notice:remove',       '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
 -- 操作日志按钮
-insert into sys_menu values('1040', '操作查询', '500', '1', '#', '', 1, 'F', '0', '0', 'system:operlog:query',       '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
-insert into sys_menu values('1041', '操作删除', '500', '2', '#', '', 1, 'F', '0', '0', 'system:operlog:remove',      '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
-insert into sys_menu values('1042', '日志导出', '500', '4', '#', '', 1, 'F', '0', '0', 'system:operlog:export',      '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1045', '操作查询', '500', '1', '#', '', 1, 'F', '0', '0', 'system:operlog:query',       '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1046', '操作删除', '500', '2', '#', '', 1, 'F', '0', '0', 'system:operlog:remove',      '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1047', '日志导出', '500', '4', '#', '', 1, 'F', '0', '0', 'system:operlog:export',      '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
 -- 登录日志按钮
-insert into sys_menu values('1043', '登录查询', '501', '1', '#', '', 1, 'F', '0', '0', 'system:logininfor:query',    '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
-insert into sys_menu values('1044', '登录删除', '501', '2', '#', '', 1, 'F', '0', '0', 'system:logininfor:remove',   '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
-insert into sys_menu values('1045', '日志导出', '501', '3', '#', '', 1, 'F', '0', '0', 'system:logininfor:export',   '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
--- 在线用户按钮
-insert into sys_menu values('1046', '在线查询', '109', '1', '#', '', 1, 'F', '0', '0', 'monitor:online:query',       '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
-insert into sys_menu values('1047', '批量强退', '109', '2', '#', '', 1, 'F', '0', '0', 'monitor:online:batchLogout', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
-insert into sys_menu values('1048', '单条强退', '109', '3', '#', '', 1, 'F', '0', '0', 'monitor:online:forceLogout', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1048', '登录查询', '501', '1', '#', '', 1, 'F', '0', '0', 'system:logininfor:query',    '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1049', '登录删除', '501', '2', '#', '', 1, 'F', '0', '0', 'system:logininfor:remove',   '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1050', '日志导出', '501', '3', '#', '', 1, 'F', '0', '0', 'system:logininfor:export',   '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
 -- 定时任务按钮
-insert into sys_menu values('1049', '任务查询', '110', '1', '#', '', 1, 'F', '0', '0', 'monitor:job:query',          '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
-insert into sys_menu values('1050', '任务新增', '110', '2', '#', '', 1, 'F', '0', '0', 'monitor:job:add',            '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
-insert into sys_menu values('1051', '任务修改', '110', '3', '#', '', 1, 'F', '0', '0', 'monitor:job:edit',           '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
-insert into sys_menu values('1052', '任务删除', '110', '4', '#', '', 1, 'F', '0', '0', 'monitor:job:remove',         '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
-insert into sys_menu values('1053', '状态修改', '110', '5', '#', '', 1, 'F', '0', '0', 'monitor:job:changeStatus',   '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
-insert into sys_menu values('1054', '任务导出', '110', '7', '#', '', 1, 'F', '0', '0', 'monitor:job:export',         '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1051', '任务查询', '110', '1', '#', '', 1, 'F', '0', '0', 'monitor:job:query',          '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1052', '任务新增', '110', '2', '#', '', 1, 'F', '0', '0', 'monitor:job:add',            '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1053', '任务修改', '110', '3', '#', '', 1, 'F', '0', '0', 'monitor:job:edit',           '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1054', '任务删除', '110', '4', '#', '', 1, 'F', '0', '0', 'monitor:job:remove',         '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1055', '状态修改', '110', '5', '#', '', 1, 'F', '0', '0', 'monitor:job:changeStatus',   '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1056', '任务导出', '110', '7', '#', '', 1, 'F', '0', '0', 'monitor:job:export',         '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
 -- 代码生成按钮
-insert into sys_menu values('1055', '生成查询', '114', '1', '#', '', 1, 'F', '0', '0', 'tool:gen:query',             '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
-insert into sys_menu values('1056', '生成修改', '114', '2', '#', '', 1, 'F', '0', '0', 'tool:gen:edit',              '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
-insert into sys_menu values('1057', '生成删除', '114', '3', '#', '', 1, 'F', '0', '0', 'tool:gen:remove',            '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
-insert into sys_menu values('1058', '导入代码', '114', '2', '#', '', 1, 'F', '0', '0', 'tool:gen:import',            '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
-insert into sys_menu values('1059', '预览代码', '114', '4', '#', '', 1, 'F', '0', '0', 'tool:gen:preview',           '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
-insert into sys_menu values('1060', '生成代码', '114', '5', '#', '', 1, 'F', '0', '0', 'tool:gen:code',              '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1057', '生成查询', '115', '1', '#', '', 1, 'F', '0', '0', 'tool:gen:query',             '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1058', '生成修改', '115', '2', '#', '', 1, 'F', '0', '0', 'tool:gen:edit',              '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1059', '生成删除', '115', '3', '#', '', 1, 'F', '0', '0', 'tool:gen:remove',            '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1060', '导入代码', '115', '2', '#', '', 1, 'F', '0', '0', 'tool:gen:import',            '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1061', '预览代码', '115', '4', '#', '', 1, 'F', '0', '0', 'tool:gen:preview',           '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
+insert into sys_menu values('1062', '生成代码', '115', '5', '#', '', 1, 'F', '0', '0', 'tool:gen:code',              '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
 
 
 -- ----------------------------
@@ -365,6 +368,8 @@ insert into sys_role_menu values ('2', '1057');
 insert into sys_role_menu values ('2', '1058');
 insert into sys_role_menu values ('2', '1059');
 insert into sys_role_menu values ('2', '1060');
+insert into sys_role_menu values ('2', '1061');
+insert into sys_role_menu values ('2', '1062');
 
 -- ----------------------------
 -- 8、角色和部门关联表  角色1-N部门
@@ -542,12 +547,9 @@ create table sys_logininfor (
   info_id        bigint(20)     not null auto_increment   comment '访问ID',
   user_name      varchar(50)    default ''                comment '用户账号',
   ipaddr         varchar(50)    default ''                comment '登录IP地址',
-  login_location varchar(255)   default ''                comment '登录地点',
-  browser        varchar(50)    default ''                comment '浏览器类型',
-  os             varchar(50)    default ''                comment '操作系统',
   status         char(1)        default '0'               comment '登录状态(0成功 1失败)',
-  msg            varchar(255)   default ''                comment '提示息',
-  login_time     datetime                                 comment '访问时间',
+  msg            varchar(255)   default ''                comment '提示信息',
+  access_time    datetime                                 comment '访问时间',
   primary key (info_id)
 ) engine=innodb auto_increment=100 comment = '系统访问记录';
 
@@ -677,26 +679,26 @@ create table gen_table_column (
 
 
 -- ----------------------------
--- 20、客户端配置表
+-- 20、端配置表
 -- ----------------------------
 drop table if exists sys_oauth_client_details;
 create table sys_oauth_client_details (
-  client_id                  varchar(255)  not null          comment '客户端唯一标识',
+  client_id                  varchar(255)  not null          comment '终端编号',
   resource_ids               varchar(255)  default null      comment '资源ID标识',
-  client_secret              varchar(255)  not null          comment '客户端安全码',
-  scope                      varchar(255)  not null          comment '客户端授权范围',
-  authorized_grant_types     varchar(255)  not null          comment '客户端授权类型',
+  client_secret              varchar(255)  not null          comment '端安全码',
+  scope                      varchar(255)  not null          comment '端授权范围',
+  authorized_grant_types     varchar(255)  not null          comment '端授权类型',
   web_server_redirect_uri    varchar(255)  default null      comment '服务器回调地址',
   authorities                varchar(255)  default null      comment '访问资源所需权限',
-  access_token_validity      int(11)       default null      comment '设定客户端的access_token的有效时间值(秒)',
-  refresh_token_validity     int(11)       default null      comment '设定客户端的refresh_token的有效时间值(秒)',
-  additional_information     varchar(4096) default null      comment '预留字段',
-  autoapprove                tinyint(4)    default null      comment '是否登录时跳过授权(默认false)',
+  access_token_validity      int(11)       default null      comment '设定端的access_token的有效时间值(秒)',
+  refresh_token_validity     int(11)       default null      comment '设定端的refresh_token的有效时间值(秒)',
+  additional_information     varchar(4096) default null      comment '附加信息',
+  autoapprove                tinyint(4)    default null      comment '是否登录时跳过授权',
   primary key (client_id)
-) engine=innodb auto_increment=1 comment = '客户端配置表';
+) engine=innodb auto_increment=1 comment = '端配置表';
 
 -- ----------------------------
--- 初始化-客户端配置表数据
+-- 初始化-端配置表数据
 -- ----------------------------
 insert into sys_oauth_client_details values ('web',    '', '$2a$10$y2hKeELx.z3Sbz.kjQ4wmuiIsv5ZSbUQ1ov4BwFH6ccirP8Knp1uq', 'server', 'password,refresh_token',                    '', NULL, 3600, 7200, NULL, NULL);
 insert into sys_oauth_client_details values ('ruoyi',  '', '$2a$10$y2hKeELx.z3Sbz.kjQ4wmuiIsv5ZSbUQ1ov4BwFH6ccirP8Knp1uq', 'server', 'password,client_credentials,refresh_token', '', NULL, 3600, 7200, NULL, NULL);

+ 5 - 4
sql/ry_config_20200604.sql → sql/ry_config_20200610.sql

@@ -32,13 +32,14 @@ CREATE TABLE `config_info` (
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info';
 
 insert into config_info(id, data_id, group_id, content, md5, gmt_create, gmt_modified, src_user, src_ip, app_name, tenant_id, c_desc, c_use, effect, type, c_schema) values 
-(1,'application-dev.yml','DEFAULT_GROUP','#请求处理的超时时间\nribbon:\n  ReadTimeout: 10000\n  ConnectTimeout: 10000\n\n# feign 配置\nfeign:\n  hystrix:\n    enabled: true\n  okhttp:\n    enabled: true\n  httpclient:\n    enabled: false\n  client:\n    config:\n      default:\n        connectTimeout: 10000\n        readTimeout: 10000\n  compression:\n    request:\n      enabled: true\n    response:\n      enabled: true\n\n# hystrix 配置\nhystrix:\n  command:\n    default:\n      execution:\n        isolation:\n          strategy: SEMAPHORE\n          thread:\n            timeoutInMilliseconds: 60000\n  shareSecurityContext: true\n\n# 暴露监控端点\nmanagement:\n  endpoints:\n    web:\n      exposure:\n        include: \'*\'\n\n# 认证配置\nsecurity:\n  oauth2:\n    client:\n      client-id: ruoyi\n      client-secret: 123456\n      scope: server\n    resource:\n      loadBalanced: true\n      token-info-uri: http://ruoyi-auth/oauth/check_token\n    ignore:\n      urls:\n        - /v2/api-docs\n        - /actuator/**\n        - /user/info/*\n        - /operlog\n','5ccdb3f6d02bf5afa7b7b4447075b8f2','2019-11-29 16:31:20','2020-05-24 14:53:44',NULL,'0:0:0:0:0:0:0:1','','','通用配置','null','null','yaml','null'),
-(2,'ruoyi-gateway-dev.yml','DEFAULT_GROUP','spring: \r\n  redis:\r\n    host: localhost\r\n    port: 6379\r\n    password: \r\n  cloud:\r\n    gateway:\r\n      discovery:\r\n        locator:\r\n          lowerCaseServiceId: true\r\n          enabled: true\r\n      routes:\r\n        # 认证中心\r\n        - id: ruoyi-auth\r\n          uri: lb://ruoyi-auth\r\n          predicates:\r\n            - Path=/auth/**\r\n          filters:\r\n            # 验证码处理\r\n            - ValidateCodeFilter\r\n            - StripPrefix=1\r\n        # 代码生成\r\n        - id: ruoyi-gen\r\n          uri: lb://ruoyi-gen\r\n          predicates:\r\n            - Path=/code/**\r\n          filters:\r\n            - StripPrefix=1\r\n        # 定时任务\r\n        - id: ruoyi-job\r\n          uri: lb://ruoyi-job\r\n          predicates:\r\n            - Path=/schedule/**\r\n          filters:\r\n            - StripPrefix=1\r\n        # 系统模块\r\n        - id: ruoyi-system\r\n          uri: lb://ruoyi-system\r\n          predicates:\r\n            - Path=/system/**\r\n          filters:\r\n            - StripPrefix=1\r\n','cecd783e043ac4e094ff9d6af643ae0e','2020-05-14 14:17:55','2020-05-24 19:41:50',NULL,'0:0:0:0:0:0:0:1','','','网关模块','null','null','yaml','null'),
-(3,'ruoyi-auth-dev.yml','DEFAULT_GROUP','spring: \r\n  main: \r\n    allow-bean-definition-overriding: true\r\n  datasource:\r\n    driver-class-name: com.mysql.cj.jdbc.Driver\r\n    url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\r\n    username: root\r\n    password: password\r\n  redis:\r\n    host: localhost\r\n    port: 6379\r\n    password: \r\n','e3db7475e43b8a83b0247ca8fd77339e','2020-05-14 13:20:49','2020-05-19 18:50:35',NULL,'0:0:0:0:0:0:0:1','','','认证中心','null','null','yaml','null'),
+(1,'application-dev.yml','DEFAULT_GROUP','#请求处理的超时时间\nribbon:\n  ReadTimeout: 10000\n  ConnectTimeout: 10000\n\n# feign 配置\nfeign:\n  sentinel:\n    enabled: true\n  okhttp:\n    enabled: true\n  httpclient:\n    enabled: false\n  client:\n    config:\n      default:\n        connectTimeout: 10000\n        readTimeout: 10000\n  compression:\n    request:\n      enabled: true\n    response:\n      enabled: true\n\n# 暴露监控端点\nmanagement:\n  endpoints:\n    web:\n      exposure:\n        include: \'*\'\n\n# 认证配置\nsecurity:\n  oauth2:\n    client:\n      client-id: ruoyi\n      client-secret: 123456\n      scope: server\n    resource:\n      loadBalanced: true\n      token-info-uri: http://ruoyi-auth/oauth/check_token\n    ignore:\n      urls:\n        - /v2/api-docs\n        - /actuator/**\n        - /user/info/*\n        - /operlog\n        - /logininfor\n','bf6cdf98474bf18c7ff697afbdf18e50','2019-11-29 16:31:20','2020-06-09 18:22:21',NULL,'0:0:0:0:0:0:0:1','','','通用配置','null','null','yaml','null'),
+(2,'ruoyi-gateway-dev.yml','DEFAULT_GROUP','spring:\r\n  redis:\r\n    host: localhost\r\n    port: 6379\r\n    password: \r\n  cloud:\r\n    gateway:\r\n      discovery:\r\n        locator:\r\n          lowerCaseServiceId: true\r\n          enabled: true\r\n      routes:\r\n        # 认证中心\r\n        - id: ruoyi-auth\r\n          uri: lb://ruoyi-auth\r\n          predicates:\r\n            - Path=/auth/**\r\n          filters:\r\n            # 验证码处理\r\n            - ValidateCodeFilter\r\n            - StripPrefix=1\r\n        # 代码生成\r\n        - id: ruoyi-gen\r\n          uri: lb://ruoyi-gen\r\n          predicates:\r\n            - Path=/code/**\r\n          filters:\r\n            - StripPrefix=1\r\n        # 定时任务\r\n        - id: ruoyi-job\r\n          uri: lb://ruoyi-job\r\n          predicates:\r\n            - Path=/schedule/**\r\n          filters:\r\n            - StripPrefix=1\r\n        # 系统模块\r\n        - id: ruoyi-system\r\n          uri: lb://ruoyi-system\r\n          predicates:\r\n            - Path=/system/**\r\n          filters:\r\n            - StripPrefix=1\r\n','3f7d474fbbf1a1d1c316a7dcea18bda6','2020-05-14 14:17:55','2020-06-09 16:27:57',NULL,'0:0:0:0:0:0:0:1','','','网关模块','null','null','yaml','null'),
+(3,'ruoyi-auth-dev.yml','DEFAULT_GROUP','spring: \r\n  datasource:\r\n    driver-class-name: com.mysql.cj.jdbc.Driver\r\n    url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\r\n    username: root\r\n    password: password\r\n  redis:\r\n    host: localhost\r\n    port: 6379\r\n    password: \r\n','868c15010a7a15c027d4c90a48aabb3e','2020-05-14 13:20:49','2020-06-09 16:30:50',NULL,'0:0:0:0:0:0:0:1','','','认证中心','null','null','yaml','null'),
 (4,'ruoyi-monitor-dev.yml','DEFAULT_GROUP','# Spring\r\nspring: \r\n  security:\r\n    user:\r\n      name: ruoyi\r\n      password: 123456\r\n  boot:\r\n    admin:\r\n      ui:\r\n        title: 若依服务状态监控\r\n','8e49d78998a7780d780305aeefe4fb1b','2020-05-19 15:14:01','2020-05-19 18:50:44',NULL,'0:0:0:0:0:0:0:1','','','监控中心','null','null','yaml','null'),
 (5,'ruoyi-system-dev.yml','DEFAULT_GROUP','# Spring\r\nspring: \r\n  redis:\r\n    host: localhost\r\n    port: 6379\r\n    password: \r\n  datasource:\r\n    driver-class-name: com.mysql.cj.jdbc.Driver\r\n    url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\r\n    username: root\r\n    password: password\r\n\r\n# Mybatis配置\r\nmybatis:\r\n    # 搜索指定包别名\r\n    typeAliasesPackage: com.ruoyi.system\r\n    # 配置mapper的扫描,找到所有的mapper.xml映射文件\r\n    mapperLocations: classpath:mapper/**/*.xml\r\n\r\n# swagger 配置\r\nswagger:\r\n  title: 系统模块接口文档\r\n  license: Powered By ruoyi\r\n  licenseUrl: https://ruoyi.vip\r\n  authorization:\r\n    name: RuoYi OAuth\r\n    auth-regex: ^.*$\r\n    authorization-scope-list:\r\n      - scope: server\r\n        description: 客户端授权范围\r\n    token-url-list:\r\n      - http://localhost:8080/auth/oauth/token\r\n','06f95c879d284ec8031cc44805e62b50','2020-05-14 13:37:04','2020-06-04 17:14:14',NULL,'0:0:0:0:0:0:0:1','','','系统模块','null','null','yaml','null'),
 (6,'ruoyi-gen-dev.yml','DEFAULT_GROUP','# Spring\r\nspring: \r\n  datasource:\r\n    driver-class-name: com.mysql.cj.jdbc.Driver\r\n    url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\r\n    username: root\r\n    password: password\r\n\r\n# Mybatis配置\r\nmybatis:\r\n    # 搜索指定包别名\r\n    typeAliasesPackage: com.ruoyi.gen.domain\r\n    # 配置mapper的扫描,找到所有的mapper.xml映射文件\r\n    mapperLocations: classpath:mapper/**/*.xml\r\n\r\n# swagger 配置\r\nswagger:\r\n  title: 代码生成接口文档\r\n  license: Powered By ruoyi\r\n  licenseUrl: https://ruoyi.vip\r\n  authorization:\r\n    name: RuoYi OAuth\r\n    auth-regex: ^.*$\r\n    authorization-scope-list:\r\n      - scope: server\r\n        description: 客户端授权范围\r\n    token-url-list:\r\n      - http://localhost:8080/auth/oauth/token\r\n\r\n# 代码生成\r\ngen: \r\n  # 作者\r\n  author: ruoyi\r\n  # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool\r\n  packageName: com.ruoyi.system\r\n  # 自动去除表前缀,默认是false\r\n  autoRemovePre: false\r\n  # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)\r\n  tablePrefix: sys_\r\n','aa7e94e2abbdeb408bd8981391ab82f8','2020-05-14 13:54:50','2020-05-19 18:51:11',NULL,'0:0:0:0:0:0:0:1','','','代码生成','null','null','yaml','null'),
-(7,'ruoyi-job-dev.yml','DEFAULT_GROUP','# Spring\r\nspring: \r\n  datasource:\r\n    driver-class-name: com.mysql.cj.jdbc.Driver\r\n    url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\r\n    username: root\r\n    password: password\r\n\r\n# Mybatis配置\r\nmybatis:\r\n    # 搜索指定包别名\r\n    typeAliasesPackage: com.ruoyi.job.domain\r\n    # 配置mapper的扫描,找到所有的mapper.xml映射文件\r\n    mapperLocations: classpath:mapper/**/*.xml\r\n\r\n# swagger 配置\r\nswagger:\r\n  title: 定时任务接口文档\r\n  license: Powered By ruoyi\r\n  licenseUrl: https://ruoyi.vip\r\n  authorization:\r\n    name: RuoYi OAuth\r\n    auth-regex: ^.*$\r\n    authorization-scope-list:\r\n      - scope: server\r\n        description: 客户端授权范围\r\n    token-url-list:\r\n      - http://localhost:8080/auth/oauth/token\r\n','2904b375372b13f52baed5be2e497b21','2020-05-14 13:58:46','2020-05-19 18:49:56',NULL,'0:0:0:0:0:0:0:1','','','定时任务','null','null','yaml','null');
+(7,'ruoyi-job-dev.yml','DEFAULT_GROUP','# Spring\r\nspring: \r\n  datasource:\r\n    driver-class-name: com.mysql.cj.jdbc.Driver\r\n    url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\r\n    username: root\r\n    password: password\r\n\r\n# Mybatis配置\r\nmybatis:\r\n    # 搜索指定包别名\r\n    typeAliasesPackage: com.ruoyi.job.domain\r\n    # 配置mapper的扫描,找到所有的mapper.xml映射文件\r\n    mapperLocations: classpath:mapper/**/*.xml\r\n\r\n# swagger 配置\r\nswagger:\r\n  title: 定时任务接口文档\r\n  license: Powered By ruoyi\r\n  licenseUrl: https://ruoyi.vip\r\n  authorization:\r\n    name: RuoYi OAuth\r\n    auth-regex: ^.*$\r\n    authorization-scope-list:\r\n      - scope: server\r\n        description: 客户端授权范围\r\n    token-url-list:\r\n      - http://localhost:8080/auth/oauth/token\r\n','2904b375372b13f52baed5be2e497b21','2020-05-14 13:58:46','2020-05-19 18:49:56',NULL,'0:0:0:0:0:0:0:1','','','定时任务','null','null','yaml','null'),
+(8,'sentinel-ruoyi-gateway','DEFAULT_GROUP','[\r\n    {\r\n        \"resource\": \"/code\",\r\n        \"count\": 300,\r\n        \"grade\": 1,\r\n        \"limitApp\": \"default\",\r\n        \"strategy\": 0,\r\n        \"controlBehavior\": 0\r\n    },\r\n    {\r\n        \"resource\": \"ruoyi-auth\",\r\n        \"count\": 200,\r\n        \"grade\": 1,\r\n        \"limitApp\": \"default\",\r\n        \"strategy\": 0,\r\n        \"controlBehavior\": 0\r\n    },\r\n	{\r\n        \"resource\": \"ruoyi-system\",\r\n        \"count\": 500,\r\n        \"grade\": 1,\r\n        \"limitApp\": \"default\",\r\n        \"strategy\": 0,\r\n        \"controlBehavior\": 0\r\n    },\r\n	{\r\n        \"resource\": \"ruoyi-gen\",\r\n        \"count\": 50,\r\n        \"grade\": 1,\r\n        \"limitApp\": \"default\",\r\n        \"strategy\": 0,\r\n        \"controlBehavior\": 0\r\n    },\r\n	{\r\n        \"resource\": \"ruoyi-job\",\r\n        \"count\": 100,\r\n        \"grade\": 1,\r\n        \"limitApp\": \"default\",\r\n        \"strategy\": 0,\r\n        \"controlBehavior\": 0\r\n    }\r\n]','f6cd9e16e673a876f43aace0f2983b62','2020-06-09 12:14:01','2020-06-09 16:35:43',NULL,'0:0:0:0:0:0:0:1','','','null','null','null','json','null');
 
 
 /******************************************/

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.