Merge branch 'test' into test-dsc

* test:
  修复BUG710,添加文件下载次数统计
  修改私服地址,把 seata-dm 项目从 dsc挪过来
  feat(gateway): 添加API客户端凭证加密功能支持
  bmp 已挪到 ztcloud-dist 仓库
  修改发布信息
  增加快照仓库
  恢复 erp 模块数据权限
  从maven模块中移除 zt-server
  修改版本号
  feat:登陆用户的部门数据权限接口增加角色参数;获取当前用户可访问的顶级部门列表不校验数据权限
  no message
This commit is contained in:
ranke
2026-01-15 14:51:00 +08:00
26 changed files with 156 additions and 24 deletions

15
pom.xml
View File

@@ -25,6 +25,7 @@
<module>zt-module-databus</module>
<!-- <module>zt-module-rule</module>-->
<!-- <module>zt-module-html2pdf</module>-->
<!-- <module>zt-server</module>-->
</modules>
<name>${project.artifactId}</name>
@@ -32,7 +33,7 @@
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
<properties>
<revision>3.0.46</revision>
<revision>3.0.47-SNAPSHOT</revision>
<!-- Maven 相关 -->
<java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
@@ -203,7 +204,7 @@
<repository>
<id>ZT</id>
<name>中铜 ZStack 私服</name>
<url>http://172.16.46.63:30708/repository/test/</url>
<url>http://172.16.46.63:30708/repository/zt-cloud/</url>
<releases>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
@@ -221,11 +222,11 @@
<name>中铜 ZStack 私服</name>
<url>http://172.16.46.63:30708/repository/test/</url>
</repository>
<!-- <snapshotRepository>-->
<!-- <id>ZT</id>-->
<!-- <name>中铜 ZStack 私服</name>-->
<!-- <url>https://your-nexus.example.com/repository/maven-snapshots/</url>-->
<!-- </snapshotRepository>-->
<snapshotRepository>
<id>ZT-snap</id>
<name>中铜 ZStack 私服</name>
<url>http://172.16.46.63:30708/repository/test-snap/</url>
</snapshotRepository>
</distributionManagement>
<profiles>

View File

@@ -0,0 +1,7 @@
-- 为 API 客户端凭证表添加"是否启用加密"字段
-- 2026-01-14
ALTER TABLE databus_api_client_credential
ADD enable_encryption BIT DEFAULT '1' NOT NULL;
COMMENT ON COLUMN databus_api_client_credential.enable_encryption IS '是否启用加密传输';

View File

@@ -339,7 +339,8 @@ CREATE TABLE infra_file (
create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
updater varchar(64) DEFAULT '' NULL,
update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
deleted bit DEFAULT '0' NOT NULL
deleted bit DEFAULT '0' NOT NULL,
DOWNLOAD_COUNT INT DEFAULT 0 NOT NULL
);
COMMENT ON COLUMN infra_file.id IS '文件编号';
@@ -356,6 +357,7 @@ COMMENT ON COLUMN infra_file.create_time IS '创建时间';
COMMENT ON COLUMN infra_file.updater IS '更新者';
COMMENT ON COLUMN infra_file.update_time IS '更新时间';
COMMENT ON COLUMN infra_file.deleted IS '是否删除';
COMMENT ON COLUMN INFRA_FILE.DOWNLOAD_COUNT IS '下载次数';
COMMENT ON TABLE infra_file IS '文件表';
CREATE INDEX idx_infra_file_hash ON infra_file(hash);

View File

@@ -0,0 +1,5 @@
-- 添加文件下载次数统计字段
ALTER TABLE JYGK_TEST.INFRA_FILE
ADD DOWNLOAD_COUNT INT DEFAULT 0 NOT NULL;
COMMENT ON COLUMN JYGK_TEST.INFRA_FILE.DOWNLOAD_COUNT IS '下载次数';

View File

