Compare commits
5 Commits
b021d2ef01
...
3c1274c3d6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c1274c3d6 | ||
| 2fa40c266f | |||
| 56cb31c616 | |||
| de1774b2d3 | |||
| 43e66ea9c6 |
@@ -9,43 +9,33 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
# MYSQL数据库 主库,业务库
|
# MYSQL数据库 主库,业务库
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/gr_report?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://127.0.0.1:3306/gr_report?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
||||||
url: jdbc:mysql://192.168.126.128:33306/gr_report?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
lideeyunji: # 从库,框架库
|
lideeyunji: # 从库,框架库
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/gr_report?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://127.0.0.1:3306/gr_report?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||||
url: jdbc:mysql://192.168.126.128:33306/gr_report?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
slave: # 日志库单独
|
slave: # 日志库单独
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
lazy: true # 开启懒加载,保证启动速度
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/gr_report?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://127.0.0.1:3306/gr_report?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||||
url: jdbc:mysql://192.168.126.128:33306/gr_report?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
oracle_gryybi: # 报表平台 oracle
|
oracle_gryybi: # 报表平台 oracle
|
||||||
|
driver-class-name: oracle.jdbc.driver.OracleDriver
|
||||||
url: jdbc:oracle:thin:@//192.168.1.247:1521/gryy?oracle.jdbc.defaultNChar=true&oracle.jdbc.convertNcharLiterals=true
|
url: jdbc:oracle:thin:@//192.168.1.247:1521/gryy?oracle.jdbc.defaultNChar=true&oracle.jdbc.convertNcharLiterals=true
|
||||||
username: GRYYBI
|
username: GRYYBI
|
||||||
password: xxb147258367
|
password: xxb147258367
|
||||||
# driver-class-name: oracle.jdbc.OracleDriver
|
|
||||||
driver-class-name: oracle.jdbc.driver.OracleDriver
|
|
||||||
erp_bi_data: # 报表平台 mysql
|
erp_bi_data: # 报表平台 mysql
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/erp_bi_data?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://127.0.0.1:3306/erp_bi_data?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||||
url: jdbc:mysql://192.168.126.128:33306/erp_bi_data?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
|
|
||||||
# redis:
|
|
||||||
# host: 127.0.0.1 # 地址
|
|
||||||
# port: 6379 # 端口
|
|
||||||
# database: 2 # 数据库索引
|
|
||||||
# password: lidee@123 # 密码,建议生产环境开启
|
|
||||||
redis:
|
redis:
|
||||||
host: 192.168.126.128 # 地址
|
host: 127.0.0.1 # 地址
|
||||||
port: 6379 # 端口
|
port: 6379 # 端口
|
||||||
database: 2 # 数据库索引
|
database: 2 # 数据库索引
|
||||||
password: 123456 # 密码,建议生产环境开启
|
password: lidee@123 # 密码,建议生产环境开启
|
||||||
|
|
||||||
--- #################### 地代码平台相关配置 ####################
|
--- #################### 地代码平台相关配置 ####################
|
||||||
|
|
||||||
|
|||||||
@@ -9,18 +9,28 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
# MYSQL数据库 主库,业务库
|
# MYSQL数据库 主库,业务库
|
||||||
url: jdbc:mysql://127.0.0.1:3306/gr_repoort?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://127.0.0.1:3306/gr_report?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
||||||
username: root
|
username: root
|
||||||
password: gryy@8888
|
password: gryy@8888
|
||||||
lideeyunji: # 从库,框架库
|
lideeyunji: # 从库,框架库
|
||||||
url: jdbc:mysql://127.0.0.1:3306/gr_repoort?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://127.0.0.1:3306/gr_report?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||||
username: root
|
username: root
|
||||||
password: gryy@8888
|
password: gryy@8888
|
||||||
slave: # 日志库单独
|
slave: # 日志库单独
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
lazy: true # 开启懒加载,保证启动速度
|
||||||
url: jdbc:mysql://127.0.0.1:3306/gr_repoort?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://127.0.0.1:3306/gr_report?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||||
username: root
|
username: root
|
||||||
password: gryy@8888
|
password: gryy@8888
|
||||||
|
oracle_gryybi: # 报表平台 oracle
|
||||||
|
url: jdbc:oracle:thin:@//192.168.1.247:1521/gryy?oracle.jdbc.defaultNChar=true&oracle.jdbc.convertNcharLiterals=true
|
||||||
|
username: GRYYBI
|
||||||
|
password: xxb147258367
|
||||||
|
# driver-class-name: oracle.jdbc.OracleDriver
|
||||||
|
driver-class-name: oracle.jdbc.driver.OracleDriver
|
||||||
|
erp_bi_data: # 报表平台 mysql
|
||||||
|
url: jdbc:mysql://127.0.0.1:3306/erp_bi_data?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||||
|
username: root
|
||||||
|
password: root
|
||||||
redis:
|
redis:
|
||||||
host: 127.0.0.1 # 地址
|
host: 127.0.0.1 # 地址
|
||||||
port: 6379 # 端口
|
port: 6379 # 端口
|
||||||
|
|||||||
@@ -78,5 +78,10 @@
|
|||||||
<artifactId>lidee-service-infra-api</artifactId>
|
<artifactId>lidee-service-infra-api</artifactId>
|
||||||
<version>${lidee.version}</version>
|
<version>${lidee.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.oracle.database.nls</groupId>
|
||||||
|
<artifactId>orai18n</artifactId>
|
||||||
|
<version>21.1.0.0</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ import org.springframework.stereotype.Component;
|
|||||||
* 同步销售明细表
|
* 同步销售明细表
|
||||||
* oracle gryybi GR_BI_SA_SETDTL --> mysql erp_bi_data GR_BI_SA_SETDTL
|
* oracle gryybi GR_BI_SA_SETDTL --> mysql erp_bi_data GR_BI_SA_SETDTL
|
||||||
*/
|
*/
|
||||||
@Component
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@Component("SaSetdtlSyncJob")
|
||||||
public class SaSetdtlSyncJob implements JobHandler {
|
public class SaSetdtlSyncJob implements JobHandler {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|||||||
@@ -60,9 +60,6 @@ public class anyToGrBiSasetdtl implements JobHandler {
|
|||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
//写入到数据中台表
|
//写入到数据中台表
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
System.out.println(rs.getString("SASETTLEDTLID"));
|
System.out.println(rs.getString("SASETTLEDTLID"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,6 +97,11 @@
|
|||||||
<groupId>com.tencentcloudapi</groupId>
|
<groupId>com.tencentcloudapi</groupId>
|
||||||
<artifactId>tencentcloud-sdk-java-sms</artifactId>
|
<artifactId>tencentcloud-sdk-java-sms</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.yulichang</groupId>
|
||||||
|
<artifactId>mybatis-plus-join-boot-starter</artifactId>
|
||||||
|
<version>1.4.11</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.lideeyunji</groupId>
|
<groupId>com.lideeyunji</groupId>
|
||||||
<artifactId>lidee-module-api</artifactId>
|
<artifactId>lidee-module-api</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import com.lideeyunji.service.system.config.convert.auth.AuthConvert;
|
import com.lideeyunji.service.system.config.convert.auth.AuthConvert;
|
||||||
import com.lideeyunji.service.system.constant.ErrorCodeConstants;
|
import com.lideeyunji.service.system.constant.ErrorCodeConstants;
|
||||||
import com.lideeyunji.service.system.controller.vo.auth.*;
|
import com.lideeyunji.service.system.controller.vo.auth.*;
|
||||||
import com.lideeyunji.service.system.controller.vo.auth.*;
|
|
||||||
import com.lideeyunji.service.system.controller.vo.user.user.UserRespVO;
|
import com.lideeyunji.service.system.controller.vo.user.user.UserRespVO;
|
||||||
import com.lideeyunji.service.system.entity.AdminUserDO;
|
import com.lideeyunji.service.system.entity.AdminUserDO;
|
||||||
import com.lideeyunji.service.system.entity.MenuDO;
|
import com.lideeyunji.service.system.entity.MenuDO;
|
||||||
@@ -23,7 +22,6 @@ import com.lideeyunji.tool.framework.operatelog.core.annotations.OperateLog;
|
|||||||
import com.lideeyunji.tool.framework.security.config.SecurityProperties;
|
import com.lideeyunji.tool.framework.security.config.SecurityProperties;
|
||||||
import com.lideeyunji.tool.framework.security.core.util.SecurityFrameworkUtils;
|
import com.lideeyunji.tool.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import com.lideeyunji.tool.framework.tenant.core.context.TenantContextHolder;
|
import com.lideeyunji.tool.framework.tenant.core.context.TenantContextHolder;
|
||||||
import com.lideeyunji.service.system.service.*;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.Parameters;
|
import io.swagger.v3.oas.annotations.Parameters;
|
||||||
@@ -165,8 +163,8 @@ public class AuthController {
|
|||||||
@Operation(tags = "根据token获取用户信息",summary = "根据token获取用户信息")
|
@Operation(tags = "根据token获取用户信息",summary = "根据token获取用户信息")
|
||||||
@Parameter(name = "refreshToken", description = "根据token获取用户信息", required = true)
|
@Parameter(name = "refreshToken", description = "根据token获取用户信息", required = true)
|
||||||
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
|
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
|
||||||
public CommonResult<AuthLoginRespVO> getUerInfo(@RequestParam("refreshToken") String refreshToken) {
|
public CommonResult<AdminUserDO> getUerInfo(@RequestParam("refreshToken") String refreshToken) {
|
||||||
return success(authService.refreshToken(refreshToken));
|
return success(authService.getTokenTouserInfo(refreshToken));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/get-permission-info")
|
@GetMapping("/get-permission-info")
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public class OAuth2ClientController {
|
|||||||
|
|
||||||
@GetMapping("/myPage")
|
@GetMapping("/myPage")
|
||||||
@Operation(tags = "OAuth2.0管理",summary = "获得用户角色下 OAuth2 客户端分页")
|
@Operation(tags = "OAuth2.0管理",summary = "获得用户角色下 OAuth2 客户端分页")
|
||||||
@PreAuthorize("@ss.hasPermission('system:oauth2-client:query')")
|
// @PreAuthorize("@ss.hasPermission('system:oauth2-client:query')")
|
||||||
public CommonResult<PageResult<OAuth2ClientRespVO>> getMyPage(@Valid OAuth2ClientPageReqVO pageVO) {
|
public CommonResult<PageResult<OAuth2ClientRespVO>> getMyPage(@Valid OAuth2ClientPageReqVO pageVO) {
|
||||||
PageResult<OAuth2ClientDO> pageResult = oAuth2ClientService.getMyPage(pageVO);
|
PageResult<OAuth2ClientDO> pageResult = oAuth2ClientService.getMyPage(pageVO);
|
||||||
return success(BeanUtils.toBean(pageResult, OAuth2ClientRespVO.class));
|
return success(BeanUtils.toBean(pageResult, OAuth2ClientRespVO.class));
|
||||||
|
|||||||
@@ -78,4 +78,6 @@ public interface IAdminAuthService {
|
|||||||
*/
|
*/
|
||||||
AuthLoginRespVO refreshToken(String refreshToken);
|
AuthLoginRespVO refreshToken(String refreshToken);
|
||||||
|
|
||||||
|
AdminUserDO getTokenTouserInfo(String refreshToken);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.lideeyunji.service.system.service;
|
package com.lideeyunji.service.system.service;
|
||||||
|
|
||||||
|
import com.lideeyunji.service.system.entity.AdminUserDO;
|
||||||
import com.lideeyunji.tool.framework.common.pojo.PageResult;
|
import com.lideeyunji.tool.framework.common.pojo.PageResult;
|
||||||
import com.lideeyunji.service.system.controller.vo.oauth2.token.OAuth2AccessTokenPageReqVO;
|
import com.lideeyunji.service.system.controller.vo.oauth2.token.OAuth2AccessTokenPageReqVO;
|
||||||
import com.lideeyunji.service.system.entity.OAuth2AccessTokenDO;
|
import com.lideeyunji.service.system.entity.OAuth2AccessTokenDO;
|
||||||
@@ -41,6 +42,10 @@ public interface IOAuth2TokenService {
|
|||||||
*/
|
*/
|
||||||
OAuth2AccessTokenDO refreshAccessToken(String refreshToken, String clientId);
|
OAuth2AccessTokenDO refreshAccessToken(String refreshToken, String clientId);
|
||||||
|
|
||||||
|
AdminUserDO getTokenTouserInfo(String refreshToken);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得访问令牌
|
* 获得访问令牌
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -362,6 +362,15 @@ public class AdminAuthServiceImpl implements IAdminAuthService {
|
|||||||
return AuthConvert.INSTANCE.convert(accessTokenDO);
|
return AuthConvert.INSTANCE.convert(accessTokenDO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AdminUserDO getTokenTouserInfo(String refreshToken) {
|
||||||
|
AdminUserDO user= oauth2TokenService.getTokenTouserInfo(refreshToken);
|
||||||
|
return user;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void logout(String token, Integer logType) {
|
public void logout(String token, Integer logType) {
|
||||||
// 删除访问令牌
|
// 删除访问令牌
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ public class OAuth2TokenServiceImpl implements IOAuth2TokenService {
|
|||||||
@Lazy // 懒加载,避免循环依赖
|
@Lazy // 懒加载,避免循环依赖
|
||||||
private IAdminUserService adminUserService;
|
private IAdminUserService adminUserService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public OAuth2AccessTokenDO createAccessToken(Long userId, Long lastLoginDeptId, Long lastLoginRoleId, Integer userType, String clientId, List<String> scopes) {
|
public OAuth2AccessTokenDO createAccessToken(Long userId, Long lastLoginDeptId, Long lastLoginRoleId, Integer userType, String clientId, List<String> scopes) {
|
||||||
return createAccessToken(userId, lastLoginDeptId, lastLoginRoleId, userType, clientId, scopes,false);
|
return createAccessToken(userId, lastLoginDeptId, lastLoginRoleId, userType, clientId, scopes,false);
|
||||||
@@ -77,6 +78,16 @@ public class OAuth2TokenServiceImpl implements IOAuth2TokenService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AdminUserDO getTokenTouserInfo(String refreshToken ) {
|
||||||
|
// 获得用户基本信息
|
||||||
|
OAuth2AccessTokenDO accessTokenDO= oauth2AccessTokenMapper.selectByAccessToken(refreshToken);
|
||||||
|
AdminUserDO user = adminUserService.getUser(accessTokenDO.getUserId());
|
||||||
|
return user;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public OAuth2AccessTokenDO refreshAccessToken(String refreshToken, String clientId) {
|
public OAuth2AccessTokenDO refreshAccessToken(String refreshToken, String clientId) {
|
||||||
boolean supAdmin = SecurityFrameworkUtils.isSupAdmin();
|
boolean supAdmin = SecurityFrameworkUtils.isSupAdmin();
|
||||||
@@ -110,6 +121,12 @@ public class OAuth2TokenServiceImpl implements IOAuth2TokenService {
|
|||||||
return createOAuth2AccessToken(refreshTokenDO, clientDO, supAdmin);
|
return createOAuth2AccessToken(refreshTokenDO, clientDO, supAdmin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public OAuth2AccessTokenDO getAccessToken(String accessToken) {
|
public OAuth2AccessTokenDO getAccessToken(String accessToken) {
|
||||||
// 优先从 Redis 中获取
|
// 优先从 Redis 中获取
|
||||||
|
|||||||
Reference in New Issue
Block a user