Pre Merge pull request !47 from guzaoren/master
This commit is contained in:
commit
1f14376854
|
|
@ -56,16 +56,17 @@ public class SysLoginService
|
||||||
// 查询用户信息
|
// 查询用户信息
|
||||||
R<LoginUser> userResult = remoteUserService.getUserInfo(username);
|
R<LoginUser> userResult = remoteUserService.getUserInfo(username);
|
||||||
|
|
||||||
if (R.FAIL == userResult.getCode())
|
|
||||||
{
|
|
||||||
throw new BaseException(userResult.getMsg());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (StringUtils.isNull(userResult) || StringUtils.isNull(userResult.getData()))
|
if (StringUtils.isNull(userResult) || StringUtils.isNull(userResult.getData()))
|
||||||
{
|
{
|
||||||
remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "登录用户不存在");
|
remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "登录用户不存在");
|
||||||
throw new BaseException("登录用户:" + username + " 不存在");
|
throw new BaseException("登录用户:" + username + " 不存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (R.FAIL == userResult.getCode())
|
||||||
|
{
|
||||||
|
throw new BaseException(userResult.getMsg());
|
||||||
|
}
|
||||||
|
|
||||||
LoginUser userInfo = userResult.getData();
|
LoginUser userInfo = userResult.getData();
|
||||||
SysUser user = userResult.getData().getSysUser();
|
SysUser user = userResult.getData().getSysUser();
|
||||||
if (UserStatus.DELETED.getCode().equals(user.getDelFlag()))
|
if (UserStatus.DELETED.getCode().equals(user.getDelFlag()))
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://119.23.109.0:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
|
username: root
|
||||||
|
password: uAiqwVwjJ8-ilinhy
|
||||||
|
redis:
|
||||||
|
host: localhost
|
||||||
|
port: 6379
|
||||||
|
password:
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
spring:
|
||||||
|
redis:
|
||||||
|
host: localhost
|
||||||
|
port: 6379
|
||||||
|
password:
|
||||||
|
cloud:
|
||||||
|
gateway:
|
||||||
|
discovery:
|
||||||
|
locator:
|
||||||
|
lowerCaseServiceId: true
|
||||||
|
enabled: true
|
||||||
|
routes:
|
||||||
|
# 认证中心
|
||||||
|
- id: ruoyi-auth
|
||||||
|
uri: lb://ruoyi-auth
|
||||||
|
predicates:
|
||||||
|
- Path=/auth/**
|
||||||
|
filters:
|
||||||
|
# 验证码处理
|
||||||
|
- ValidateCodeFilter
|
||||||
|
- StripPrefix=1
|
||||||
|
# 代码生成
|
||||||
|
- id: ruoyi-gen
|
||||||
|
uri: lb://ruoyi-gen
|
||||||
|
predicates:
|
||||||
|
- Path=/code/**
|
||||||
|
filters:
|
||||||
|
- StripPrefix=1
|
||||||
|
# 定时任务
|
||||||
|
- id: ruoyi-job
|
||||||
|
uri: lb://ruoyi-job
|
||||||
|
predicates:
|
||||||
|
- Path=/schedule/**
|
||||||
|
filters:
|
||||||
|
- StripPrefix=1
|
||||||
|
# 系统模块
|
||||||
|
# 系统模块
|
||||||
|
- id: ruoyi-system
|
||||||
|
uri: lb://ruoyi-system
|
||||||
|
predicates:
|
||||||
|
- Path=/system/**
|
||||||
|
filters:
|
||||||
|
- name: BlackListUrlFilter
|
||||||
|
args:
|
||||||
|
blacklistUrl:
|
||||||
|
- /user/info/*
|
||||||
|
- StripPrefix=1
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
# Spring
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://119.23.109.0:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
|
username: root
|
||||||
|
password: uAiqwVwjJ8-ilinhy
|
||||||
|
|
||||||
|
# Mybatis配置
|
||||||
|
mybatis:
|
||||||
|
# 搜索指定包别名
|
||||||
|
typeAliasesPackage: com.ruoyi.gen.domain
|
||||||
|
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||||
|
mapperLocations: classpath:mapper/**/*.xml
|
||||||
|
|
||||||
|
# swagger 配置
|
||||||
|
swagger:
|
||||||
|
title: 代码生成接口文档
|
||||||
|
license: Powered By ruoyi
|
||||||
|
licenseUrl: https://ruoyi.vip
|
||||||
|
authorization:
|
||||||
|
name: RuoYi OAuth
|
||||||
|
auth-regex: ^.*$
|
||||||
|
authorization-scope-list:
|
||||||
|
- scope: server
|
||||||
|
description: 客户端授权范围
|
||||||
|
token-url-list:
|
||||||
|
- http://localhost:8080/auth/oauth/token
|
||||||
|
|
||||||
|
# 代码生成
|
||||||
|
gen:
|
||||||
|
# 作者
|
||||||
|
author: ruoyi
|
||||||
|
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
||||||
|
packageName: com.ruoyi.system
|
||||||
|
# 自动去除表前缀,默认是false
|
||||||
|
autoRemovePre: false
|
||||||
|
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
|
||||||
|
tablePrefix: sys_
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Spring
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://119.23.109.0:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
|
username: root
|
||||||
|
password: uAiqwVwjJ8-ilinhy
|
||||||
|
|
||||||
|
# Mybatis配置
|
||||||
|
mybatis:
|
||||||
|
# 搜索指定包别名
|
||||||
|
typeAliasesPackage: com.ruoyi.job.domain
|
||||||
|
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||||
|
mapperLocations: classpath:mapper/**/*.xml
|
||||||
|
|
||||||
|
# swagger 配置
|
||||||
|
swagger:
|
||||||
|
title: 定时任务接口文档
|
||||||
|
license: Powered By ruoyi
|
||||||
|
licenseUrl: https://ruoyi.vip
|
||||||
|
authorization:
|
||||||
|
name: RuoYi OAuth
|
||||||
|
auth-regex: ^.*$
|
||||||
|
authorization-scope-list:
|
||||||
|
- scope: server
|
||||||
|
description: 客户端授权范围
|
||||||
|
token-url-list:
|
||||||
|
- http://localhost:8080/auth/oauth/token
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
# Spring
|
||||||
|
spring:
|
||||||
|
redis:
|
||||||
|
host: localhost
|
||||||
|
port: 6379
|
||||||
|
password:
|
||||||
|
datasource:
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://119.23.109.0:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
|
username: root
|
||||||
|
password: uAiqwVwjJ8-ilinhy
|
||||||
|
|
||||||
|
# Mybatis配置
|
||||||
|
mybatis:
|
||||||
|
# 搜索指定包别名
|
||||||
|
typeAliasesPackage: com.ruoyi.system
|
||||||
|
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||||
|
mapperLocations: classpath:mapper/**/*.xml
|
||||||
|
|
||||||
|
# swagger 配置
|
||||||
|
swagger:
|
||||||
|
title: 系统模块接口文档
|
||||||
|
license: Powered By ruoyi
|
||||||
|
licenseUrl: https://ruoyi.vip
|
||||||
|
authorization:
|
||||||
|
name: RuoYi OAuth
|
||||||
|
auth-regex: ^.*$
|
||||||
|
authorization-scope-list:
|
||||||
|
- scope: server
|
||||||
|
description: 客户端授权范围
|
||||||
|
token-url-list:
|
||||||
|
- http://localhost:8080/auth/oauth/token
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
# Spring
|
||||||
|
spring:
|
||||||
|
security:
|
||||||
|
user:
|
||||||
|
name: ruoyi
|
||||||
|
password: 123456
|
||||||
|
boot:
|
||||||
|
admin:
|
||||||
|
ui:
|
||||||
|
title: 若依服务状态监控
|
||||||
Loading…
Reference in New Issue