@@ -10,11 +10,11 @@
<name>中铜 ZStack 私服</name>
<url>http://172.16.46.63:30708/repository/test/</url>
</repository>
<!-- <snapshotRepository>-->
<!-- <id>ZT</id>-->
<!-- <name>中铜 ZStack 私服</name>-->
<!-- <url>https://your-nexus.example.com/repository/maven-snapshots/</url>-->
<!-- </snapshotRepository>-->
<snapshotRepository>
<id>ZT-snap</id>
<name>中铜 ZStack 私服</name>
<url>http://172.16.46.63:30708/repository/test-snap/</url>
</snapshotRepository>
</distributionManagement>
<groupId>com.zt.plat</groupId>
<artifactId>zt-dependencies</artifactId>
@@ -26,7 +26,7 @@
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
<properties>
<revision>3.0.46</revision>
<revision>3.0.47-SNAPSHOT</revision>
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
<!-- 统一依赖管理 -->
<spring.boot.version>3.4.5</spring.boot.version>

View File

@@ -25,7 +25,7 @@
<module>zt-spring-boot-starter-job</module>
<module>zt-spring-boot-starter-mq</module>
<module>zt-spring-boot-starter-rpc</module>
<module>zt-spring-boot-starter-seata-dm</module>
<module>zt-spring-boot-starter-excel</module>
<module>zt-spring-boot-starter-test</module>

View File

@@ -40,4 +40,11 @@ public interface PermissionCommonApi {
@Parameter(name = "userId", description = "用户编号", example = "2", required = true)
CommonResult<DeptDataPermissionRespDTO> getDeptDataPermission(@RequestParam("userId") Long userId);
@GetMapping(PREFIX + "/get-dept-data-permission-with-roleCodes")
@Operation(summary = "获得登陆用户的部门数据权限")
@Parameters({
@Parameter(name = "userId", description = "用户编号", example = "2", required = true),
@Parameter(name = "roleCodes", description = "角色编码", example = "2", required = true)
})
CommonResult<DeptDataPermissionRespDTO> getDeptDataPermissionWithRoleCodes(@RequestParam("userId") Long userId, @RequestParam("roleCodes") String roleCodes);
}

View File

@@ -33,7 +33,7 @@ public class BusinessDataPermissionEntityScanner {
*/
private static final Set<String> EXCLUDED_PACKAGE_PREFIXES = Set.of(
"com.zt.plat.module.backendlogistics",
"com.zt.plat.module.erp",
// "com.zt.plat.module.erp",
"com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO");
private final Set<String> basePackages;

View File

@@ -2,6 +2,8 @@ package com.zt.plat.framework.tenant.core.context;
import com.alibaba.ttl.TransmittableThreadLocal;
import java.util.List;
/**
* 部门上下文 Holder使用 {@link TransmittableThreadLocal} 支持在线程池/异步场景下的上下文传递。
*
@@ -15,6 +17,8 @@ public class DeptContextHolder {
private static final ThreadLocal<Long> COMPANY_ID = new TransmittableThreadLocal<>();
/** 是否忽略部门数据权限 */
private static final ThreadLocal<Boolean> IGNORE = new TransmittableThreadLocal<>();
/** 角色编码列表 */
private static final ThreadLocal<List<String>> ROLE_CODE_LIST = new TransmittableThreadLocal<>();
public static Long getDeptId() {
return DEPT_ID.get();
@@ -32,6 +36,12 @@ public class DeptContextHolder {
COMPANY_ID.set(companyId);
}
public static void setContext(Long deptId, Long companyId, List<String> roleCodeList) {
DEPT_ID.set(deptId);
COMPANY_ID.set(companyId);
ROLE_CODE_LIST.set(roleCodeList);
}
public static void setDeptId(Long deptId) {
DEPT_ID.set(deptId);
}
@@ -53,9 +63,20 @@ public class DeptContextHolder {
return Boolean.TRUE.equals(IGNORE.get());
}
public static void setRoleCodeList(List<String> roleCodeList) {
ROLE_CODE_LIST.set(roleCodeList);
}
public static List<String> getRoleCodeList() {
return ROLE_CODE_LIST.get();
}
public static void clearRoleCodeList(){
ROLE_CODE_LIST.remove();
}
public static void clear() {
DEPT_ID.remove();
COMPANY_ID.remove();
IGNORE.remove();
ROLE_CODE_LIST.remove();
}
}

View File

@@ -42,6 +42,9 @@ public class ApiClientCredentialRespVO {
@Schema(description = "匿名访问固定用户昵称", example = "张三")
private String anonymousUserNickname;
@Schema(description = "是否启用加密", example = "true")
private Boolean enableEncryption;
@Schema(description = "创建时间")
private LocalDateTime createTime;

Some files were not shown because too many files have changed in this diff Show More