1. 中铝e办组织机构人员同步联调接口
2. 设置默认文件预览水印为人员加日期
(cherry picked from commit 07c9ead358)
This commit is contained in:
@@ -12,6 +12,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
|||||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.boot.test.mock.mockito.MockBean;
|
import org.springframework.boot.test.mock.mockito.MockBean;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClientFactory;
|
||||||
import org.springframework.context.annotation.Import;
|
import org.springframework.context.annotation.Import;
|
||||||
import org.springframework.test.context.ActiveProfiles;
|
import org.springframework.test.context.ActiveProfiles;
|
||||||
import org.springframework.test.context.jdbc.Sql;
|
import org.springframework.test.context.jdbc.Sql;
|
||||||
@@ -31,6 +32,9 @@ public class BaseDbUnitTest {
|
|||||||
@MockBean
|
@MockBean
|
||||||
private SequenceCommonApi sequenceCommonApi;
|
private SequenceCommonApi sequenceCommonApi;
|
||||||
|
|
||||||
|
@MockBean
|
||||||
|
private FeignClientFactory feignClientFactory;
|
||||||
|
|
||||||
@Import({
|
@Import({
|
||||||
// DB 配置类
|
// DB 配置类
|
||||||
YudaoDataSourceAutoConfiguration.class, // 自己的 DB 配置类
|
YudaoDataSourceAutoConfiguration.class, // 自己的 DB 配置类
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import org.redisson.spring.starter.RedissonAutoConfiguration;
|
|||||||
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
|
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.boot.test.mock.mockito.MockBean;
|
import org.springframework.boot.test.mock.mockito.MockBean;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClientFactory;
|
||||||
import org.springframework.context.annotation.Import;
|
import org.springframework.context.annotation.Import;
|
||||||
import org.springframework.test.context.ActiveProfiles;
|
import org.springframework.test.context.ActiveProfiles;
|
||||||
|
|
||||||
@@ -25,6 +26,9 @@ public class BaseRedisUnitTest {
|
|||||||
@MockBean
|
@MockBean
|
||||||
private SequenceCommonApi sequenceCommonApi;
|
private SequenceCommonApi sequenceCommonApi;
|
||||||
|
|
||||||
|
@MockBean
|
||||||
|
private FeignClientFactory feignClientFactory;
|
||||||
|
|
||||||
@Import({
|
@Import({
|
||||||
// Redis 配置类
|
// Redis 配置类
|
||||||
RedisTestConfiguration.class, // Redis 测试配置类,用于启动 RedisServer
|
RedisTestConfiguration.class, // Redis 测试配置类,用于启动 RedisServer
|
||||||
|
|||||||
@@ -23,26 +23,18 @@ public class BannerApplicationRunner implements ApplicationRunner {
|
|||||||
"项目启动成功!\n\t" +
|
"项目启动成功!\n\t" +
|
||||||
"接口文档: \t{} \n\t" +
|
"接口文档: \t{} \n\t" +
|
||||||
"开发文档: \t{} \n\t" +
|
"开发文档: \t{} \n\t" +
|
||||||
"视频教程: \t{} \n" +
|
|
||||||
"----------------------------------------------------------",
|
"----------------------------------------------------------",
|
||||||
"http://172.16.46.63:30888/api-doc/",
|
"http://172.16.46.63:30888/api-doc/",
|
||||||
"http://172.16.46.63:30888",
|
"http://172.16.46.63:30888");
|
||||||
"https://t.zsxq.com/02Yf6M7Qn");
|
|
||||||
|
|
||||||
// 数据报表
|
// 数据报表
|
||||||
System.out.println("[报表模块 yudao-module-report 教程][参考 http://172.16.46.63:30888/report/ 开启]");
|
System.out.println("[报表模块 yudao-module-report 教程][参考 http://172.16.46.63:30888/report/ 开启]");
|
||||||
// 工作流
|
// 工作流
|
||||||
System.out.println("[工作流模块 yudao-module-bpm 教程][参考 http://172.16.46.63:30888/bpm/ 开启]");
|
System.out.println("[工作流模块 yudao-module-bpm 教程][参考 http://172.16.46.63:30888/bpm/ 开启]");
|
||||||
// 商城系统
|
|
||||||
System.out.println("[商城系统 yudao-module-mall 教程][参考 http://172.16.46.63:30888/mall/build/ 开启]");
|
|
||||||
// ERP 系统
|
|
||||||
System.out.println("[ERP 系统 yudao-module-erp - 教程][参考 http://172.16.46.63:30888/erp/build/ 开启]");
|
|
||||||
// CRM 系统
|
|
||||||
System.out.println("[CRM 系统 yudao-module-crm - 教程][参考 http://172.16.46.63:30888/crm/build/ 开启]");
|
|
||||||
// 微信公众号
|
// 微信公众号
|
||||||
System.out.println("[微信公众号 yudao-module-mp 教程][参考 http://172.16.46.63:30888/mp/build/ 开启]");
|
System.out.println("[微信公众号 yudao-module-mp 教程][参考 http://172.16.46.63:30888/mp/build/ 开启]");
|
||||||
// 支付平台
|
|
||||||
System.out.println("[支付系统 yudao-module-pay - 教程][参考 http://172.16.46.63:30888/pay/build/ 开启]");
|
|
||||||
// AI 大模型
|
// AI 大模型
|
||||||
System.out.println("[AI 大模型 yudao-module-ai - 教程][参考 http://172.16.46.63:30888/ai/build/ 开启]");
|
System.out.println("[AI 大模型 yudao-module-ai - 教程][参考 http://172.16.46.63:30888/ai/build/ 开启]");
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -25,26 +25,18 @@ public class BannerApplicationRunner implements ApplicationRunner {
|
|||||||
"项目启动成功!\n\t" +
|
"项目启动成功!\n\t" +
|
||||||
"接口文档: \t{} \n\t" +
|
"接口文档: \t{} \n\t" +
|
||||||
"开发文档: \t{} \n\t" +
|
"开发文档: \t{} \n\t" +
|
||||||
"视频教程: \t{} \n" +
|
|
||||||
"----------------------------------------------------------",
|
"----------------------------------------------------------",
|
||||||
"http://172.16.46.63:30888/api-doc/",
|
"http://172.16.46.63:30888/api-doc/",
|
||||||
"http://172.16.46.63:30888",
|
"http://172.16.46.63:30888");
|
||||||
"https://t.zsxq.com/02Yf6M7Qn");
|
|
||||||
|
|
||||||
// 数据报表
|
// 数据报表
|
||||||
System.out.println("[报表模块 yudao-module-report 教程][参考 http://172.16.46.63:30888/report/ 开启]");
|
System.out.println("[报表模块 yudao-module-report 教程][参考 http://172.16.46.63:30888/report/ 开启]");
|
||||||
// 工作流
|
// 工作流
|
||||||
System.out.println("[工作流模块 yudao-module-bpm 教程][参考 http://172.16.46.63:30888/bpm/ 开启]");
|
System.out.println("[工作流模块 yudao-module-bpm 教程][参考 http://172.16.46.63:30888/bpm/ 开启]");
|
||||||
// 商城系统
|
|
||||||
System.out.println("[商城系统 yudao-module-mall 教程][参考 http://172.16.46.63:30888/mall/build/ 开启]");
|
|
||||||
// ERP 系统
|
|
||||||
System.out.println("[ERP 系统 yudao-module-erp - 教程][参考 http://172.16.46.63:30888/erp/build/ 开启]");
|
|
||||||
// CRM 系统
|
|
||||||
System.out.println("[CRM 系统 yudao-module-crm - 教程][参考 http://172.16.46.63:30888/crm/build/ 开启]");
|
|
||||||
// 微信公众号
|
// 微信公众号
|
||||||
System.out.println("[微信公众号 yudao-module-mp 教程][参考 http://172.16.46.63:30888/mp/build/ 开启]");
|
System.out.println("[微信公众号 yudao-module-mp 教程][参考 http://172.16.46.63:30888/mp/build/ 开启]");
|
||||||
// 支付平台
|
|
||||||
System.out.println("[支付系统 yudao-module-pay - 教程][参考 http://172.16.46.63:30888/pay/build/ 开启]");
|
|
||||||
// AI 大模型
|
// AI 大模型
|
||||||
System.out.println("[AI 大模型 yudao-module-ai - 教程][参考 http://172.16.46.63:30888/ai/build/ 开启]");
|
System.out.println("[AI 大模型 yudao-module-ai - 教程][参考 http://172.16.46.63:30888/ai/build/ 开启]");
|
||||||
// IOT 物联网
|
// IOT 物联网
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
spring:
|
spring:
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
|
server-addr: 172.16.46.63:30848 # Nacos 服务器地址
|
||||||
username: # Nacos 账号
|
username: # Nacos 账号
|
||||||
password: # Nacos 密码
|
password: # Nacos 密码
|
||||||
discovery: # 【配置中心】配置项
|
discovery: # 【配置中心】配置项
|
||||||
@@ -58,29 +58,20 @@ spring:
|
|||||||
primary: master
|
primary: master
|
||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true # MySQL Connector/J 5.X 连接的示例
|
username: SYSDBA
|
||||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
password: pgbsci6ddJ6Sqj@e
|
||||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
|
||||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
|
|
||||||
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
|
|
||||||
username: root
|
|
||||||
password: 123456
|
|
||||||
# username: sa # SQL Server 连接的示例
|
|
||||||
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
|
|
||||||
# username: SYSDBA # DM 连接的示例
|
|
||||||
# password: SYSDBA # DM 连接的示例
|
|
||||||
slave: # 模拟从库,可根据自己需要修改
|
slave: # 模拟从库,可根据自己需要修改
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
lazy: true # 开启懒加载,保证启动速度
|
||||||
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
|
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||||
username: root
|
username: SYSDBA
|
||||||
password: 123456
|
password: pgbsci6ddJ6Sqj@e
|
||||||
|
|
||||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
||||||
data:
|
data:
|
||||||
redis:
|
redis:
|
||||||
host: 127.0.0.1 # 地址
|
host: 172.16.46.63 # 地址
|
||||||
port: 6379 # 端口
|
port: 30379 # 端口
|
||||||
database: 0 # 数据库索引
|
database: 0 # 数据库索引
|
||||||
# password: 123456 # 密码,建议生产环境开启
|
# password: 123456 # 密码,建议生产环境开启
|
||||||
|
|
||||||
|
|||||||
@@ -165,4 +165,15 @@ public class FileController {
|
|||||||
return CommonResult.customize(fileRespVO, HttpStatus.OK.value(), e.getMessage());
|
return CommonResult.customize(fileRespVO, HttpStatus.OK.value(), e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/verify-code")
|
||||||
|
@Operation(summary = "校验验证码")
|
||||||
|
public CommonResult<String> verifyCode(@Valid @RequestParam Long fileId, @RequestParam String code) throws Exception {
|
||||||
|
Long userId = getLoginUserId();
|
||||||
|
byte[] content = fileService.verifyCodeAndGetFile(fileId, userId, code);
|
||||||
|
if(content == null || content.length == 0){
|
||||||
|
return CommonResult.customize(null, HttpStatus.INTERNAL_SERVER_ERROR.value(), "验证码校验失败");
|
||||||
|
}
|
||||||
|
return CommonResult.customize(null, HttpStatus.OK.value(), "验证码校验通过");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.file;
|
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.file;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.iocoder.yudao.framework.common.util.spring.SpringUtils;
|
import cn.iocoder.yudao.framework.common.util.spring.SpringUtils;
|
||||||
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import cn.iocoder.yudao.module.infra.framework.file.core.client.FileClient;
|
import cn.iocoder.yudao.module.infra.framework.file.core.client.FileClient;
|
||||||
import cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClient;
|
import cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClient;
|
||||||
import cn.iocoder.yudao.module.infra.service.file.FileConfigService;
|
import cn.iocoder.yudao.module.infra.service.file.FileConfigService;
|
||||||
@@ -11,6 +13,7 @@ import lombok.experimental.Accessors;
|
|||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author chenbowen
|
* @author chenbowen
|
||||||
@@ -78,7 +81,9 @@ public class FileRespVO {
|
|||||||
}
|
}
|
||||||
String base64PresignedUrl = Base64.getEncoder().encodeToString(presignedUrl.getBytes(StandardCharsets.UTF_8));
|
String base64PresignedUrl = Base64.getEncoder().encodeToString(presignedUrl.getBytes(StandardCharsets.UTF_8));
|
||||||
String timestamp = String.valueOf(System.currentTimeMillis());
|
String timestamp = String.valueOf(System.currentTimeMillis());
|
||||||
String watermark = SpringUtils.getProperty("aj.captcha.water-mark", "中国铜业");
|
String loginUserNickname = SecurityFrameworkUtils.getLoginUserNickname();
|
||||||
|
String format = DateUtil.format(new Date(), "yyyy-MM-dd");
|
||||||
|
String watermark = SpringUtils.getProperty("aj.captcha.water-mark", loginUserNickname+" "+ format);
|
||||||
return onlinePreview + base64PresignedUrl + "&t=" + timestamp + "&watermarkTxt=" + watermark;
|
return onlinePreview + base64PresignedUrl + "&t=" + timestamp + "&watermarkTxt=" + watermark;
|
||||||
}
|
}
|
||||||
@Schema(description = "是否加密", example = "false")
|
@Schema(description = "是否加密", example = "false")
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public interface ErrorCodeConstants {
|
|||||||
// ========== 部门模块 1-002-004-000 ==========
|
// ========== 部门模块 1-002-004-000 ==========
|
||||||
ErrorCode DEPT_NAME_DUPLICATE = new ErrorCode(1_002_004_000, "已经存在该名字的部门");
|
ErrorCode DEPT_NAME_DUPLICATE = new ErrorCode(1_002_004_000, "已经存在该名字的部门");
|
||||||
ErrorCode DEPT_PARENT_NOT_EXITS = new ErrorCode(1_002_004_001,"父级部门不存在");
|
ErrorCode DEPT_PARENT_NOT_EXITS = new ErrorCode(1_002_004_001,"父级部门不存在");
|
||||||
ErrorCode DEPT_NOT_FOUND = new ErrorCode(1_002_004_002, "当前部门不存在");
|
ErrorCode DEPT_NOT_FOUND = new ErrorCode(1_002_004_002, "机构不存在或当前账号无权限修改");
|
||||||
ErrorCode DEPT_EXITS_CHILDREN = new ErrorCode(1_002_004_003, "存在子部门,无法删除");
|
ErrorCode DEPT_EXITS_CHILDREN = new ErrorCode(1_002_004_003, "存在子部门,无法删除");
|
||||||
ErrorCode DEPT_PARENT_ERROR = new ErrorCode(1_002_004_004, "不能设置自己为父部门");
|
ErrorCode DEPT_PARENT_ERROR = new ErrorCode(1_002_004_004, "不能设置自己为父部门");
|
||||||
ErrorCode DEPT_NOT_ENABLE = new ErrorCode(1_002_004_006, "部门({})不处于开启状态,不允许选择");
|
ErrorCode DEPT_NOT_ENABLE = new ErrorCode(1_002_004_006, "部门({})不处于开启状态,不允许选择");
|
||||||
@@ -153,6 +153,13 @@ public interface ErrorCodeConstants {
|
|||||||
ErrorCode OAUTH2_CODE_NOT_EXISTS = new ErrorCode(1_002_022_000, "code 不存在");
|
ErrorCode OAUTH2_CODE_NOT_EXISTS = new ErrorCode(1_002_022_000, "code 不存在");
|
||||||
ErrorCode OAUTH2_CODE_EXPIRE = new ErrorCode(1_002_022_001, "code 已过期");
|
ErrorCode OAUTH2_CODE_EXPIRE = new ErrorCode(1_002_022_001, "code 已过期");
|
||||||
|
|
||||||
|
// ========== 同步验证工具 1-002-019-000 ==========
|
||||||
|
ErrorCode SYNC_DECRYPT_TYPE = new ErrorCode(1_002_019_000, "解密失败");
|
||||||
|
ErrorCode SYNC_ENCRYPT_TYPE = new ErrorCode(1_002_019_001, "加密失败");
|
||||||
|
ErrorCode SYNC_SIGNATURE_UNSUPPORTED_TYPE = new ErrorCode(1_002_019_002, "签名类型不存在");
|
||||||
|
// 同步签名验证失败
|
||||||
|
ErrorCode SYNC_SIGNATURE_VERIFY_FAILED = new ErrorCode(1_002_019_003, "签名验证失败");
|
||||||
|
|
||||||
// ========== 邮箱账号 1-002-023-000 ==========
|
// ========== 邮箱账号 1-002-023-000 ==========
|
||||||
ErrorCode MAIL_ACCOUNT_NOT_EXISTS = new ErrorCode(1_002_023_000, "邮箱账号不存在");
|
ErrorCode MAIL_ACCOUNT_NOT_EXISTS = new ErrorCode(1_002_023_000, "邮箱账号不存在");
|
||||||
ErrorCode MAIL_ACCOUNT_RELATE_TEMPLATE_EXISTS = new ErrorCode(1_002_023_001, "无法删除,该邮箱账号还有邮件模板");
|
ErrorCode MAIL_ACCOUNT_RELATE_TEMPLATE_EXISTS = new ErrorCode(1_002_023_001, "无法删除,该邮箱账号还有邮件模板");
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ public class DeptSaveReqVO {
|
|||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
@Schema(description = "状态,见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "状态,见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
@NotNull(message = "状态不能为空")
|
|
||||||
@InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}")
|
@InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user