Compare commits
84 Commits
def2956dae
...
0072234893
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0072234893 | ||
|
|
0ad14fbe73 | ||
|
|
7bd44ffca9 | ||
|
|
3ad65780a6 | ||
|
|
3573217507 | ||
|
|
6ac7511019 | ||
|
|
3970f6d43e | ||
|
|
5d547acfea | ||
|
|
4579259973 | ||
|
|
5f90e7e417 | ||
|
|
b81e8c6df2 | ||
|
|
179c22e409 | ||
|
|
fac16d5e08 | ||
|
|
812e9727ae | ||
|
|
580d1d9047 | ||
|
|
6bdcf8f371 | ||
|
|
8e8acd6aaf | ||
|
|
bca34ea437 | ||
|
|
8b469710ce | ||
|
|
c88fdad7ac | ||
|
|
4d4912db5e | ||
|
|
3c3ac23008 | ||
|
|
26e5952252 | ||
|
|
839e979904 | ||
|
|
91b54cc9d1 | ||
|
|
c9f7495db1 | ||
|
|
1d4380adc1 | ||
|
|
666008e3c6 | ||
|
|
1316d09626 | ||
|
|
1c2e8e1332 | ||
|
|
e6fc24d3b1 | ||
|
|
d9ab32165f | ||
|
|
b698706dad | ||
|
|
09c726d51b | ||
|
|
52f7a8f28b | ||
|
|
ab3104cff7 | ||
|
|
89a047d28b | ||
|
|
3903b73905 | ||
|
|
8823e316a0 | ||
|
|
01847264d5 | ||
|
|
516198ab53 | ||
|
|
7f54e7f07d | ||
|
|
7ef5545dc0 | ||
|
|
9b0e63a33e | ||
|
|
2baede83e5 | ||
|
|
25be319941 | ||
|
|
bf27ebd5ba | ||
|
|
2dc0de96a3 | ||
|
|
0fdfce0626 | ||
|
|
a411da6754 | ||
|
|
9485d94574 | ||
|
|
433e2fb4de | ||
|
|
b9c44ebf91 | ||
|
|
f526dd54b9 | ||
|
|
7e87465ef9 | ||
|
|
2052479728 | ||
|
|
1ac2f1e2cc | ||
|
|
7661982447 | ||
|
|
48660f75cf | ||
|
|
5843e2eb7a | ||
|
|
82ea639cdd | ||
|
|
7b1991cc1c | ||
|
|
cda360572e | ||
|
|
fe1cae483b | ||
|
|
ca87ed3c52 | ||
|
|
3349d18103 | ||
|
|
0ef6ac374b | ||
|
|
79452c02f6 | ||
|
|
b361a07ce6 | ||
|
|
815c595944 | ||
|
|
9c0c4cca33 | ||
|
|
5a2ff28c6f | ||
|
|
aaf5c38b05 | ||
|
|
02208869f0 | ||
|
|
2a16656b7d | ||
|
|
2efa78ed74 | ||
|
|
d688932f6d | ||
|
|
f0b1ec7ca3 | ||
|
|
0bdded447a | ||
|
|
cea886c9b2 | ||
|
|
bdd22ed132 | ||
|
|
494de02d65 | ||
|
|
a86b98b0f5 | ||
|
|
633772f8b1 |
18
pom.xml
18
pom.xml
@@ -32,7 +32,7 @@
|
||||
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
||||
|
||||
<properties>
|
||||
<revision>3.0.45</revision>
|
||||
<revision>3.0.46</revision>
|
||||
<!-- Maven 相关 -->
|
||||
<java.version>17</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
@@ -242,6 +242,19 @@
|
||||
<config.version>1.0.0</config.version>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>klw-dev</id>
|
||||
<properties>
|
||||
<env.name>dev</env.name>
|
||||
<!--Nacos 配置-->
|
||||
<config.server-addr>172.16.46.63:30848</config.server-addr>
|
||||
<config.namespace>klw</config.namespace>
|
||||
<config.group>DEFAULT_GROUP</config.group>
|
||||
<config.username>nacos</config.username>
|
||||
<config.password>P@ssword25</config.password>
|
||||
<config.version>1.0.0</config.version>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>env-prod</id>
|
||||
<properties>
|
||||
@@ -271,7 +284,8 @@
|
||||
<profile>
|
||||
<id>chenbowen</id>
|
||||
<properties>
|
||||
<env.name>local</env.name>
|
||||
<!-- <env.name>local</env.name>-->
|
||||
<env.name>dev</env.name>
|
||||
<!-- <config.server-addr>localhost:8848</config.server-addr>-->
|
||||
<config.server-addr>172.16.46.63:30848</config.server-addr>
|
||||
<config.namespace>chenbowen</config.namespace>
|
||||
|
||||
@@ -120,6 +120,7 @@ CREATE TABLE bpm_process_definition_info (
|
||||
simple_model text NULL,
|
||||
sort bigint DEFAULT 0 NULL,
|
||||
visible bit DEFAULT '1' NOT NULL,
|
||||
restart bit DEFAULT '1' NOT NULL,
|
||||
start_user_ids varchar(256) DEFAULT NULL NULL,
|
||||
start_dept_ids varchar(256) DEFAULT NULL NULL,
|
||||
manager_user_ids varchar(256) DEFAULT NULL NULL,
|
||||
@@ -156,6 +157,7 @@ COMMENT ON COLUMN bpm_process_definition_info.form_custom_view_path IS '自定
|
||||
COMMENT ON COLUMN bpm_process_definition_info.simple_model IS 'SIMPLE 设计器模型数据 JSON 格式';
|
||||
COMMENT ON COLUMN bpm_process_definition_info.sort IS '排序值';
|
||||
COMMENT ON COLUMN bpm_process_definition_info.visible IS '是否可见';
|
||||
COMMENT ON COLUMN bpm_process_definition_info.restart IS '是否允许重新发起';
|
||||
COMMENT ON COLUMN bpm_process_definition_info.start_user_ids IS '可发起用户编号数组';
|
||||
COMMENT ON COLUMN bpm_process_definition_info.start_dept_ids IS '可发起部门编号数组';
|
||||
COMMENT ON COLUMN bpm_process_definition_info.manager_user_ids IS '可管理用户编号数组';
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -19,7 +19,8 @@ CREATE TABLE databus_api_definition_credential (
|
||||
deleted BIT DEFAULT '0' NOT NULL
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX uk_databus_api_definition_credential ON databus_api_definition_credential (api_id, credential_id, deleted);
|
||||
-- 去掉错误的唯一索引逻辑
|
||||
-- CREATE UNIQUE INDEX uk_databus_api_definition_credential ON databus_api_definition_credential (api_id, credential_id, deleted);
|
||||
CREATE INDEX idx_databus_api_definition_credential_api ON databus_api_definition_credential (api_id);
|
||||
CREATE INDEX idx_databus_api_definition_credential_cred ON databus_api_definition_credential (credential_id);
|
||||
|
||||
|
||||
10
sql/dm/流程定义扩展信息表新增字段_20251230.sql
Normal file
10
sql/dm/流程定义扩展信息表新增字段_20251230.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
-- 达梦8数据库DDL脚本
|
||||
-- 为 bpm_process_definition_info 表添加 restart 字段
|
||||
|
||||
-- 是否允许重新发起
|
||||
ALTER TABLE bpm_process_definition_info ADD COLUMN restart bit DEFAULT '1' NOT NULL;
|
||||
|
||||
-- 添加字段注释
|
||||
COMMENT ON COLUMN bpm_process_definition_info.restart IS '是否允许重新发起';
|
||||
|
||||
|
||||
@@ -26,12 +26,13 @@
|
||||
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
||||
|
||||
<properties>
|
||||
<revision>3.0.45</revision>
|
||||
<revision>3.0.46</revision>
|
||||
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
|
||||
<!-- 统一依赖管理 -->
|
||||
<spring.boot.version>3.4.5</spring.boot.version>
|
||||
<spring.cloud.version>2024.0.1</spring.cloud.version>
|
||||
<spring.cloud.alibaba.version>2023.0.3.2</spring.cloud.alibaba.version>
|
||||
<seata.version>2.4.0</seata.version>
|
||||
<!-- Web 相关 -->
|
||||
<springdoc.version>2.8.3</springdoc.version>
|
||||
<knife4j.version>4.6.0</knife4j.version>
|
||||
@@ -133,6 +134,24 @@
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- 分布式事务 Seata (覆盖 Spring Cloud Alibaba 中的 2.1.0 版本) -->
|
||||
<dependency>
|
||||
<groupId>org.apache.seata</groupId>
|
||||
<artifactId>seata-all</artifactId>
|
||||
<version>${seata.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.seata</groupId>
|
||||
<artifactId>seata-spring-boot-starter</artifactId>
|
||||
<version>${seata.version}</version>
|
||||
</dependency>
|
||||
<!-- Seata 达梦数据库补丁 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-seata-dm</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 业务组件 -->
|
||||
<dependency>
|
||||
<groupId>io.github.mouzt</groupId>
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
<module>zt-spring-boot-starter-biz-data-permission</module>
|
||||
<module>zt-spring-boot-starter-biz-ip</module>
|
||||
<module>zt-spring-boot-starter-biz-business</module>
|
||||
<module>zt-spring-boot-starter-seata-dm</module>
|
||||
</modules>
|
||||
|
||||
<artifactId>zt-framework</artifactId>
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.zt.plat.framework.common.util.json.JsonUtils;
|
||||
import com.zt.plat.framework.common.util.spring.SpringUtils;
|
||||
import com.zt.plat.framework.security.core.LoginUser;
|
||||
import com.zt.plat.framework.tenant.core.context.CompanyContextHolder;
|
||||
import com.zt.plat.framework.tenant.core.context.DeptContextHolder;
|
||||
import com.zt.plat.framework.web.core.util.WebFrameworkUtils;
|
||||
import com.zt.plat.module.system.api.dept.DeptApi;
|
||||
import com.zt.plat.module.system.api.dept.dto.CompanyDeptInfoRespDTO;
|
||||
@@ -197,6 +198,9 @@ public class BusinessDeptHandleUtil {
|
||||
}
|
||||
CompanyContextHolder.setIgnore(false);
|
||||
CompanyContextHolder.setCompanyId(Long.valueOf(info.getCompanyId()));
|
||||
DeptContextHolder.setIgnore(false);
|
||||
DeptContextHolder.setCompanyId(Long.valueOf(info.getCompanyId()));
|
||||
DeptContextHolder.setDeptId(Long.valueOf(info.getDeptId()));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import org.springframework.boot.autoconfigure.AutoConfigurationPackages;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
@@ -18,14 +20,12 @@ import java.util.Set;
|
||||
public class BusinessDataPermissionConfiguration {
|
||||
|
||||
@Bean
|
||||
public BusinessDataPermissionEntityScanner businessDataPermissionEntityScanner(BeanFactory beanFactory, ApplicationContext applicationContext) {
|
||||
public BusinessDataPermissionEntityScanner businessDataPermissionEntityScanner(BeanFactory beanFactory, ApplicationContext applicationContext, Environment environment) {
|
||||
Set<String> basePackages = new LinkedHashSet<>();
|
||||
addConfiguredBasePackages(environment, basePackages);
|
||||
if (AutoConfigurationPackages.has(beanFactory)) {
|
||||
basePackages.addAll(AutoConfigurationPackages.get(beanFactory));
|
||||
}
|
||||
if (basePackages.isEmpty()) {
|
||||
basePackages.add("com.zt");
|
||||
}
|
||||
ClassLoader classLoader = applicationContext != null
|
||||
? applicationContext.getClassLoader()
|
||||
: Thread.currentThread().getContextClassLoader();
|
||||
@@ -35,6 +35,21 @@ public class BusinessDataPermissionConfiguration {
|
||||
return new BusinessDataPermissionEntityScanner(basePackages, classLoader);
|
||||
}
|
||||
|
||||
private void addConfiguredBasePackages(Environment environment, Set<String> basePackages) {
|
||||
if (environment == null) {
|
||||
return;
|
||||
}
|
||||
String configured = environment.getProperty("zt.info.base-package");
|
||||
if (!StringUtils.hasText(configured)) {
|
||||
return;
|
||||
}
|
||||
for (String pkg : configured.split("[,;\\s]+")) {
|
||||
if (StringUtils.hasText(pkg)) {
|
||||
basePackages.add(pkg.trim());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Bean
|
||||
public CompanyDataPermissionRuleCustomizer autoCompanyDataPermissionRuleCustomizer(BusinessDataPermissionEntityScanner scanner) {
|
||||
return rule -> scanner.getEntityMetadata().forEach(metadata -> {
|
||||
|
||||
@@ -28,6 +28,14 @@ import java.util.*;
|
||||
@Slf4j
|
||||
public class BusinessDataPermissionEntityScanner {
|
||||
|
||||
/**
|
||||
* 临时排除的包前缀(物流模块 DO,不参与数据权限扫描)
|
||||
*/
|
||||
private static final Set<String> EXCLUDED_PACKAGE_PREFIXES = Set.of(
|
||||
"com.zt.plat.module.backendlogistics",
|
||||
"com.zt.plat.module.erp",
|
||||
"com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO");
|
||||
|
||||
private final Set<String> basePackages;
|
||||
private final ClassLoader classLoader;
|
||||
|
||||
@@ -70,6 +78,9 @@ public class BusinessDataPermissionEntityScanner {
|
||||
if (!StringUtils.hasText(className)) {
|
||||
continue;
|
||||
}
|
||||
if (isExcludedPackage(className)) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
Class<?> clazz = ClassUtils.forName(className, classLoader);
|
||||
if (clazz == BusinessBaseDO.class || !BusinessBaseDO.class.isAssignableFrom(clazz)) {
|
||||
@@ -92,6 +103,15 @@ public class BusinessDataPermissionEntityScanner {
|
||||
return new ArrayList<>(metadataMap.values());
|
||||
}
|
||||
|
||||
private boolean isExcludedPackage(String className) {
|
||||
for (String prefix : EXCLUDED_PACKAGE_PREFIXES) {
|
||||
if (className.startsWith(prefix)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private EntityMetadata buildMetadata(Class<? extends BusinessBaseDO> entityClass) {
|
||||
String tableName = resolveTableName(entityClass);
|
||||
if (!StringUtils.hasText(tableName)) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user