Merge jygk/dsc/test into local test, re-implement file presigned URL cache

This commit is contained in:
wuzongyong
2026-01-08 10:02:01 +08:00
278 changed files with 2745 additions and 1032 deletions

View File

@@ -1,35 +1,57 @@
# zt-gateway
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: ns-f16a3067ca7b434aad127d15eac82503
name: zt-gateway
labels:
app: zt-gateway
spec:
replicas: 1
selector:
matchLabels:
app: zt-gateway
template:
metadata:
labels:
app: zt-gateway
spec:
containers:
- name: zt-gateway
image: 172.16.46.66:10043/zt/zt-gateway:VERSION_PLACEHOLDER
imagePullPolicy: Always
env:
- name: TZ
value: Asia/Shanghai
ports:
- containerPort: 48080
---
## zt-gateway
#apiVersion: apps/v1
#kind: Deployment
#metadata:
# namespace: ns-d6a0e78ebd674c279614498e4c57b133
# name: zt-gateway
# labels:
# app: zt-gateway
#spec:
# replicas: 1
# selector:
# matchLabels:
# app: zt-gateway
# template:
# metadata:
# labels:
# app: zt-gateway
# spec:
# containers:
# - name: zt-gateway
# image: 172.16.46.66:10043/zt/zt-gateway:VERSION_PLACEHOLDER
# imagePullPolicy: Always
# env:
# - name: TZ
# value: Asia/Shanghai
# ports:
# - containerPort: 48080
# readinessProbe:
# httpGet:
# path: /actuator/health
# port: 48080
# initialDelaySeconds: 50
# periodSeconds: 5
# failureThreshold: 3
# livenessProbe:
# httpGet:
# path: /actuator/health
# port: 48080
# initialDelaySeconds: 50
# periodSeconds: 10
# failureThreshold: 5
# resources:
# requests:
# cpu: "500m"
# memory: "1024Mi"
# limits:
# cpu: "1024m"
# memory: "2048Mi"
# terminationGracePeriodSeconds: 30
#---
apiVersion: v1
kind: Service
metadata:
namespace: ns-f16a3067ca7b434aad127d15eac82503
namespace: ns-d6a0e78ebd674c279614498e4c57b133
name: zt-gateway
spec:
type: NodePort
@@ -45,7 +67,7 @@ spec:
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: ns-f16a3067ca7b434aad127d15eac82503
namespace: ns-d6a0e78ebd674c279614498e4c57b133
name: zt-module-infra
labels:
app: zt-module-infra
@@ -54,7 +76,7 @@ metadata:
description: DESC_PLACEHOLDER
rollout.kubernetes.io/change-cause: "DESC_PLACEHOLDER:VERSION_PLACEHOLDER"
spec:
replicas: 1
replicas: 2
selector:
matchLabels:
app: zt-module-infra
@@ -63,6 +85,11 @@ spec:
labels:
app: zt-module-infra
spec:
dnsPolicy: None
dnsConfig:
nameservers:
- "172.16.36.16"
- "172.16.36.220"
containers:
- name: zt-module-infra
image: 172.16.46.66:10043/zt/zt-module-infra:VERSION_PLACEHOLDER
@@ -74,16 +101,23 @@ spec:
httpGet:
path: /actuator/health
port: 48082
initialDelaySeconds: 10
initialDelaySeconds: 50
periodSeconds: 5
failureThreshold: 3
livenessProbe:
httpGet:
path: /actuator/health
port: 48082
initialDelaySeconds: 30
initialDelaySeconds: 50
periodSeconds: 10
failureThreshold: 5
resources:
requests:
cpu: "500m"
memory: "1024Mi"
limits:
cpu: "1024m"
memory: "2048Mi"
terminationGracePeriodSeconds: 30
strategy:
type: RollingUpdate
@@ -94,22 +128,23 @@ spec:
apiVersion: v1
kind: Service
metadata:
namespace: ns-f16a3067ca7b434aad127d15eac82503
namespace: ns-d6a0e78ebd674c279614498e4c57b133
name: zt-module-infra
spec:
type: ClusterIP
type: NodePort
selector:
app: zt-module-infra
ports:
- protocol: TCP
port: 48082
targetPort: 48082
nodePort: 30092
---
# zt-module-system
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: ns-f16a3067ca7b434aad127d15eac82503
namespace: ns-d6a0e78ebd674c279614498e4c57b133
name: zt-module-system
labels:
app: zt-module-system
@@ -127,6 +162,20 @@ spec:
labels:
app: zt-module-system
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- node-3
dnsPolicy: None
dnsConfig:
nameservers:
- "172.16.36.16"
- "172.16.36.220"
containers:
- name: zt-module-system
image: 172.16.46.66:10043/zt/zt-module-system:VERSION_PLACEHOLDER
@@ -138,16 +187,23 @@ spec:
httpGet:
path: /actuator/health
port: 48081
initialDelaySeconds: 10
initialDelaySeconds: 50
periodSeconds: 5
failureThreshold: 3
livenessProbe:
httpGet:
path: /actuator/health
port: 48081
initialDelaySeconds: 30
initialDelaySeconds: 50
periodSeconds: 10
failureThreshold: 5
resources:
requests:
cpu: "500m"
memory: "1024Mi"
limits:
cpu: "1024m"
memory: "2048Mi"
terminationGracePeriodSeconds: 30
strategy:
type: RollingUpdate
@@ -158,150 +214,167 @@ spec:
apiVersion: v1
kind: Service
metadata:
namespace: ns-f16a3067ca7b434aad127d15eac82503
namespace: ns-d6a0e78ebd674c279614498e4c57b133
name: zt-module-system
spec:
type: ClusterIP
type: NodePort
selector:
app: zt-module-system
ports:
- protocol: TCP
port: 48081
targetPort: 48081
nodePort: 30091
---
# zt-module-bpm
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: ns-f16a3067ca7b434aad127d15eac82503
name: zt-module-bpm
labels:
app: zt-module-bpm
annotations:
version: "VERSION_PLACEHOLDER"
description: DESC_PLACEHOLDER
rollout.kubernetes.io/change-cause: "DESC_PLACEHOLDER:VERSION_PLACEHOLDER"
spec:
replicas: 1
selector:
matchLabels:
app: zt-module-bpm
template:
metadata:
labels:
app: zt-module-bpm
spec:
containers:
- name: zt-module-bpm
image: 172.16.46.66:10043/zt/zt-module-bpm:VERSION_PLACEHOLDER
imagePullPolicy: Always
env:
- name: TZ
value: Asia/Shanghai
readinessProbe:
httpGet:
path: /actuator/health
port: 48083
initialDelaySeconds: 10
periodSeconds: 5
failureThreshold: 3
livenessProbe:
httpGet:
path: /actuator/health
port: 48083
initialDelaySeconds: 30
periodSeconds: 10
failureThreshold: 5
terminationGracePeriodSeconds: 30
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
---
apiVersion: v1
kind: Service
metadata:
namespace: ns-f16a3067ca7b434aad127d15eac82503
name: zt-module-bpm
spec:
type: ClusterIP
selector:
app: zt-module-bpm
ports:
- protocol: TCP
port: 48083
targetPort: 48083
#apiVersion: apps/v1
#kind: Deployment
#metadata:
# namespace: ns-d6a0e78ebd674c279614498e4c57b133
# name: zt-module-bpm
# labels:
# app: zt-module-bpm
# annotations:
# version: "VERSION_PLACEHOLDER"
# description: DESC_PLACEHOLDER
# rollout.kubernetes.io/change-cause: "DESC_PLACEHOLDER:VERSION_PLACEHOLDER"
#spec:
# replicas: 1
# selector:
# matchLabels:
# app: zt-module-bpm
# template:
# metadata:
# labels:
# app: zt-module-bpm
# spec:
# containers:
# - name: zt-module-bpm
# image: 172.16.46.66:10043/zt/zt-module-bpm:VERSION_PLACEHOLDER
# imagePullPolicy: Always
# env:
# - name: TZ
# value: Asia/Shanghai
# readinessProbe:
# httpGet:
# path: /actuator/health
# port: 48083
# initialDelaySeconds: 50
# periodSeconds: 5
# failureThreshold: 3
# livenessProbe:
# httpGet:
# path: /actuator/health
# port: 48083
# initialDelaySeconds: 50
# periodSeconds: 10
# failureThreshold: 5
# resources:
# requests:
# cpu: "500m"
# memory: "1024Mi"
# limits:
# cpu: "2048m"
# memory: "2048Mi"
# terminationGracePeriodSeconds: 30
# strategy:
# type: RollingUpdate
# rollingUpdate:
# maxSurge: 1
# maxUnavailable: 0
#---
#apiVersion: v1
#kind: Service
#metadata:
# namespace: ns-d6a0e78ebd674c279614498e4c57b133
# name: zt-module-bpm
#spec:
# type: NodePort
# selector:
# app: zt-module-bpm
# ports:
# - protocol: TCP
# port: 48083
# targetPort: 48083
# nodePort: 30093
---
# zt-module-report
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: ns-f16a3067ca7b434aad127d15eac82503
name: zt-module-report
labels:
app: zt-module-report
annotations:
version: "VERSION_PLACEHOLDER"
description: DESC_PLACEHOLDER
rollout.kubernetes.io/change-cause: "DESC_PLACEHOLDER:VERSION_PLACEHOLDER"
spec:
replicas: 1
selector:
matchLabels:
app: zt-module-report
template:
metadata:
labels:
app: zt-module-report
spec:
containers:
- name: zt-module-report
image: 172.16.46.66:10043/zt/zt-module-report:VERSION_PLACEHOLDER
imagePullPolicy: Always
env:
- name: TZ
value: Asia/Shanghai
readinessProbe:
httpGet:
path: /actuator/health
port: 48084
initialDelaySeconds: 10
periodSeconds: 5
failureThreshold: 3
livenessProbe:
httpGet:
path: /actuator/health
port: 48084
initialDelaySeconds: 30
periodSeconds: 10
failureThreshold: 5
terminationGracePeriodSeconds: 30
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
---
apiVersion: v1
kind: Service
metadata:
namespace: ns-f16a3067ca7b434aad127d15eac82503
name: zt-module-report
spec:
type: ClusterIP
selector:
app: zt-module-report
ports:
- protocol: TCP
port: 48084
targetPort: 48084
#apiVersion: apps/v1
#kind: Deployment
#metadata:
# namespace: ns-d6a0e78ebd674c279614498e4c57b133
# name: zt-module-report
# labels:
# app: zt-module-report
# annotations:
# version: "VERSION_PLACEHOLDER"
# description: DESC_PLACEHOLDER
# rollout.kubernetes.io/change-cause: "DESC_PLACEHOLDER:VERSION_PLACEHOLDER"
#spec:
# replicas: 1
# selector:
# matchLabels:
# app: zt-module-report
# template:
# metadata:
# labels:
# app: zt-module-report
# spec:
# containers:
# - name: zt-module-report
# image: 172.16.46.66:10043/zt/zt-module-report:VERSION_PLACEHOLDER
# imagePullPolicy: Always
# env:
# - name: TZ
# value: Asia/Shanghai
# readinessProbe:
# httpGet:
# path: /actuator/health
# port: 48084
# initialDelaySeconds: 50
# periodSeconds: 5
# failureThreshold: 3
# livenessProbe:
# httpGet:
# path: /actuator/health
# port: 48084
# initialDelaySeconds: 50
# periodSeconds: 10
# failureThreshold: 5
# resources:
# requests:
# cpu: "500m"
# memory: "1024Mi"
# limits:
# cpu: "2048m"
# memory: "2048Mi"
# terminationGracePeriodSeconds: 30
# strategy:
# type: RollingUpdate
# rollingUpdate:
# maxSurge: 1
# maxUnavailable: 0
#---
#apiVersion: v1
#kind: Service
#metadata:
# namespace: ns-d6a0e78ebd674c279614498e4c57b133
# name: zt-module-report
#spec:
# type: NodePort
# selector:
# app: zt-module-report
# ports:
# - protocol: TCP
# port: 48084
# targetPort: 48084
# nodePort: 30094
---
# zt-module-databus
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: ns-f16a3067ca7b434aad127d15eac82503
namespace: ns-d6a0e78ebd674c279614498e4c57b133
name: zt-module-databus
labels:
app: zt-module-databus
@@ -319,6 +392,20 @@ spec:
labels:
app: zt-module-databus
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- node-3
dnsPolicy: None
dnsConfig:
nameservers:
- "172.16.36.16"
- "172.16.36.220"
containers:
- name: zt-module-databus
image: 172.16.46.66:10043/zt/zt-module-databus:VERSION_PLACEHOLDER
@@ -330,16 +417,23 @@ spec:
httpGet:
path: /actuator/health
port: 48100
initialDelaySeconds: 10
initialDelaySeconds: 50
periodSeconds: 5
failureThreshold: 3
livenessProbe:
httpGet:
path: /actuator/health
port: 48100
initialDelaySeconds: 30
initialDelaySeconds: 50
periodSeconds: 10
failureThreshold: 5
resources:
requests:
cpu: "500m"
memory: "1024Mi"
limits:
cpu: "700m"
memory: "2048Mi"
terminationGracePeriodSeconds: 30
strategy:
type: RollingUpdate
@@ -350,13 +444,93 @@ spec:
apiVersion: v1
kind: Service
metadata:
namespace: ns-f16a3067ca7b434aad127d15eac82503
namespace: ns-d6a0e78ebd674c279614498e4c57b133
name: zt-module-databus
spec:
type: ClusterIP
type: NodePort
selector:
app: zt-module-databus
ports:
- protocol: TCP
port: 48100
targetPort: 48100
nodePort: 30090
---
# zt-module-template
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: ns-d6a0e78ebd674c279614498e4c57b133
name: zt-module-template
labels:
app: zt-module-template
annotations:
version: "VERSION_PLACEHOLDER"
description: DESC_PLACEHOLDER
rollout.kubernetes.io/change-cause: "DESC_PLACEHOLDER:VERSION_PLACEHOLDER"
spec:
replicas: 1
selector:
matchLabels:
app: zt-module-template
template:
metadata:
labels:
app: zt-module-template
spec:
dnsPolicy: None
dnsConfig:
nameservers:
- "172.16.36.16"
- "172.16.36.220"
containers:
- name: zt-module-template
image: 172.16.46.66:10043/zt/zt-module-template:VERSION_PLACEHOLDER
imagePullPolicy: Always
env:
- name: TZ
value: Asia/Shanghai
readinessProbe:
httpGet:
path: /actuator/health
port: 49100
initialDelaySeconds: 50
periodSeconds: 5
failureThreshold: 3
livenessProbe:
httpGet:
path: /actuator/health
port: 49100
initialDelaySeconds: 50
periodSeconds: 10
failureThreshold: 5
resources:
requests:
cpu: "500m"
memory: "1024Mi"
limits:
cpu: "700m"
memory: "1024Mi"
terminationGracePeriodSeconds: 30
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
---
apiVersion: v1
kind: Service
metadata:
namespace: ns-d6a0e78ebd674c279614498e4c57b133
name: zt-module-template
spec:
type: NodePort
selector:
app: zt-module-template
ports:
- protocol: TCP
port: 49100
targetPort: 49100
nodePort: 30889

17
pom.xml
View File

@@ -16,9 +16,9 @@
<!-- 各种 module 拓展 -->
<module>zt-module-system</module>
<module>zt-module-infra</module>
<module>zt-module-bpm</module>
<!-- <module>zt-module-bpm</module>-->
<module>zt-module-report</module>
<!-- <module>zt-module-mp</module>-->
<!--<module>zt-module-mp</module>-->
<!-- <module>zt-module-ai</module>-->
<module>zt-module-template</module>
<!-- <module>zt-module-iot</module>-->
@@ -295,6 +295,19 @@
<config.version>1.0.0</config.version>
</properties>
</profile>
<profile>
<id>qsj</id>
<properties>
<env.name>dev</env.name>
<!--Nacos 配置-->
<config.server-addr>172.16.46.63:30848</config.server-addr>
<config.namespace>qsj</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>
</profiles>
</project>

144
sql/dm/doc_management.sql Normal file
View File

@@ -0,0 +1,144 @@
/*
Zt Database Transfer Tool
Source Server Type : MySQL
Target Server Type : DM8
Date: 2025-08-29 10:32:27
*/
-- ----------------------------
-- Table structure for infra_doc_file
-- ----------------------------
CREATE TABLE infra_doc_file (
id bigint NOT NULL PRIMARY KEY,
title varchar(255) NOT NULL,
file_id bigint DEFAULT NULL NULL,
file_type varchar(10) NOT NULL,
space_type smallint DEFAULT '1' NOT NULL,
description varchar(500) DEFAULT NULL NULL,
latest_version_id bigint DEFAULT NULL NULL,
owner_user_id bigint NOT NULL,
status smallint DEFAULT '1' NOT NULL,
creator varchar(64) DEFAULT '' NULL,
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,
tenant_id bigint DEFAULT '0' NOT NULL
);
CREATE INDEX idx_infra_doc_file_01 ON infra_doc_file (owner_user_id);
CREATE INDEX idx_infra_doc_file_02 ON infra_doc_file (space_type);
CREATE INDEX idx_infra_doc_file_03 ON infra_doc_file (file_type);
COMMENT ON COLUMN infra_doc_file.id IS '文档编号';
COMMENT ON COLUMN infra_doc_file.title IS '文档标题';
COMMENT ON COLUMN infra_doc_file.file_id IS '文件编号';
COMMENT ON COLUMN infra_doc_file.file_type IS '文件类型(docx/xlsx/pptx/pdf)';
COMMENT ON COLUMN infra_doc_file.space_type IS '空间类型(1-个人空间 2-团队空间)';
COMMENT ON COLUMN infra_doc_file.description IS '文档描述';
COMMENT ON COLUMN infra_doc_file.latest_version_id IS '最新版本编号';
COMMENT ON COLUMN infra_doc_file.owner_user_id IS '所有者用户编号';
COMMENT ON COLUMN infra_doc_file.status IS '状态(0-禁用 1-启用)';
COMMENT ON COLUMN infra_doc_file.creator IS '创建者';
COMMENT ON COLUMN infra_doc_file.create_time IS '创建时间';
COMMENT ON COLUMN infra_doc_file.updater IS '更新者';
COMMENT ON COLUMN infra_doc_file.update_time IS '更新时间';
COMMENT ON COLUMN infra_doc_file.deleted IS '是否删除';
COMMENT ON COLUMN infra_doc_file.tenant_id IS '租户编号';
COMMENT ON TABLE infra_doc_file IS '在线文档表';
-- ----------------------------
-- Table structure for infra_doc_file_version
-- ----------------------------
CREATE TABLE infra_doc_file_version (
id bigint NOT NULL PRIMARY KEY,
doc_file_id bigint NOT NULL,
version_no varchar(50) NOT NULL,
file_id bigint NOT NULL,
change_description varchar(500) DEFAULT NULL NULL,
creator varchar(64) DEFAULT '' NULL,
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,
tenant_id bigint DEFAULT '0' NOT NULL
);
CREATE INDEX idx_infra_doc_file_version_01 ON infra_doc_file_version (doc_file_id);
CREATE INDEX idx_infra_doc_file_version_02 ON infra_doc_file_version (version_no);
COMMENT ON COLUMN infra_doc_file_version.id IS '版本编号';
COMMENT ON COLUMN infra_doc_file_version.doc_file_id IS '文档编号';
COMMENT ON COLUMN infra_doc_file_version.version_no IS '版本号';
COMMENT ON COLUMN infra_doc_file_version.file_id IS '文件编号';
COMMENT ON COLUMN infra_doc_file_version.change_description IS '变更说明';
COMMENT ON COLUMN infra_doc_file_version.creator IS '创建者';
COMMENT ON COLUMN infra_doc_file_version.create_time IS '创建时间';
COMMENT ON COLUMN infra_doc_file_version.updater IS '更新者';
COMMENT ON COLUMN infra_doc_file_version.update_time IS '更新时间';
COMMENT ON COLUMN infra_doc_file_version.deleted IS '是否删除';
COMMENT ON COLUMN infra_doc_file_version.tenant_id IS '租户编号';
COMMENT ON TABLE infra_doc_file_version IS '文档版本表';
-- ----------------------------
-- Table structure for infra_doc_file_permission
-- ----------------------------
CREATE TABLE infra_doc_file_permission (
id bigint NOT NULL PRIMARY KEY,
doc_file_id bigint NOT NULL,
role_id bigint NOT NULL,
permission_type smallint DEFAULT '1' NOT NULL,
expire_time datetime DEFAULT NULL NULL,
creator varchar(64) DEFAULT '' NULL,
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,
tenant_id bigint DEFAULT '0' NOT NULL
);
CREATE INDEX idx_infra_doc_file_permission_01 ON infra_doc_file_permission (role_id);
COMMENT ON COLUMN infra_doc_file_permission.id IS '权限编号';
COMMENT ON COLUMN infra_doc_file_permission.doc_file_id IS '文档编号';
COMMENT ON COLUMN infra_doc_file_permission.role_id IS '角色编号';
COMMENT ON COLUMN infra_doc_file_permission.permission_type IS '权限类型(1-只读 2-编辑 3-管理)';
COMMENT ON COLUMN infra_doc_file_permission.expire_time IS '过期时间';
COMMENT ON COLUMN infra_doc_file_permission.creator IS '创建者';
COMMENT ON COLUMN infra_doc_file_permission.create_time IS '创建时间';
COMMENT ON COLUMN infra_doc_file_permission.updater IS '更新者';
COMMENT ON COLUMN infra_doc_file_permission.update_time IS '更新时间';
COMMENT ON COLUMN infra_doc_file_permission.deleted IS '是否删除';
COMMENT ON COLUMN infra_doc_file_permission.tenant_id IS '租户编号';
COMMENT ON TABLE infra_doc_file_permission IS '文档权限表';
-- ----------------------------
-- Table structure for infra_doc_edit_history
-- ----------------------------
CREATE TABLE infra_doc_edit_history (
id bigint NOT NULL PRIMARY KEY,
doc_file_id bigint NOT NULL,
user_id bigint NOT NULL,
user_name varchar(100) NOT NULL,
edit_type smallint DEFAULT '1' NOT NULL,
description varchar(500) DEFAULT NULL NULL,
create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
tenant_id bigint DEFAULT '0' NOT NULL
);
CREATE INDEX idx_infra_doc_edit_history_01 ON infra_doc_edit_history (doc_file_id);
CREATE INDEX idx_infra_doc_edit_history_02 ON infra_doc_edit_history (user_id);
COMMENT ON COLUMN infra_doc_edit_history.id IS '历史编号';
COMMENT ON COLUMN infra_doc_edit_history.doc_file_id IS '文档编号';
COMMENT ON COLUMN infra_doc_edit_history.user_id IS '编辑用户编号';
COMMENT ON COLUMN infra_doc_edit_history.user_name IS '编辑用户名称';
COMMENT ON COLUMN infra_doc_edit_history.edit_type IS '编辑类型(1-创建 2-编辑 3-删除 4-重命名)';
COMMENT ON COLUMN infra_doc_edit_history.description IS '操作描述';
COMMENT ON COLUMN infra_doc_edit_history.create_time IS '创建时间';
COMMENT ON COLUMN infra_doc_edit_history.tenant_id IS '租户编号';
COMMENT ON TABLE infra_doc_edit_history IS '文档编辑历史表';

View File

@@ -0,0 +1,39 @@
-- 在线文档管理功能菜单数据DM 格式)
-- 说明:达梦脚本使用与 patch.sql 相同的精简列形式,省略布尔列与时间列,使用默认值。
-- 清理旧数据,保持可重复执行
DELETE FROM system_menu WHERE id IN (6000,6001,6002,600101,600102,600103,600104,600105,600106,600107,600108,600109,600110);
-- 顶级目录(父级假定已存在 id=2 的“基础设施/Infra”或同级目录
INSERT INTO system_menu (
id, name, permission, type, sort, parent_id,
path, icon, component, status, component_name
) VALUES (
6000, '在线文档', '', 1, 15, 2,
'doc', 'fa:file-text-o', '', 0, NULL
);
-- 文档管理主页面
INSERT INTO system_menu (
id, name, permission, type, sort, parent_id,
path, icon, component, status, component_name
) VALUES (
6001, '文档管理', 'infra:doc:query', 2, 1, 6000,
'doc-file', 'fa:file-text', 'infra/doc/index', 0, 'DocFile'
);
-- 按钮权限(操作项)
INSERT INTO system_menu (
id, name, permission, type, sort, parent_id,
path, icon, component, status
) VALUES
(600101,'文档查询','infra:doc:query',3,1,6001,'','','',0),
(600102,'文档创建','infra:doc:create',3,2,6001,'','','',0),
(600103,'文档更新','infra:doc:update',3,3,6001,'','','',0),
(600104,'文档删除','infra:doc:delete',3,4,6001,'','','',0),
(600105,'文档导出','infra:doc:export',3,5,6001,'','','',0),
(600106,'文档上传','infra:doc:upload',3,6,6001,'','','',0),
(600107,'文档编辑','infra:doc:edit',3,7,6001,'','','',0),
(600108,'文档预览','infra:doc:preview',3,8,6001,'','','',0),
(600109,'文档下载','infra:doc:download',3,9,6001,'','','',0),
(600110,'权限管理','infra:doc:permission',3,10,6001,'','','',0);

View File

@@ -0,0 +1,83 @@
/*
Zt Database Transfer Tool
Source Server Type : MySQL
Target Server Type : DM8
Date: 2025-08-28 14:12:23
*/
-- ----------------------------
-- Table structure for system_sync_log
-- ----------------------------
CREATE TABLE system_sync_log (
id bigint NOT NULL PRIMARY KEY,
bim_request_id varchar(64) DEFAULT '' NULL,
service_name varchar(100) NOT NULL,
request_method varchar(16) DEFAULT 'POST' NOT NULL,
request_url varchar(500) NOT NULL,
client_ip varchar(50) NOT NULL,
user_agent varchar(512) DEFAULT NULL NULL,
request_time datetime NOT NULL,
response_time datetime DEFAULT NULL NULL,
duration bigint DEFAULT NULL NULL,
encrypted_request text NOT NULL,
decrypted_request text NULL,
status smallint DEFAULT 0 NOT NULL,
error_code varchar(100) DEFAULT NULL NULL,
error_message varchar(1000) DEFAULT NULL NULL,
exception_stack text NULL,
response_data text NULL,
encrypted_response text NULL,
auth_user varchar(100) DEFAULT NULL NULL,
decrypt_status smallint DEFAULT 0 NOT NULL,
signature_verify_status smallint DEFAULT 0 NOT NULL,
auth_status smallint DEFAULT 0 NOT NULL,
business_result varchar(100) DEFAULT NULL NULL,
extra text NULL,
creator varchar(64) DEFAULT '' NULL,
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
);
CREATE INDEX idx_system_sync_log_01 ON system_sync_log (bim_request_id);
CREATE INDEX idx_system_sync_log_02 ON system_sync_log (service_name);
CREATE INDEX idx_system_sync_log_03 ON system_sync_log (request_time);
CREATE INDEX idx_system_sync_log_04 ON system_sync_log (status);
CREATE INDEX idx_system_sync_log_05 ON system_sync_log (client_ip);
CREATE INDEX idx_system_sync_log_06 ON system_sync_log (auth_user);
COMMENT ON COLUMN system_sync_log.id IS '日志主键';
COMMENT ON COLUMN system_sync_log.bim_request_id IS '外部请求ID';
COMMENT ON COLUMN system_sync_log.service_name IS '接口名称/服务名称';
COMMENT ON COLUMN system_sync_log.request_method IS '请求方法';
COMMENT ON COLUMN system_sync_log.request_url IS '请求URL';
COMMENT ON COLUMN system_sync_log.client_ip IS '客户端IP地址';
COMMENT ON COLUMN system_sync_log.user_agent IS '用户代理字符串';
COMMENT ON COLUMN system_sync_log.request_time IS '请求开始时间';
COMMENT ON COLUMN system_sync_log.response_time IS '请求结束时间';
COMMENT ON COLUMN system_sync_log.duration IS '请求处理耗时(毫秒)';
COMMENT ON COLUMN system_sync_log.encrypted_request IS '原始加密请求体';
COMMENT ON COLUMN system_sync_log.decrypted_request IS '解密后的请求体';
COMMENT ON COLUMN system_sync_log.status IS '响应状态 0-成功 1-解密失败 2-签名验证失败 3-认证失败 4-业务处理失败 5-系统异常';
COMMENT ON COLUMN system_sync_log.error_code IS '错误码';
COMMENT ON COLUMN system_sync_log.error_message IS '错误信息';
COMMENT ON COLUMN system_sync_log.exception_stack IS '异常堆栈';
COMMENT ON COLUMN system_sync_log.response_data IS '响应数据(加密前)';
COMMENT ON COLUMN system_sync_log.encrypted_response IS '加密后的响应数据';
COMMENT ON COLUMN system_sync_log.auth_user IS '认证用户';
COMMENT ON COLUMN system_sync_log.decrypt_status IS '解密状态 0-成功 1-失败';
COMMENT ON COLUMN system_sync_log.signature_verify_status IS '签名验证状态 0-成功 1-失败';
COMMENT ON COLUMN system_sync_log.auth_status IS '认证状态 0-成功 1-失败';
COMMENT ON COLUMN system_sync_log.business_result IS '业务处理结果';
COMMENT ON COLUMN system_sync_log.extra IS '额外信息';
COMMENT ON COLUMN system_sync_log.creator IS '创建者';
COMMENT ON COLUMN system_sync_log.create_time IS '创建时间';
COMMENT ON COLUMN system_sync_log.updater IS '更新者';
COMMENT ON COLUMN system_sync_log.update_time IS '更新时间';
COMMENT ON COLUMN system_sync_log.deleted IS '是否删除';
COMMENT ON TABLE system_sync_log IS '同步接口调用日志表';

View File

@@ -0,0 +1,44 @@
-- 工艺工序页面菜单与权限初始化脚本DM8
-- 默认挂载在基础数据目录parent_id = 6200如需调整请修改 parent_id。
DELETE FROM system_menu
WHERE id IN (6207, 620701, 620702, 620703, 620704, 620705);
INSERT INTO system_menu (
id, name, permission, type, sort, parent_id,
path, icon, component, component_name,
status, visible, keep_alive, always_show,
creator, create_time, updater, update_time, deleted
) VALUES (
6207, '工艺工序', 'base:processing-infomation-operation:query', 2, 70, 6200,
'processing-infomation-operation', 'ep:operation', 'base/processinginfomationoperation/index', 'ProcessingInfomationOperation',
0, '1', '0', '1',
'admin', CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP, '0'
);
INSERT INTO system_menu (
id, name, permission, type, sort, parent_id,
path, icon, component, component_name,
status, visible, keep_alive, always_show,
creator, create_time, updater, update_time, deleted
) VALUES
(620701, '工艺工序查询', 'base:processing-infomation-operation:query', 3, 1, 6207,
'', '', '', '',
0, '1', '1', '1',
'admin', CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP, '0'),
(620702, '工艺工序创建', 'base:processing-infomation-operation:create', 3, 2, 6207,
'', '', '', '',
0, '1', '1', '1',
'admin', CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP, '0'),
(620703, '工艺工序更新', 'base:processing-infomation-operation:update', 3, 3, 6207,
'', '', '', '',
0, '1', '1', '1',
'admin', CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP, '0'),
(620704, '工艺工序删除', 'base:processing-infomation-operation:delete', 3, 4, 6207,
'', '', '', '',
0, '1', '1', '1',
'admin', CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP, '0'),
(620705, '工艺工序导出', 'base:processing-infomation-operation:export', 3, 5, 6207,
'', '', '', '',
0, '1', '1', '1',
'admin', CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP, '0');

View File

@@ -0,0 +1,8 @@
-- ---------------------------------------------------------------------------
-- 脚本名称 : 组织物料状态字段补充_20251105.sql
-- 适用数据库 : DM8
-- 变更目的 : 为 bse_dept_mtrl 表补充状态字段 STS解决查询时列不存在的问题
-- 影响说明 : 仅新增并初始化 STS 字段,默认值为 '1'(有效)
-- 执行前请先确认已备份相关数据
-- ---------------------------------------------------------------------------
ALTER TABLE BSE_DEPT_MTRL ADD STS VARCHAR2(5) DEFAULT '0';

View File

@@ -282,15 +282,15 @@ CREATE TABLE `infra_file_config` (
-- Records of infra_file_config
-- ----------------------------
BEGIN;
INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (4, '数据库(示例)', 1, '我是数据库', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.db.DBFileClientConfig\",\"domain\":\"http://127.0.0.1:48080\"}', '1', '2022-03-15 23:56:24', '1', '2025-05-02 18:30:28', b'0');
INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (22, '七牛存储器(示例)', 20, '请换成你自己的密钥!!!', b'1', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"s3.cn-south-1.qiniucs.com\",\"domain\":\"http://test.yudao.iocoder.cn\",\"bucket\":\"ruoyi-vue-pro\",\"accessKey\":\"3TvrJ70gl2Gt6IBe7_IZT1F6i_k0iMuRtyEv4EyS\",\"accessSecret\":\"wd0tbVBYlp0S-ihA8Qg2hPLncoP83wyrIq24OZuY\",\"enablePathStyleAccess\":false}', '1', '2024-01-13 22:11:12', '1', '2025-05-02 18:30:28', b'0');
INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (24, '腾讯云存储(示例)', 20, '请换成你的密钥!!!', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"https://cos.ap-shanghai.myqcloud.com\",\"domain\":\"http://tengxun-oss.iocoder.cn\",\"bucket\":\"aoteman-1255880240\",\"accessKey\":\"AKIDAF6WSh1uiIjwqtrOsGSN3WryqTM6cTMt\",\"accessSecret\":\"X\"}', '1', '2024-11-09 16:03:22', '1', '2025-05-02 18:30:28', b'0');
INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (25, '阿里云存储(示例)', 20, '', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"oss-cn-beijing.aliyuncs.com\",\"domain\":\"http://ali-oss.iocoder.cn\",\"bucket\":\"yunai-aoteman\",\"accessKey\":\"LTAI5tEQLgnDyjh3WpNcdMKA\",\"accessSecret\":\"X\",\"enablePathStyleAccess\":false}', '1', '2024-11-09 16:47:08', '1', '2025-05-02 18:30:28', b'0');
INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (26, '火山云存储(示例)', 20, '', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"tos-s3-cn-beijing.volces.com\",\"domain\":null,\"bucket\":\"yunai\",\"accessKey\":\"AKLTZjc3Zjc4MzZmMjU3NDk0ZTgxYmIyMmFkNTIwMDI1ZGE\",\"accessSecret\":\"X==\",\"enablePathStyleAccess\":false}', '1', '2024-11-09 16:56:42', '1', '2025-05-02 18:30:28', b'0');
INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (27, '华为云存储(示例)', 20, '', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"obs.cn-east-3.myhuaweicloud.com\",\"domain\":\"\",\"bucket\":\"yudao\",\"accessKey\":\"PVDONDEIOTW88LF8DC4U\",\"accessSecret\":\"X\",\"enablePathStyleAccess\":false}', '1', '2024-11-09 17:18:41', '1', '2025-05-02 18:30:28', b'0');
INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (28, 'MinIO 存储(示例)', 20, '', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"http://127.0.0.1:9000\",\"domain\":\"http://127.0.0.1:9000/yudao\",\"bucket\":\"yudao\",\"accessKey\":\"admin\",\"accessSecret\":\"password\",\"enablePathStyleAccess\":false}', '1', '2024-11-09 17:43:10', '1', '2025-05-02 18:30:28', b'0');
INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (29, '本地存储(示例)', 10, '仅适合 mac 或 windows', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.local.LocalFileClientConfig\",\"basePath\":\"/Users/yunai/tmp/file\",\"domain\":\"http://127.0.0.1:48080\"}', '1', '2025-05-02 11:25:45', '1', '2025-05-02 18:30:28', b'0');
INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (30, 'SFTP 存储(示例)', 12, '', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.sftp.SftpFileClientConfig\",\"basePath\":\"/upload\",\"domain\":\"http://127.0.0.1:48080\",\"host\":\"127.0.0.1\",\"port\":2222,\"username\":\"foo\",\"password\":\"pass\"}', '1', '2025-05-02 16:34:10', '1', '2025-05-02 18:30:28', b'0');
INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (4, '数据库(示例)', 1, '我是数据库', b'0', '{\"@class\":\"com.zt.plat.module.infra.framework.file.core.client.db.DBFileClientConfig\",\"domain\":\"http://127.0.0.1:48080\"}', '1', '2022-03-15 23:56:24', '1', '2025-05-02 18:30:28', b'0');
INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (22, '七牛存储器(示例)', 20, '请换成你自己的密钥!!!', b'1', '{\"@class\":\"com.zt.plat.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"s3.cn-south-1.qiniucs.com\",\"domain\":\"http://test.zt.iocoder.cn\",\"bucket\":\"ruoyi-vue-pro\",\"accessKey\":\"3TvrJ70gl2Gt6IBe7_IZT1F6i_k0iMuRtyEv4EyS\",\"accessSecret\":\"wd0tbVBYlp0S-ihA8Qg2hPLncoP83wyrIq24OZuY\",\"enablePathStyleAccess\":false}', '1', '2024-01-13 22:11:12', '1', '2025-05-02 18:30:28', b'0');
INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (24, '腾讯云存储(示例)', 20, '请换成你的密钥!!!', b'0', '{\"@class\":\"com.zt.plat.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"https://cos.ap-shanghai.myqcloud.com\",\"domain\":\"http://tengxun-oss.iocoder.cn\",\"bucket\":\"aoteman-1255880240\",\"accessKey\":\"AKIDAF6WSh1uiIjwqtrOsGSN3WryqTM6cTMt\",\"accessSecret\":\"X\"}', '1', '2024-11-09 16:03:22', '1', '2025-05-02 18:30:28', b'0');
INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (25, '阿里云存储(示例)', 20, '', b'0', '{\"@class\":\"com.zt.plat.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"oss-cn-beijing.aliyuncs.com\",\"domain\":\"http://ali-oss.iocoder.cn\",\"bucket\":\"yunai-aoteman\",\"accessKey\":\"LTAI5tEQLgnDyjh3WpNcdMKA\",\"accessSecret\":\"X\",\"enablePathStyleAccess\":false}', '1', '2024-11-09 16:47:08', '1', '2025-05-02 18:30:28', b'0');
INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (26, '火山云存储(示例)', 20, '', b'0', '{\"@class\":\"com.zt.plat.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"tos-s3-cn-beijing.volces.com\",\"domain\":null,\"bucket\":\"yunai\",\"accessKey\":\"AKLTZjc3Zjc4MzZmMjU3NDk0ZTgxYmIyMmFkNTIwMDI1ZGE\",\"accessSecret\":\"X==\",\"enablePathStyleAccess\":false}', '1', '2024-11-09 16:56:42', '1', '2025-05-02 18:30:28', b'0');
INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (27, '华为云存储(示例)', 20, '', b'0', '{\"@class\":\"com.zt.plat.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"obs.cn-east-3.myhuaweicloud.com\",\"domain\":\"\",\"bucket\":\"zt\",\"accessKey\":\"PVDONDEIOTW88LF8DC4U\",\"accessSecret\":\"X\",\"enablePathStyleAccess\":false}', '1', '2024-11-09 17:18:41', '1', '2025-05-02 18:30:28', b'0');
INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (28, 'MinIO 存储(示例)', 20, '', b'0', '{\"@class\":\"com.zt.plat.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"http://127.0.0.1:9000\",\"domain\":\"http://127.0.0.1:9000/zt\",\"bucket\":\"zt\",\"accessKey\":\"admin\",\"accessSecret\":\"password\",\"enablePathStyleAccess\":false}', '1', '2024-11-09 17:43:10', '1', '2025-05-02 18:30:28', b'0');
INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (29, '本地存储(示例)', 10, '仅适合 mac 或 windows', b'0', '{\"@class\":\"com.zt.plat.module.infra.framework.file.core.client.local.LocalFileClientConfig\",\"basePath\":\"/Users/yunai/tmp/file\",\"domain\":\"http://127.0.0.1:48080\"}', '1', '2025-05-02 11:25:45', '1', '2025-05-02 18:30:28', b'0');
INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (30, 'SFTP 存储(示例)', 12, '', b'0', '{\"@class\":\"com.zt.plat.module.infra.framework.file.core.client.sftp.SftpFileClientConfig\",\"basePath\":\"/upload\",\"domain\":\"http://127.0.0.1:48080\",\"host\":\"127.0.0.1\",\"port\":2222,\"username\":\"foo\",\"password\":\"pass\"}', '1', '2025-05-02 16:34:10', '1', '2025-05-02 18:30:28', b'0');
COMMIT;
-- ----------------------------
@@ -2290,7 +2290,7 @@ CREATE TABLE `system_notice` (
-- ----------------------------
BEGIN;
INSERT INTO `system_notice` (`id`, `title`, `content`, `type`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'ZT的公众', '<p>新版本内容133</p>', 1, 0, 'admin', '2021-01-05 17:03:48', '1', '2022-05-04 21:00:20', b'0', 1);
INSERT INTO `system_notice` (`id`, `title`, `content`, `type`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2, '维护通知2018-07-01 系统凌晨维护', '<p><img src=\"http://test.yudao.iocoder.cn/b7cb3cf49b4b3258bf7309a09dd2f4e5.jpg\" alt=\"\" data-href=\"\">11112222<img src=\"http://test.yudao.iocoder.cn/fe44fc7bdb82ca421184b2eebbaee9e2148d4a1827479a4eb4521e11d2a062ba.png\" alt=\"image\" data-href=\"http://test.yudao.iocoder.cn/fe44fc7bdb82ca421184b2eebbaee9e2148d4a1827479a4eb4521e11d2a062ba.png\">3333</p>', 2, 1, 'admin', '2021-01-05 17:03:48', '1', '2025-04-18 23:56:40', b'0', 1);
INSERT INTO `system_notice` (`id`, `title`, `content`, `type`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2, '维护通知2018-07-01 系统凌晨维护', '<p><img src=\"http://test.zt.iocoder.cn/b7cb3cf49b4b3258bf7309a09dd2f4e5.jpg\" alt=\"\" data-href=\"\">11112222<img src=\"http://test.zt.iocoder.cn/fe44fc7bdb82ca421184b2eebbaee9e2148d4a1827479a4eb4521e11d2a062ba.png\" alt=\"image\" data-href=\"http://test.zt.iocoder.cn/fe44fc7bdb82ca421184b2eebbaee9e2148d4a1827479a4eb4521e11d2a062ba.png\">3333</p>', 2, 1, 'admin', '2021-01-05 17:03:48', '1', '2025-04-18 23:56:40', b'0', 1);
INSERT INTO `system_notice` (`id`, `title`, `content`, `type`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4, '我是测试标题', '<p>哈哈哈哈123</p>', 1, 0, '110', '2022-02-22 01:01:25', '110', '2022-02-22 01:01:46', b'0', 121);
COMMIT;
@@ -2453,10 +2453,10 @@ CREATE TABLE `system_oauth2_client` (
-- Records of system_oauth2_client
-- ----------------------------
BEGIN;
INSERT INTO `system_oauth2_client` (`id`, `client_id`, `secret`, `name`, `logo`, `description`, `status`, `access_token_validity_seconds`, `refresh_token_validity_seconds`, `redirect_uris`, `authorized_grant_types`, `scopes`, `auto_approve_scopes`, `authorities`, `resource_ids`, `additional_information`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, 'default', 'admin123', '后台管理', 'http://test.yudao.iocoder.cn/20250502/sort2_1746189740718.png', '我是描述', 0, 1800, 2592000, '[\"https://www.iocoder.cn\",\"http://172.16.46.63:30888\"]', '[\"password\",\"authorization_code\",\"implicit\",\"refresh_token\"]', '[\"user.read\",\"user.write\"]', '[]', '[\"user.read\",\"user.write\"]', '[]', '{}', '1', '2022-05-11 21:47:12', '1', '2025-05-02 20:42:22', b'0');
INSERT INTO `system_oauth2_client` (`id`, `client_id`, `secret`, `name`, `logo`, `description`, `status`, `access_token_validity_seconds`, `refresh_token_validity_seconds`, `redirect_uris`, `authorized_grant_types`, `scopes`, `auto_approve_scopes`, `authorities`, `resource_ids`, `additional_information`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (40, 'test', 'test2', 'biubiu', 'http://test.yudao.iocoder.cn/xx/20250502/ed07110a37464b5299f8bd7c67ad65c7_1746187077009.jpg', '啦啦啦啦', 0, 1800, 43200, '[\"https://www.iocoder.cn\"]', '[\"password\",\"authorization_code\",\"implicit\"]', '[\"user_info\",\"projects\"]', '[\"user_info\"]', '[]', '[]', '{}', '1', '2022-05-12 00:28:20', '1', '2025-05-02 19:58:08', b'0');
INSERT INTO `system_oauth2_client` (`id`, `client_id`, `secret`, `name`, `logo`, `description`, `status`, `access_token_validity_seconds`, `refresh_token_validity_seconds`, `redirect_uris`, `authorized_grant_types`, `scopes`, `auto_approve_scopes`, `authorities`, `resource_ids`, `additional_information`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (41, 'yudao-sso-demo-by-code', 'test', '基于授权码模式,如何实现 SSO 单点登录?', 'http://test.yudao.iocoder.cn/it/20250502/sign_1746181948685.png', NULL, 0, 1800, 43200, '[\"http://127.0.0.1:18080\"]', '[\"authorization_code\",\"refresh_token\"]', '[\"user.read\",\"user.write\"]', '[]', '[]', '[]', NULL, '1', '2022-09-29 13:28:31', '1', '2025-05-02 18:32:30', b'0');
INSERT INTO `system_oauth2_client` (`id`, `client_id`, `secret`, `name`, `logo`, `description`, `status`, `access_token_validity_seconds`, `refresh_token_validity_seconds`, `redirect_uris`, `authorized_grant_types`, `scopes`, `auto_approve_scopes`, `authorities`, `resource_ids`, `additional_information`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (42, 'yudao-sso-demo-by-password', 'test', '基于密码模式,如何实现 SSO 单点登录?', 'http://test.yudao.iocoder.cn/604bdc695e13b3b22745be704d1f2aa8ee05c5f26f9fead6d1ca49005afbc857.jpeg', NULL, 0, 1800, 43200, '[\"http://127.0.0.1:18080\"]', '[\"password\",\"refresh_token\"]', '[\"user.read\",\"user.write\"]', '[]', '[]', '[]', NULL, '1', '2022-10-04 17:40:16', '1', '2025-05-04 16:00:46', b'0');
INSERT INTO `system_oauth2_client` (`id`, `client_id`, `secret`, `name`, `logo`, `description`, `status`, `access_token_validity_seconds`, `refresh_token_validity_seconds`, `redirect_uris`, `authorized_grant_types`, `scopes`, `auto_approve_scopes`, `authorities`, `resource_ids`, `additional_information`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, 'default', 'admin123', '后台管理', 'http://test.zt.iocoder.cn/20250502/sort2_1746189740718.png', '我是描述', 0, 1800, 2592000, '[\"https://www.iocoder.cn\",\"http://172.16.46.63:30888\"]', '[\"password\",\"authorization_code\",\"implicit\",\"refresh_token\"]', '[\"user.read\",\"user.write\"]', '[]', '[\"user.read\",\"user.write\"]', '[]', '{}', '1', '2022-05-11 21:47:12', '1', '2025-05-02 20:42:22', b'0');
INSERT INTO `system_oauth2_client` (`id`, `client_id`, `secret`, `name`, `logo`, `description`, `status`, `access_token_validity_seconds`, `refresh_token_validity_seconds`, `redirect_uris`, `authorized_grant_types`, `scopes`, `auto_approve_scopes`, `authorities`, `resource_ids`, `additional_information`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (40, 'test', 'test2', 'biubiu', 'http://test.zt.iocoder.cn/xx/20250502/ed07110a37464b5299f8bd7c67ad65c7_1746187077009.jpg', '啦啦啦啦', 0, 1800, 43200, '[\"https://www.iocoder.cn\"]', '[\"password\",\"authorization_code\",\"implicit\"]', '[\"user_info\",\"projects\"]', '[\"user_info\"]', '[]', '[]', '{}', '1', '2022-05-12 00:28:20', '1', '2025-05-02 19:58:08', b'0');
INSERT INTO `system_oauth2_client` (`id`, `client_id`, `secret`, `name`, `logo`, `description`, `status`, `access_token_validity_seconds`, `refresh_token_validity_seconds`, `redirect_uris`, `authorized_grant_types`, `scopes`, `auto_approve_scopes`, `authorities`, `resource_ids`, `additional_information`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (41, 'zt-sso-demo-by-code', 'test', '基于授权码模式,如何实现 SSO 单点登录?', 'http://test.zt.iocoder.cn/it/20250502/sign_1746181948685.png', NULL, 0, 1800, 43200, '[\"http://127.0.0.1:18080\"]', '[\"authorization_code\",\"refresh_token\"]', '[\"user.read\",\"user.write\"]', '[]', '[]', '[]', NULL, '1', '2022-09-29 13:28:31', '1', '2025-05-02 18:32:30', b'0');
INSERT INTO `system_oauth2_client` (`id`, `client_id`, `secret`, `name`, `logo`, `description`, `status`, `access_token_validity_seconds`, `refresh_token_validity_seconds`, `redirect_uris`, `authorized_grant_types`, `scopes`, `auto_approve_scopes`, `authorities`, `resource_ids`, `additional_information`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (42, 'zt-sso-demo-by-password', 'test', '基于密码模式,如何实现 SSO 单点登录?', 'http://test.zt.iocoder.cn/604bdc695e13b3b22745be704d1f2aa8ee05c5f26f9fead6d1ca49005afbc857.jpeg', NULL, 0, 1800, 43200, '[\"http://127.0.0.1:18080\"]', '[\"password\",\"refresh_token\"]', '[\"user.read\",\"user.write\"]', '[]', '[]', '[]', NULL, '1', '2022-10-04 17:40:16', '1', '2025-05-04 16:00:46', b'0');
COMMIT;
-- ----------------------------
@@ -3899,8 +3899,8 @@ CREATE TABLE `system_users` (
-- Records of system_users
-- ----------------------------
BEGIN;
INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'admin', '$2a$04$KljJDa/LK7QfDm0lF5OhuePhlPfjRH3tB2Wu351Uidz.oQGJXevPi', '后台管理', '管理员', '[1,2]', '11aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/test/20250502/avatar_1746154660449.png', 0, '0:0:0:0:0:0:0:1', '2025-05-10 18:03:15', 'admin', '2021-01-05 17:03:47', NULL, '2025-05-10 18:03:15', b'0', 1);
INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (100, 'yudao', '$2a$04$h.aaPKgO.odHepnk5PCsWeEwKdojFWdTItxGKfx1r0e1CSeBzsTJ6', 'ZT', '不要吓我', '[1]', 'yudao@iocoder.cn', '15601691300', 1, NULL, 0, '0:0:0:0:0:0:0:1', '2025-04-08 09:36:40', '', '2021-01-07 09:07:17', NULL, '2025-04-21 14:23:08', b'0', 1);
INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'admin', '$2a$04$KljJDa/LK7QfDm0lF5OhuePhlPfjRH3tB2Wu351Uidz.oQGJXevPi', '后台管理', '管理员', '[1,2]', '11aoteman@126.com', '18818260277', 2, 'http://test.zt.iocoder.cn/test/20250502/avatar_1746154660449.png', 0, '0:0:0:0:0:0:0:1', '2025-05-10 18:03:15', 'admin', '2021-01-05 17:03:47', NULL, '2025-05-10 18:03:15', b'0', 1);
INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (100, 'zt', '$2a$04$h.aaPKgO.odHepnk5PCsWeEwKdojFWdTItxGKfx1r0e1CSeBzsTJ6', 'ZT', '不要吓我', '[1]', 'zt@iocoder.cn', '15601691300', 1, NULL, 0, '0:0:0:0:0:0:0:1', '2025-04-08 09:36:40', '', '2021-01-07 09:07:17', NULL, '2025-04-21 14:23:08', b'0', 1);
INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (103, 'yuanma', '$2a$04$fUBSmjKCPYAUmnMzOb6qE.eZCGPhHi1JmAKclODbfS/O7fHOl2bH6', '源码', NULL, NULL, 'yuanma@iocoder.cn', '15601701300', 0, NULL, 0, '0:0:0:0:0:0:0:1', '2024-08-11 17:48:12', '', '2021-01-13 23:50:35', NULL, '2025-04-21 14:23:08', b'0', 1);
INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (104, 'test', '$2a$04$BrwaYn303hjA/6TnXqdGoOLhyHOAA0bVrAFu6.1dJKycqKUnIoRz2', '测试号', NULL, '[1,2]', '111@qq.com', '15601691200', 1, NULL, 0, '0:0:0:0:0:0:0:1', '2025-03-28 20:01:16', '', '2021-01-21 02:13:53', NULL, '2025-04-21 14:23:08', b'0', 1);
INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (107, 'admin107', '$2a$10$dYOOBKMO93v/.ReCqzyFg.o67Tqk.bbc2bhrpyBGkIw9aypCtr2pm', 'ZT', NULL, NULL, '', '15601691300', 0, NULL, 0, '', NULL, '1', '2022-02-20 22:59:33', '1', '2025-04-21 14:23:08', b'0', 118);
@@ -3920,10 +3920,10 @@ INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`,
COMMIT;
-- ----------------------------
-- Table structure for yudao_demo01_contact
-- Table structure for zt_demo01_contact
-- ----------------------------
DROP TABLE IF EXISTS `yudao_demo01_contact`;
CREATE TABLE `yudao_demo01_contact` (
DROP TABLE IF EXISTS `zt_demo01_contact`;
CREATE TABLE `zt_demo01_contact` (
`id` bigint NOT NULL COMMENT '编号',
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '名字',
`sex` tinyint(1) NOT NULL COMMENT '性别',
@@ -3940,17 +3940,17 @@ CREATE TABLE `yudao_demo01_contact` (
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '示例联系人表';
-- ----------------------------
-- Records of yudao_demo01_contact
-- Records of zt_demo01_contact
-- ----------------------------
BEGIN;
INSERT INTO `yudao_demo01_contact` (`id`, `name`, `sex`, `birthday`, `description`, `avatar`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, '土豆', 2, '2023-11-07 00:00:00', '<p>天蚕土豆!呀</p>', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/46f8fa1a37db3f3960d8910ff2fe3962ab3b2db87cf2f8ccb4dc8145b8bdf237.jpeg', '1', '2023-11-15 23:34:30', '1', '2023-11-15 23:47:39', b'0', 1);
INSERT INTO `zt_demo01_contact` (`id`, `name`, `sex`, `birthday`, `description`, `avatar`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, '土豆', 2, '2023-11-07 00:00:00', '<p>天蚕土豆!呀</p>', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/46f8fa1a37db3f3960d8910ff2fe3962ab3b2db87cf2f8ccb4dc8145b8bdf237.jpeg', '1', '2023-11-15 23:34:30', '1', '2023-11-15 23:47:39', b'0', 1);
COMMIT;
-- ----------------------------
-- Table structure for yudao_demo02_category
-- Table structure for zt_demo02_category
-- ----------------------------
DROP TABLE IF EXISTS `yudao_demo02_category`;
CREATE TABLE `yudao_demo02_category` (
DROP TABLE IF EXISTS `zt_demo02_category`;
CREATE TABLE `zt_demo02_category` (
`id` bigint NOT NULL COMMENT '编号',
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '名字',
`parent_id` bigint NOT NULL COMMENT '父级编号',
@@ -3964,22 +3964,22 @@ CREATE TABLE `yudao_demo02_category` (
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '示例分类表';
-- ----------------------------
-- Records of yudao_demo02_category
-- Records of zt_demo02_category
-- ----------------------------
BEGIN;
INSERT INTO `yudao_demo02_category` (`id`, `name`, `parent_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, '土豆', 0, '1', '2023-11-15 23:34:30', '1', '2023-11-16 20:24:23', b'0', 1);
INSERT INTO `yudao_demo02_category` (`id`, `name`, `parent_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2, '番茄', 0, '1', '2023-11-16 20:24:00', '1', '2023-11-16 20:24:15', b'0', 1);
INSERT INTO `yudao_demo02_category` (`id`, `name`, `parent_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3, '怪怪', 0, '1', '2023-11-16 20:24:32', '1', '2023-11-16 20:24:32', b'0', 1);
INSERT INTO `yudao_demo02_category` (`id`, `name`, `parent_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4, '小番茄', 2, '1', '2023-11-16 20:24:39', '1', '2023-11-16 20:24:39', b'0', 1);
INSERT INTO `yudao_demo02_category` (`id`, `name`, `parent_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (5, '大番茄', 2, '1', '2023-11-16 20:24:46', '1', '2023-11-16 20:24:46', b'0', 1);
INSERT INTO `yudao_demo02_category` (`id`, `name`, `parent_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6, '11', 3, '1', '2023-11-24 19:29:34', '1', '2023-11-24 19:29:34', b'0', 1);
INSERT INTO `zt_demo02_category` (`id`, `name`, `parent_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, '土豆', 0, '1', '2023-11-15 23:34:30', '1', '2023-11-16 20:24:23', b'0', 1);
INSERT INTO `zt_demo02_category` (`id`, `name`, `parent_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2, '番茄', 0, '1', '2023-11-16 20:24:00', '1', '2023-11-16 20:24:15', b'0', 1);
INSERT INTO `zt_demo02_category` (`id`, `name`, `parent_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3, '怪怪', 0, '1', '2023-11-16 20:24:32', '1', '2023-11-16 20:24:32', b'0', 1);
INSERT INTO `zt_demo02_category` (`id`, `name`, `parent_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4, '小番茄', 2, '1', '2023-11-16 20:24:39', '1', '2023-11-16 20:24:39', b'0', 1);
INSERT INTO `zt_demo02_category` (`id`, `name`, `parent_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (5, '大番茄', 2, '1', '2023-11-16 20:24:46', '1', '2023-11-16 20:24:46', b'0', 1);
INSERT INTO `zt_demo02_category` (`id`, `name`, `parent_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6, '11', 3, '1', '2023-11-24 19:29:34', '1', '2023-11-24 19:29:34', b'0', 1);
COMMIT;
-- ----------------------------
-- Table structure for yudao_demo03_course
-- Table structure for zt_demo03_course
-- ----------------------------
DROP TABLE IF EXISTS `yudao_demo03_course`;
CREATE TABLE `yudao_demo03_course` (
DROP TABLE IF EXISTS `zt_demo03_course`;
CREATE TABLE `zt_demo03_course` (
`id` bigint NOT NULL COMMENT '编号',
`student_id` bigint NOT NULL COMMENT '学生编号',
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '名字',
@@ -3994,33 +3994,33 @@ CREATE TABLE `yudao_demo03_course` (
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '学生课程表';
-- ----------------------------
-- Records of yudao_demo03_course
-- Records of zt_demo03_course
-- ----------------------------
BEGIN;
INSERT INTO `yudao_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2, 2, '语文', 66, '1', '2023-11-16 23:21:49', '1', '2024-09-17 10:55:30', b'1', 1);
INSERT INTO `yudao_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3, 2, '数学', 22, '1', '2023-11-16 23:21:49', '1', '2024-09-17 10:55:30', b'1', 1);
INSERT INTO `yudao_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6, 5, '体育', 23, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:44:40', b'1', 1);
INSERT INTO `yudao_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (7, 5, '计算机', 11, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:44:40', b'1', 1);
INSERT INTO `yudao_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (8, 5, '体育', 23, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:47:09', b'1', 1);
INSERT INTO `yudao_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (9, 5, '计算机', 11, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:47:09', b'1', 1);
INSERT INTO `yudao_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (10, 5, '体育', 23, '1', '2023-11-16 23:22:46', '1', '2024-09-17 10:55:28', b'1', 1);
INSERT INTO `yudao_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (11, 5, '计算机', 11, '1', '2023-11-16 23:22:46', '1', '2024-09-17 10:55:28', b'1', 1);
INSERT INTO `yudao_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (12, 2, '电脑', 33, '1', '2023-11-17 00:20:42', '1', '2023-11-16 16:20:45', b'1', 1);
INSERT INTO `yudao_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (13, 9, '滑雪', 12, '1', '2023-11-17 13:13:20', '1', '2024-09-17 10:55:26', b'1', 1);
INSERT INTO `yudao_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (14, 9, '滑雪', 12, '1', '2023-11-17 13:13:20', '1', '2024-09-17 10:55:49', b'1', 1);
INSERT INTO `yudao_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (15, 5, '体育', 23, '1', '2023-11-16 23:22:46', '1', '2024-09-17 18:55:29', b'0', 1);
INSERT INTO `yudao_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (16, 5, '计算机', 11, '1', '2023-11-16 23:22:46', '1', '2024-09-17 18:55:29', b'0', 1);
INSERT INTO `yudao_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (17, 2, '语文', 66, '1', '2023-11-16 23:21:49', '1', '2024-09-17 18:55:31', b'0', 1);
INSERT INTO `yudao_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (18, 2, '数学', 22, '1', '2023-11-16 23:21:49', '1', '2024-09-17 18:55:31', b'0', 1);
INSERT INTO `yudao_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (19, 9, '滑雪', 12, '1', '2023-11-17 13:13:20', '1', '2025-04-19 02:49:03', b'1', 1);
INSERT INTO `yudao_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (20, 9, '滑雪', 12, '1', '2023-11-17 13:13:20', '1', '2025-04-19 10:49:04', b'0', 1);
INSERT INTO `zt_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2, 2, '语文', 66, '1', '2023-11-16 23:21:49', '1', '2024-09-17 10:55:30', b'1', 1);
INSERT INTO `zt_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3, 2, '数学', 22, '1', '2023-11-16 23:21:49', '1', '2024-09-17 10:55:30', b'1', 1);
INSERT INTO `zt_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6, 5, '体育', 23, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:44:40', b'1', 1);
INSERT INTO `zt_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (7, 5, '计算机', 11, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:44:40', b'1', 1);
INSERT INTO `zt_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (8, 5, '体育', 23, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:47:09', b'1', 1);
INSERT INTO `zt_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (9, 5, '计算机', 11, '1', '2023-11-16 23:22:46', '1', '2023-11-16 15:47:09', b'1', 1);
INSERT INTO `zt_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (10, 5, '体育', 23, '1', '2023-11-16 23:22:46', '1', '2024-09-17 10:55:28', b'1', 1);
INSERT INTO `zt_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (11, 5, '计算机', 11, '1', '2023-11-16 23:22:46', '1', '2024-09-17 10:55:28', b'1', 1);
INSERT INTO `zt_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (12, 2, '电脑', 33, '1', '2023-11-17 00:20:42', '1', '2023-11-16 16:20:45', b'1', 1);
INSERT INTO `zt_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (13, 9, '滑雪', 12, '1', '2023-11-17 13:13:20', '1', '2024-09-17 10:55:26', b'1', 1);
INSERT INTO `zt_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (14, 9, '滑雪', 12, '1', '2023-11-17 13:13:20', '1', '2024-09-17 10:55:49', b'1', 1);
INSERT INTO `zt_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (15, 5, '体育', 23, '1', '2023-11-16 23:22:46', '1', '2024-09-17 18:55:29', b'0', 1);
INSERT INTO `zt_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (16, 5, '计算机', 11, '1', '2023-11-16 23:22:46', '1', '2024-09-17 18:55:29', b'0', 1);
INSERT INTO `zt_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (17, 2, '语文', 66, '1', '2023-11-16 23:21:49', '1', '2024-09-17 18:55:31', b'0', 1);
INSERT INTO `zt_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (18, 2, '数学', 22, '1', '2023-11-16 23:21:49', '1', '2024-09-17 18:55:31', b'0', 1);
INSERT INTO `zt_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (19, 9, '滑雪', 12, '1', '2023-11-17 13:13:20', '1', '2025-04-19 02:49:03', b'1', 1);
INSERT INTO `zt_demo03_course` (`id`, `student_id`, `name`, `score`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (20, 9, '滑雪', 12, '1', '2023-11-17 13:13:20', '1', '2025-04-19 10:49:04', b'0', 1);
COMMIT;
-- ----------------------------
-- Table structure for yudao_demo03_grade
-- Table structure for zt_demo03_grade
-- ----------------------------
DROP TABLE IF EXISTS `yudao_demo03_grade`;
CREATE TABLE `yudao_demo03_grade` (
DROP TABLE IF EXISTS `zt_demo03_grade`;
CREATE TABLE `zt_demo03_grade` (
`id` bigint NOT NULL COMMENT '编号',
`student_id` bigint NOT NULL COMMENT '学生编号',
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '名字',
@@ -4035,19 +4035,19 @@ CREATE TABLE `yudao_demo03_grade` (
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '学生班级表';
-- ----------------------------
-- Records of yudao_demo03_grade
-- Records of zt_demo03_grade
-- ----------------------------
BEGIN;
INSERT INTO `yudao_demo03_grade` (`id`, `student_id`, `name`, `teacher`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (7, 2, '三年 2 班', '周杰伦', '1', '2023-11-16 23:21:49', '1', '2024-09-17 18:55:31', b'0', 1);
INSERT INTO `yudao_demo03_grade` (`id`, `student_id`, `name`, `teacher`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (8, 5, '华为', '遥遥领先', '1', '2023-11-16 23:22:46', '1', '2024-09-17 18:55:29', b'0', 1);
INSERT INTO `yudao_demo03_grade` (`id`, `student_id`, `name`, `teacher`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (9, 9, '小图', '小娃111', '1', '2023-11-17 13:10:23', '1', '2025-04-19 10:49:04', b'0', 1);
INSERT INTO `zt_demo03_grade` (`id`, `student_id`, `name`, `teacher`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (7, 2, '三年 2 班', '周杰伦', '1', '2023-11-16 23:21:49', '1', '2024-09-17 18:55:31', b'0', 1);
INSERT INTO `zt_demo03_grade` (`id`, `student_id`, `name`, `teacher`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (8, 5, '华为', '遥遥领先', '1', '2023-11-16 23:22:46', '1', '2024-09-17 18:55:29', b'0', 1);
INSERT INTO `zt_demo03_grade` (`id`, `student_id`, `name`, `teacher`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (9, 9, '小图', '小娃111', '1', '2023-11-17 13:10:23', '1', '2025-04-19 10:49:04', b'0', 1);
COMMIT;
-- ----------------------------
-- Table structure for yudao_demo03_student
-- Table structure for zt_demo03_student
-- ----------------------------
DROP TABLE IF EXISTS `yudao_demo03_student`;
CREATE TABLE `yudao_demo03_student` (
DROP TABLE IF EXISTS `zt_demo03_student`;
CREATE TABLE `zt_demo03_student` (
`id` bigint NOT NULL COMMENT '编号',
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '名字',
`sex` tinyint NOT NULL COMMENT '性别',
@@ -4063,12 +4063,12 @@ CREATE TABLE `yudao_demo03_student` (
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '学生表';
-- ----------------------------
-- Records of yudao_demo03_student
-- Records of zt_demo03_student
-- ----------------------------
BEGIN;
INSERT INTO `yudao_demo03_student` (`id`, `name`, `sex`, `birthday`, `description`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2, '小白', 1, '2023-11-16 00:00:00', '<p>厉害</p>', '1', '2023-11-16 23:21:49', '1', '2024-09-17 18:55:31', b'0', 1);
INSERT INTO `yudao_demo03_student` (`id`, `name`, `sex`, `birthday`, `description`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (5, '大黑', 2, '2023-11-13 00:00:00', '<p>你在教我做事?</p>', '1', '2023-11-16 23:22:46', '1', '2024-09-17 18:55:29', b'0', 1);
INSERT INTO `yudao_demo03_student` (`id`, `name`, `sex`, `birthday`, `description`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (9, '小花', 1, '2023-11-07 00:00:00', '<p>哈哈哈</p>', '1', '2023-11-17 00:04:47', '1', '2025-04-19 10:49:04', b'0', 1);
INSERT INTO `zt_demo03_student` (`id`, `name`, `sex`, `birthday`, `description`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2, '小白', 1, '2023-11-16 00:00:00', '<p>厉害</p>', '1', '2023-11-16 23:21:49', '1', '2024-09-17 18:55:31', b'0', 1);
INSERT INTO `zt_demo03_student` (`id`, `name`, `sex`, `birthday`, `description`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (5, '大黑', 2, '2023-11-13 00:00:00', '<p>你在教我做事?</p>', '1', '2023-11-16 23:22:46', '1', '2024-09-17 18:55:29', b'0', 1);
INSERT INTO `zt_demo03_student` (`id`, `name`, `sex`, `birthday`, `description`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (9, '小花', 1, '2023-11-07 00:00:00', '<p>哈哈哈</p>', '1', '2023-11-17 00:04:47', '1', '2025-04-19 10:49:04', b'0', 1);
COMMIT;
-- ----------------------------

View File

@@ -64,6 +64,7 @@
<podam.version>8.0.2.RELEASE</podam.version>
<jedis-mock.version>1.1.4</jedis-mock.version>
<mockito-inline.version>5.2.0</mockito-inline.version>
<okhttp3.version>4.12.0</okhttp3.version>
<!-- Bpm 工作流相关 -->
<flowable.version>7.0.1</flowable.version>
<!-- 工具类相关 -->
@@ -144,6 +145,12 @@
<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>

View File

@@ -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>

View File

@@ -3,9 +3,9 @@ package com.zt.plat.framework.common.biz.system.oauth2.dto;
import com.zt.plat.framework.common.enums.UserTypeEnum;
import com.zt.plat.framework.common.validation.InEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import jakarta.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

View File

@@ -1,11 +1,11 @@
package com.zt.plat.framework.common.pojo;
import cn.hutool.core.lang.Assert;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.zt.plat.framework.common.exception.ErrorCode;
import com.zt.plat.framework.common.exception.ServiceException;
import com.zt.plat.framework.common.exception.enums.GlobalErrorCodeConstants;
import com.zt.plat.framework.common.exception.util.ServiceExceptionUtil;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;

View File

@@ -1,11 +1,11 @@
package com.zt.plat.framework.common.pojo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.NotNull;
import java.io.Serializable;
@Schema(description="分页参数")

View File

@@ -0,0 +1,137 @@
package com.zt.plat.framework.common.util.asyncTask;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.*;
/**
* 异步任务同步处理工具类
* 多次提交,一次等待
*/
public class AsyncLatchUtils {
private static final ThreadLocal<List<TaskInfo>> THREADLOCAL = ThreadLocal.withInitial(LinkedList::new);
/**
* 提交一个异步任务
* @param executor 指定执行此任务的线程池
* @param runnable 需要异步执行的具体业务逻辑
*/
public static void submitTask(Executor executor, Runnable runnable) {
THREADLOCAL.get().add(new TaskInfo(executor, runnable));
}
/**
* 获取当前线程已提交的任务列表,并自动清理当前线程的已提交任务列表。
* @return
*/
private static List<TaskInfo> popTask() {
List<TaskInfo> taskInfos = THREADLOCAL.get();
THREADLOCAL.remove();
return taskInfos;
}
/**
* 触发所有已提交任务的执行,并同步等待它们全部完成。
* @param timeout 最长等待时间
* @param timeUnit 等待时间单位
* @return true: 如果所有任务在指定时间内成功完成。false: 如果等待超时。
* 该方法在执行后会自动清理当前线程提交的任务列表,因此可以重复使用。
*/
public static boolean waitFor(long timeout, TimeUnit timeUnit) {
List<TaskInfo> taskInfos = popTask();
if (taskInfos.isEmpty()) {
return true;
}
CountDownLatch latch = new CountDownLatch(taskInfos.size());
for (TaskInfo taskInfo : taskInfos) {
Executor executor = taskInfo.executor;
Runnable runnable = taskInfo.runnable;
executor.execute(() -> {
try {
runnable.run();
} finally {
latch.countDown();
}
});
}
boolean await = false;
try {
await = latch.await(timeout, timeUnit);
} catch (Exception ignored) {}
return await;
}
private static final class TaskInfo {
private final Executor executor;
private final Runnable runnable;
public TaskInfo(Executor executor, Runnable runnable) {
this.executor = executor;
this.runnable = runnable;
}
}
/**
* 调用样例
* @param args
*/
public static void main(String[] args) {
// 1. 准备一个线程池
ExecutorService executorService = Executors.newFixedThreadPool(3);
System.out.println("主流程开始,准备分发异步任务...");
System.out.println("主线程id:" + Thread.currentThread().getId());
// 2. 提交多个异步任务
// 任务一:获取用户信息
AsyncLatchUtils.submitTask(executorService, () -> {
try {
System.out.println("任务一子线程id:" + Thread.currentThread().getId());
System.out.println("开始获取用户信息...");
Thread.sleep(1000); // 模拟耗时
System.out.println("获取用户信息成功!");
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
});
// 任务二:获取订单信息
AsyncLatchUtils.submitTask(executorService, () -> {
try {
System.out.println("任务二子线程id:" + Thread.currentThread().getId());
System.out.println("开始获取订单信息...");
Thread.sleep(1500); // 模拟耗时
System.out.println("获取订单信息成功!");
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
});
// 任务三:获取商品信息
AsyncLatchUtils.submitTask(executorService, () -> {
try {
System.out.println("任务三子线程id:" + Thread.currentThread().getId());
System.out.println("开始获取商品信息...");
Thread.sleep(500); // 模拟耗时
System.out.println("获取商品信息成功!");
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
});
System.out.println("所有异步任务已提交,主线程开始等待...");
// 3. 等待所有任务完成最长等待5秒
boolean allTasksCompleted = AsyncLatchUtils.waitFor(5, TimeUnit.SECONDS);
// 4. 根据等待结果继续主流程
if (allTasksCompleted) {
System.out.println("所有异步任务执行成功,主流程继续...");
} else {
System.err.println("有任务执行超时,主流程中断!");
}
// 5. 关闭线程池
executorService.shutdown();
}
}

View File

@@ -3,8 +3,8 @@ package com.zt.plat.framework.common.util.collection;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ArrayUtil;
import com.zt.plat.framework.common.pojo.PageResult;
import com.google.common.collect.ImmutableMap;
import com.zt.plat.framework.common.pojo.PageResult;
import java.util.*;
import java.util.function.*;

View File

@@ -2,6 +2,7 @@ package com.zt.plat.framework.common.util.security;
import cn.hutool.crypto.SecureUtil;
import com.zt.plat.framework.common.util.json.JsonUtils;
import lombok.extern.slf4j.Slf4j;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
@@ -15,6 +16,7 @@ import java.util.*;
/**
* 通用的签名、加解密工具类
*/
@Slf4j
public final class CryptoSignatureUtils {
public static final String ENCRYPT_TYPE_AES = "AES";
@@ -142,6 +144,7 @@ public final class CryptoSignatureUtils {
return false;
}
String computed;
log.info("原始签名串:{}", sb);
if (SIGNATURE_TYPE_MD5.equalsIgnoreCase(type)) {
computed = SecureUtil.md5(sb.toString());
} else if (SIGNATURE_TYPE_SHA256.equalsIgnoreCase(type)) {
@@ -149,6 +152,8 @@ public final class CryptoSignatureUtils {
} else {
throw new IllegalArgumentException("Unsupported signature type: " + type);
}
log.info("原始签名:{}", computed);
log.info("请求签名:{}", provided);
return provided.equalsIgnoreCase(computed);
}

View File

@@ -0,0 +1,216 @@
package com.zt.plat.framework.common.util.tree;
import com.alibaba.fastjson.JSON;
import com.zt.plat.framework.common.util.object.ObjectUtils;
import lombok.Data;
import java.util.*;
import java.util.function.*;
import java.util.stream.Collectors;
/**
* 树操作方法工具类
*/
public class TreeUtil {
/**
* 将list合成树
*@param list 需要合成树的List
*@param rootCheck 判断E中为根节点的条件x->x.getPId()==-1L,x->x.getParentId()==null,x->x.getParentMenuId()==0
*@param parentCheck 判断E中为父节点条件(x,y)->x.getId().equals(y.getPId())
*@param setSubChildren E中设置下级数据方法Menu::setSubMenus
*@param<E> 泛型实体对象
*@return 合成好的树
*/
public static <E> List<E> makeTree(List<E> list, Predicate<E> rootCheck, BiFunction<E,E,Boolean> parentCheck, BiConsumer<E,List<E>> setSubChildren){
return list.stream().filter(rootCheck).peek(x->setSubChildren.accept(x,makeChildren(x,list,parentCheck,setSubChildren))).collect(Collectors.toList());
}
/**
*将树打平成tree
*@paramtree需要打平的树
*@paramgetSubChildren设置下级数据方法Menu::getSubMenus,x->x.setSubMenus(null)
*@paramsetSubChildren将下级数据置空方法x->x.setSubMenus(null)
*@return打平后的数据
*@param<E>泛型实体对象
*/
public static <E> List<E> flat(List<E> tree, Function<E,List<E>> getSubChildren, Consumer<E> setSubChildren){
List<E> res = new ArrayList<>();
forPostOrder(tree,item->{
setSubChildren.accept(item);
res.add(item);
},getSubChildren);
return res;
}
/**
*前序遍历
*
*@paramtree需要遍历的树
*@paramconsumer遍历后对单个元素的处理方法x->System.out.println(x)、System.out::println打印元素
*@paramsetSubChildren设置下级数据方法Menu::getSubMenus,x->x.setSubMenus(null)
*@param<E>泛型实体对象
*/
public static <E> void forPreOrder(List<E> tree,Consumer<E> consumer,Function<E,List<E>> setSubChildren){
for(E l : tree){
consumer.accept(l);
List<E> es = setSubChildren.apply(l);
if(es != null && es.size() > 0){
forPreOrder(es,consumer,setSubChildren);
}
}
}
/**
*层序遍历
*
*@paramtree需要遍历的树
*@paramconsumer遍历后对单个元素的处理方法x->System.out.println(x)、System.out::println打印元素
*@paramsetSubChildren设置下级数据方法Menu::getSubMenus,x->x.setSubMenus(null)
*@param<E>泛型实体对象
*/
public static <E> void forLevelOrder(List<E> tree,Consumer<E> consumer,Function<E,List<E>> setSubChildren){
Queue<E> queue=new LinkedList<>(tree);
while(!queue.isEmpty()){
E item = queue.poll();
consumer.accept(item);
List<E> childList = setSubChildren.apply(item);
if(childList !=null && !childList.isEmpty()){
queue.addAll(childList);
}
}
}
/**
*后序遍历
*
*@paramtree需要遍历的树
*@paramconsumer遍历后对单个元素的处理方法x->System.out.println(x)、System.out::println打印元素
*@paramsetSubChildren设置下级数据方法Menu::getSubMenus,x->x.setSubMenus(null)
*@param<E>泛型实体对象
*/
public static <E> void forPostOrder(List<E> tree,Consumer<E> consumer,Function<E,List<E>> setSubChildren){
for(E item : tree) {
List<E> childList = setSubChildren.apply(item);
if(childList != null && !childList.isEmpty()){
forPostOrder(childList,consumer,setSubChildren);
}
consumer.accept(item);
}
}
/**
*对树所有子节点按comparator排序
*
*@paramtree需要排序的树
*@paramcomparator排序规则ComparatorComparator.comparing(MenuVo::getRank)按Rank正序,(x,y)->y.getRank().compareTo(x.getRank())按Rank倒序
*@paramgetChildren获取下级数据方法MenuVo::getSubMenus
*@return排序好的树
*@param<E>泛型实体对象
*/
public static <E> List<E> sort(List<E> tree, Comparator<? super E> comparator, Function<E,List<E>> getChildren){
for(E item : tree){
List<E> childList = getChildren.apply(item);
if(childList != null &&! childList.isEmpty()){
sort(childList,comparator,getChildren);
}
}
tree.sort(comparator);
return tree;
}
private static <E> List<E> makeChildren(E parent,List<E> allData,BiFunction<E,E,Boolean> parentCheck,BiConsumer<E,List<E>> children){
return allData.stream().filter(x->parentCheck.apply(parent,x)).peek(x->children.accept(x,makeChildren(x,allData,parentCheck,children))).collect(Collectors.toList());
}
/**
* 使用样例
* @param args
*/
public static void main(String[] args) {
MenuVo menu0 = new MenuVo(0L, -1L, "一级菜单", 0);
MenuVo menu1 = new MenuVo(1L, 0L, "二级菜单", 1);
MenuVo menu2 = new MenuVo(2L, 0L, "三级菜单", 2);
MenuVo menu3 = new MenuVo(3L, 1L, "四级菜单", 3);
MenuVo menu4 = new MenuVo(4L, 1L, "五级菜单", 4);
MenuVo menu5 = new MenuVo(5L, 2L, "六级菜单", 5);
MenuVo menu6 = new MenuVo(6L, 2L, "七级菜单", 6);
MenuVo menu7 = new MenuVo(7L, 3L, "八级菜单", 7);
MenuVo menu8 = new MenuVo(8L, 3L, "九级菜单", 8);
MenuVo menu9 = new MenuVo(9L, 4L, "十级菜单", 9);
//基本数据
List<MenuVo> menuList = Arrays.asList(menu0,menu1, menu2,menu3,menu4,menu5,menu6,menu7,menu8,menu9);
//合成树
/**
* 第1个参数List list为我们需要合成树的List如上面Demo中的menuList
* 第2个参数Predicate rootCheck判断为根节点的条件如上面Demo中pId==-1就是根节点
* 第3个参数parentCheck 判断为父节点条件如上面Demo中 id==pId
* 第4个参数setSubChildren设置下级数据方法如上面Demo中Menu::setSubMenus
*/
List<MenuVo> tree= TreeUtil.makeTree(menuList, x->x.getPId()==-1L,(x, y)->x.getId().equals(y.getPId()), MenuVo::setSubMenus);
System.out.println(JSON.toJSONString(tree));
//先序
/**
* 遍历数参数解释:
* tree 需要遍历的树就是makeTree()合
* 成的对象Consumer consumer 遍历后对单个元素的处理方法x-> System.out.println(x)、 postOrder.append(x.getId().toString())
* Function<E, List> getSubChildren,获取下级数据方法如Menu::getSubMenus
*/
StringBuffer preStr = new StringBuffer();
TreeUtil.forPreOrder(tree,x-> preStr.append(x.getId().toString()),MenuVo::getSubMenus);
ObjectUtils.equalsAny("0123456789",preStr.toString());
//层序
StringBuffer levelStr=new StringBuffer();
TreeUtil.forLevelOrder(tree,x-> levelStr.append(x.getId().toString()),MenuVo::getSubMenus);
ObjectUtils.equalsAny("0123456789",levelStr.toString());
//后序
StringBuffer postOrder=new StringBuffer();
TreeUtil.forPostOrder(tree,x-> postOrder.append(x.getId().toString()),MenuVo::getSubMenus);
ObjectUtils.equalsAny("7839415620",postOrder.toString());
// 树平铺
/**
* flat()参数解释:
* tree 需要打平的树,就是makeTree()合成的对象Function<E, List> getSubChildren,
* 获取下级数据方法如Menu::getSubMenusConsumer setSubChildren,
* 设置下级数据方法x->x.setSubMenus(null)
*/
List<MenuVo> flat = TreeUtil.flat(tree, MenuVo::getSubMenus,x->x.setSubMenus(null));
ObjectUtils.equalsAny(flat.size(),menuList.size());
flat.forEach(x -> {
if (x.getSubMenus() != null) {
throw new RuntimeException("树平铺失败");
}
});
// 按rank正序
/**
* sort参数解释
* tree 需要排序的树,就是makeTree()合成的对象Comparator<? super E> comparator
* 排序规则ComparatorComparator.comparing(MenuVo::getRank) 按Rank正序 ,(x,y)->y.getRank().compareTo(x.getRank())按Rank倒序Function<E, List> getChildren
* 获取下级数据方法MenuVo::getSubMenus
*/
List<MenuVo> sortTree= TreeUtil.sort(tree, Comparator.comparing(MenuVo::getRank), MenuVo::getSubMenus);
// 按rank倒序
List<MenuVo> sortTreeReverse = TreeUtil.sort(tree, (x,y)->y.getRank().compareTo(x.getRank()), MenuVo::getSubMenus);
}
@Data
static class MenuVo {
private Long id; // 主键id
private Long pId; // 父级id
private String name; // 菜单名称
private Integer rank = 0; // 排序
private List<MenuVo> subMenus = new ArrayList<>(); // 子菜单
public MenuVo(Long id, Long pId, String name, Integer rank) {
this.id = id;
this.pId = pId;
this.name = name;
this.rank = rank;
}
}
}

View File

@@ -2,12 +2,12 @@ package com.zt.plat.framework.common.util.validation;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.Assert;
import org.springframework.util.StringUtils;
import jakarta.validation.ConstraintViolation;
import jakarta.validation.ConstraintViolationException;
import jakarta.validation.Validation;
import jakarta.validation.Validator;
import org.springframework.util.StringUtils;
import java.util.Set;
import java.util.regex.Pattern;

View File

@@ -2,6 +2,7 @@ package com.zt.plat.framework.common.validation;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import java.lang.annotation.*;
@Target({

View File

@@ -2,6 +2,7 @@ package com.zt.plat.framework.common.validation;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import java.lang.annotation.*;
@Target({

View File

@@ -2,7 +2,6 @@ package com.zt.plat.framework.common.validation;
import cn.hutool.core.text.CharSequenceUtil;
import cn.hutool.core.util.PhoneUtil;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;

View File

@@ -1,9 +1,9 @@
package com.zt.plat.framework.business.interceptor;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.pojo.CommonResultCodeEnum;
import com.zt.plat.framework.common.pojo.CompanyDeptInfo;
import com.fasterxml.jackson.databind.ObjectMapper;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;

View File

@@ -1,7 +1,7 @@
package com.zt.plat.framework.datapermission.core.aop;
import com.zt.plat.framework.datapermission.core.annotation.DataPermission;
import com.alibaba.ttl.TransmittableThreadLocal;
import com.zt.plat.framework.datapermission.core.annotation.DataPermission;
import java.util.LinkedList;
import java.util.List;

View File

@@ -1,10 +1,10 @@
package com.zt.plat.framework.datapermission.core.db;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.extension.plugins.handler.MultiDataPermissionHandler;
import com.zt.plat.framework.datapermission.core.rule.DataPermissionRule;
import com.zt.plat.framework.datapermission.core.rule.DataPermissionRuleFactory;
import com.zt.plat.framework.mybatis.core.util.MyBatisUtils;
import com.baomidou.mybatisplus.extension.plugins.handler.MultiDataPermissionHandler;
import lombok.RequiredArgsConstructor;
import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.expression.operators.conditional.AndExpression;

View File

@@ -8,7 +8,10 @@ import com.zt.plat.framework.mybatis.core.util.MyBatisUtils;
import com.zt.plat.framework.tenant.core.context.CompanyContextHolder;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.sf.jsqlparser.expression.*;
import net.sf.jsqlparser.expression.Alias;
import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.expression.LongValue;
import net.sf.jsqlparser.expression.NullValue;
import net.sf.jsqlparser.expression.operators.relational.ExpressionList;
import net.sf.jsqlparser.expression.operators.relational.InExpression;
import net.sf.jsqlparser.expression.operators.relational.ParenthesedExpressionList;

View File

@@ -1,10 +1,10 @@
package com.zt.plat.framework.datapermission.core.db;
import com.baomidou.mybatisplus.extension.plugins.inner.DataPermissionInterceptor;
import com.zt.plat.framework.datapermission.core.rule.DataPermissionRule;
import com.zt.plat.framework.datapermission.core.rule.DataPermissionRuleFactory;
import com.zt.plat.framework.mybatis.core.util.MyBatisUtils;
import com.zt.plat.framework.test.core.ut.BaseMockitoUnitTest;
import com.baomidou.mybatisplus.extension.plugins.inner.DataPermissionInterceptor;
import net.sf.jsqlparser.expression.Alias;
import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.expression.LongValue;

View File

@@ -3,7 +3,7 @@ package com.zt.plat.framework.datapermission.core.util;
import com.zt.plat.framework.datapermission.core.aop.DataPermissionContextHolder;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
import static org.junit.jupiter.api.Assertions.assertFalse;
public class DataPermissionUtilsTest {

View File

@@ -1,8 +1,8 @@
package com.zt.plat.framework.ip.core;
import com.zt.plat.framework.ip.core.enums.AreaTypeEnum;
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.zt.plat.framework.ip.core.enums.AreaTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

View File

@@ -4,7 +4,6 @@ import com.zt.plat.framework.ip.core.Area;
import org.junit.jupiter.api.Test;
import org.lionsoul.ip2region.xdb.Searcher;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**

View File

@@ -2,11 +2,11 @@ package com.zt.plat.framework.env.core.util;
import com.zt.plat.framework.env.config.EnvProperties;
import feign.RequestTemplate;
import jakarta.servlet.http.HttpServletRequest;
import lombok.SneakyThrows;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.core.env.Environment;
import jakarta.servlet.http.HttpServletRequest;
import java.net.InetAddress;
import java.util.Objects;

View File

@@ -66,7 +66,7 @@
<dependency>
<groupId>com.zt.plat</groupId>
<artifactId>zt-spring-boot-starter-biz-ip</artifactId>
<optional>true</optional> <!-- 设置为 optional只有在 AreaConvert 的时候使用 -->
<!--<optional>true</optional>--> <!-- 设置为 optional只有在 AreaConvert 的时候使用 -->
</dependency>
<!-- Test 测试相关 -->

View File

@@ -1,13 +1,13 @@
package com.zt.plat.framework.excel.core.convert;
import cn.hutool.core.convert.Convert;
import com.zt.plat.framework.ip.core.Area;
import com.zt.plat.framework.ip.core.utils.AreaUtils;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.ReadCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import com.zt.plat.framework.ip.core.Area;
import com.zt.plat.framework.ip.core.utils.AreaUtils;
import lombok.extern.slf4j.Slf4j;
/**

View File

@@ -5,7 +5,6 @@ import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;

View File

@@ -7,7 +7,6 @@ import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* Metrics 配置类

View File

@@ -2,8 +2,8 @@ package com.zt.plat.framework.tracer.core.aop;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.StrUtil;
import com.zt.plat.framework.tracer.core.annotation.BizTrace;
import com.zt.plat.framework.common.util.spring.SpringExpressionUtils;
import com.zt.plat.framework.tracer.core.annotation.BizTrace;
import com.zt.plat.framework.tracer.core.util.TracerFrameworkUtils;
import io.opentracing.Span;
import io.opentracing.Tracer;

View File

@@ -1,7 +1,7 @@
package com.zt.plat.framework.mq.redis.core.pubsub;
import com.zt.plat.framework.mq.redis.core.message.AbstractRedisMessage;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.zt.plat.framework.mq.redis.core.message.AbstractRedisMessage;
/**
* Redis Channel Message 抽象类

View File

@@ -1,7 +1,7 @@
package com.zt.plat.framework.mq.redis.core.stream;
import com.zt.plat.framework.mq.redis.core.message.AbstractRedisMessage;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.zt.plat.framework.mq.redis.core.message.AbstractRedisMessage;
/**
* Redis Stream Message 抽象类

View File

@@ -1,12 +1,12 @@
package com.zt.plat.framework.datasource.core.filter;
import com.alibaba.druid.util.Utils;
import org.springframework.web.filter.OncePerRequestFilter;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.filter.OncePerRequestFilter;
import java.io.IOException;
/**

View File

@@ -19,6 +19,12 @@ import com.baomidou.mybatisplus.extension.toolkit.Db;
import com.github.yulichang.base.MPJBaseMapper;
import com.github.yulichang.interfaces.MPJBaseJoin;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.zt.plat.framework.common.pojo.PageParam;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.common.pojo.SortablePageParam;
import com.zt.plat.framework.common.pojo.SortingField;
import com.zt.plat.framework.mybatis.core.util.JdbcUtils;
import com.zt.plat.framework.mybatis.core.util.MyBatisUtils;
import org.apache.ibatis.annotations.Param;
import java.util.Collection;

View File

@@ -1,8 +1,8 @@
package com.zt.plat.framework.lock4j.core;
import com.baomidou.lock.LockFailureStrategy;
import com.zt.plat.framework.common.exception.ServiceException;
import com.zt.plat.framework.common.exception.enums.GlobalErrorCodeConstants;
import com.baomidou.lock.LockFailureStrategy;
import lombok.extern.slf4j.Slf4j;
import java.lang.reflect.Method;

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>zt-framework</artifactId>
<groupId>com.zt.plat</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<artifactId>zt-spring-boot-starter-seata-dm</artifactId>
<name>${project.artifactId}</name>
<description>
Seata 达梦数据库补丁模块
解决 DmdbTimestamp 时区格式不一致导致的 dirty undo log 回滚失败问题
补丁来源: https://github.com/apache/incubator-seata/pull/7538
Seata 2.6.0 发布后可移除此模块
</description>
<dependencies>
<!-- 仅编译时需要,运行时由 seata-spring-boot-starter 提供 -->
<dependency>
<groupId>org.apache.seata</groupId>
<artifactId>seata-spring-boot-starter</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,326 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.seata.rm.datasource;
import org.apache.seata.common.util.CollectionUtils;
import org.apache.seata.common.util.StringUtils;
import org.apache.seata.core.model.Result;
import org.apache.seata.rm.datasource.sql.struct.Field;
import org.apache.seata.rm.datasource.sql.struct.Row;
import org.apache.seata.rm.datasource.sql.struct.TableRecords;
import org.apache.seata.rm.datasource.undo.AbstractUndoLogManager;
import org.apache.seata.rm.datasource.undo.parser.FastjsonUndoLogParser;
import org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser;
import org.apache.seata.sqlparser.struct.TableMeta;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;
import java.sql.Types;
import java.time.Instant;
import java.time.LocalDateTime;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
/**
* DataCompareUtils - 包含达梦数据库 DmdbTimestamp 时区问题的补丁
* <p>
* 此类覆盖 Seata 原有的 DataCompareUtils添加了对达梦数据库 DmdbTimestamp 类型的特殊处理。
* 通过将 DmdbTimestamp 转换为 UTC Instant 进行比较,解决时区格式不一致导致的 dirty undo log 问题。
* <p>
* 问题背景:
* - 达梦数据库的 DmdbTimestamp 类型在序列化/反序列化后时区格式不一致
* - 例如beforeImage 为 "2025-12-25 09:38:54.077811 +08:00"
* afterImage 为 "2025-12-25 09:38:54.077811"
* - 导致 Seata AT 模式回滚时 dirty undo log 检查失败
* <p>
* 解决方案:
* - 当检测到 DmdbTimestamp 类型时,将两个值都转换为 UTC Instant 进行比较
* - 这样可以忽略时区格式差异,只比较实际的时间点
* <p>
* 补丁来源: https://github.com/apache/incubator-seata/pull/7538
* 相关 Issue: https://github.com/apache/incubator-seata/issues/7453
* 该修复已合并到 Seata 2.x 分支,将在 Seata 2.6.0 正式发布,届时可删除此模块。
*
* @author Seata Community (PR #7538)
*/
public class DataCompareUtils {
private static final Logger LOGGER = LoggerFactory.getLogger(DataCompareUtils.class);
/**
* 标识补丁类是否已加载
*/
private static final boolean PATCHED;
static {
PATCHED = true;
LOGGER.info("[zt-spring-boot-starter-seata-dm] DataCompareUtils 补丁类已加载,用于解决达梦数据库 DmdbTimestamp 时区问题");
}
private DataCompareUtils() {}
/**
* Is field equals result.
*
* @param f0 the f 0
* @param f1 the f 1
* @return the result
*/
public static Result<Boolean> isFieldEquals(Field f0, Field f1) {
if (f0 == null) {
return Result.build(f1 == null);
} else {
if (f1 == null) {
return Result.build(false);
} else {
if (StringUtils.equalsIgnoreCase(f0.getName(), f1.getName()) && f0.getType() == f1.getType()) {
if (f0.getValue() == null) {
return Result.build(f1.getValue() == null);
} else {
if (f1.getValue() == null) {
return Result.buildWithParams(
false, "Field not equals, name {}, new value is null", f0.getName());
} else {
String currentSerializer = AbstractUndoLogManager.getCurrentSerializer();
if (StringUtils.equals(currentSerializer, FastjsonUndoLogParser.NAME)) {
convertType(f0, f1);
}
// 达梦数据库 DmdbTimestamp 时区补丁 (PR #7538)
if (StringUtils.equals(currentSerializer, JacksonUndoLogParser.NAME)) {
Object v0 = f0.getValue();
Object v1 = f1.getValue();
if (isDmdbTimestamp(v0) && isDmdbTimestamp(v1)) {
Instant i0 = toInstant(v0);
Instant i1 = toInstant(v1);
boolean equals = Objects.equals(i0, i1);
LOGGER.info("[zt-seata-dm-patch] DmdbTimestamp 字段比较: field={}, equals={}", f0.getName(), equals);
return equals
? Result.ok()
: Result.buildWithParams(
false,
"Field not equals (DmdbTimestamp), name {}, old value {}, new value {}",
f0.getName(),
v0,
v1);
}
}
boolean result = Objects.deepEquals(f0.getValue(), f1.getValue());
if (result) {
return Result.ok();
} else {
return Result.buildWithParams(
false,
"Field not equals, name {}, old value {}, new value {}",
f0.getName(),
f0.getValue(),
f1.getValue());
}
}
}
} else {
return Result.buildWithParams(
false,
"Field not equals, old name {} type {}, new name {} type {}",
f0.getName(),
f0.getType(),
f1.getName(),
f1.getType());
}
}
}
}
private static void convertType(Field f0, Field f1) {
int f0Type = f0.getType();
int f1Type = f1.getType();
if (f0Type == Types.DATE && f0.getValue().getClass().equals(String.class)) {
String[] strings = f0.getValue().toString().split(" ");
f0.setValue(Date.valueOf(strings[0]));
}
if (f1Type == Types.DATE && f1.getValue().getClass().equals(String.class)) {
String[] strings = f1.getValue().toString().split(" ");
f1.setValue(Date.valueOf(strings[0]));
}
if (f0Type == Types.TIME && f0.getValue().getClass().equals(String.class)) {
f0.setValue(Time.valueOf(f0.getValue().toString()));
}
if (f1Type == Types.TIME && f1.getValue().getClass().equals(String.class)) {
f1.setValue(Time.valueOf(f1.getValue().toString()));
}
if (f0Type == Types.TIMESTAMP && f0.getValue().getClass().equals(String.class)) {
if (f1.getValue().getClass().equals(LocalDateTime.class)) {
f0.setValue(LocalDateTime.parse(f0.getValue().toString()));
} else {
f0.setValue(Timestamp.valueOf(f0.getValue().toString()));
}
}
if (f1Type == Types.TIMESTAMP && f1.getValue().getClass().equals(String.class)) {
f1.setValue(Timestamp.valueOf(f1.getValue().toString()));
}
if (f0Type == Types.DECIMAL && f0.getValue().getClass().equals(Integer.class)) {
f0.setValue(new BigDecimal(f0.getValue().toString()));
}
if (f1Type == Types.DECIMAL && f1.getValue().getClass().equals(Integer.class)) {
f1.setValue(new BigDecimal(f1.getValue().toString()));
}
if (f0Type == Types.BIGINT && f0.getValue().getClass().equals(Integer.class)) {
f0.setValue(Long.parseLong(f0.getValue().toString()));
}
if (f1Type == Types.BIGINT && f1.getValue().getClass().equals(Integer.class)) {
f1.setValue(Long.parseLong(f1.getValue().toString()));
}
}
/**
* Is records equals result.
*
* @param beforeImage the before image
* @param afterImage the after image
* @return the result
*/
public static Result<Boolean> isRecordsEquals(TableRecords beforeImage, TableRecords afterImage) {
if (beforeImage == null) {
return Result.build(afterImage == null, null);
} else {
if (afterImage == null) {
return Result.build(false, null);
}
if (beforeImage.getTableName().equalsIgnoreCase(afterImage.getTableName())
&& CollectionUtils.isSizeEquals(beforeImage.getRows(), afterImage.getRows())) {
// when image is EmptyTableRecords, getTableMeta will throw an exception
if (CollectionUtils.isEmpty(beforeImage.getRows())) {
return Result.ok();
}
return compareRows(beforeImage.getTableMeta(), beforeImage.getRows(), afterImage.getRows());
} else {
return Result.build(false, null);
}
}
}
/**
* Is rows equals result.
*
* @param tableMetaData the table meta data
* @param oldRows the old rows
* @param newRows the new rows
* @return the result
*/
public static Result<Boolean> isRowsEquals(TableMeta tableMetaData, List<Row> oldRows, List<Row> newRows) {
if (!CollectionUtils.isSizeEquals(oldRows, newRows)) {
return Result.build(false, null);
}
return compareRows(tableMetaData, oldRows, newRows);
}
private static Result<Boolean> compareRows(TableMeta tableMetaData, List<Row> oldRows, List<Row> newRows) {
// old row to map
Map<String, Map<String, Field>> oldRowsMap = rowListToMap(oldRows, tableMetaData.getPrimaryKeyOnlyName());
// new row to map
Map<String, Map<String, Field>> newRowsMap = rowListToMap(newRows, tableMetaData.getPrimaryKeyOnlyName());
// compare data
for (Map.Entry<String, Map<String, Field>> oldEntry : oldRowsMap.entrySet()) {
String key = oldEntry.getKey();
Map<String, Field> oldRow = oldEntry.getValue();
Map<String, Field> newRow = newRowsMap.get(key);
if (newRow == null) {
return Result.buildWithParams(false, "compare row failed, rowKey {}, reason [newRow is null]", key);
}
for (Map.Entry<String, Field> oldRowEntry : oldRow.entrySet()) {
String fieldName = oldRowEntry.getKey();
Field oldField = oldRowEntry.getValue();
Field newField = newRow.get(fieldName);
if (newField == null) {
return Result.buildWithParams(
false,
"compare row failed, rowKey {}, fieldName {}, reason [newField is null]",
key,
fieldName);
}
Result<Boolean> oldEqualsNewFieldResult = isFieldEquals(oldField, newField);
if (!oldEqualsNewFieldResult.getResult()) {
return oldEqualsNewFieldResult;
}
}
}
return Result.ok();
}
/**
* Row list to map map.
*
* @param rowList the row list
* @param primaryKeyList the primary key list
* @return the map
*/
public static Map<String, Map<String, Field>> rowListToMap(List<Row> rowList, List<String> primaryKeyList) {
// {value of primaryKey, value of all columns}
Map<String, Map<String, Field>> rowMap = new HashMap<>();
for (Row row : rowList) {
// ensure the order of column
List<Field> rowFieldList = row.getFields().stream()
.sorted(Comparator.comparing(Field::getName))
.collect(Collectors.toList());
// {uppercase fieldName : field}
Map<String, Field> colsMap = new HashMap<>();
StringBuilder rowKey = new StringBuilder();
boolean firstUnderline = false;
for (int j = 0; j < rowFieldList.size(); j++) {
Field field = rowFieldList.get(j);
if (primaryKeyList.stream().anyMatch(e -> field.getName().equals(e))) {
if (firstUnderline && j > 0) {
rowKey.append("_");
}
rowKey.append(String.valueOf(field.getValue()));
firstUnderline = true;
}
colsMap.put(field.getName().trim().toUpperCase(), field);
}
rowMap.put(rowKey.toString(), colsMap);
}
return rowMap;
}
/**
* 判断是否为达梦数据库的 DmdbTimestamp 类型
*/
private static boolean isDmdbTimestamp(Object obj) {
return obj != null
&& "dm.jdbc.driver.DmdbTimestamp".equals(obj.getClass().getName());
}
/**
* 将 DmdbTimestamp 转换为 Instant
*/
private static Instant toInstant(Object dmdbTimestamp) {
try {
Method toInstantMethod = dmdbTimestamp.getClass().getMethod("toInstant");
return (Instant) toInstantMethod.invoke(dmdbTimestamp);
} catch (Exception e) {
throw new RuntimeException("Failed to convert DmdbTimestamp to Instant", e);
}
}
}

View File

@@ -1,11 +1,11 @@
package com.zt.plat.framework.security.config;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import java.util.Collections;
import java.util.List;

View File

@@ -2,17 +2,17 @@ package com.zt.plat.framework.security.core.handler;
import com.zt.plat.framework.common.exception.enums.GlobalErrorCodeConstants;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
import com.zt.plat.framework.common.util.servlet.ServletUtils;
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.web.access.AccessDeniedHandler;
import org.springframework.security.web.access.ExceptionTranslationFilter;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import static com.zt.plat.framework.common.exception.enums.GlobalErrorCodeConstants.FORBIDDEN;

View File

@@ -3,15 +3,14 @@ package com.zt.plat.framework.security.core.handler;
import com.zt.plat.framework.common.exception.enums.GlobalErrorCodeConstants;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.util.servlet.ServletUtils;
import jakarta.servlet.FilterChain;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.AuthenticationEntryPoint;
import org.springframework.security.web.access.ExceptionTranslationFilter;
import jakarta.servlet.FilterChain;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import static com.zt.plat.framework.common.exception.enums.GlobalErrorCodeConstants.UNAUTHORIZED;
/**

View File

@@ -1,14 +1,14 @@
package com.zt.plat.framework.test.core.ut;
import cn.hutool.extra.spring.SpringUtil;
import com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure;
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration;
import com.zt.plat.framework.common.biz.system.sequence.SequenceCommonApi;
import com.zt.plat.framework.datasource.config.ZtDataSourceAutoConfiguration;
import com.zt.plat.framework.mybatis.config.ZtMybatisAutoConfiguration;
import com.zt.plat.framework.redis.config.ZtRedisAutoConfiguration;
import com.zt.plat.framework.test.config.RedisTestConfiguration;
import com.zt.plat.framework.test.config.SqlInitializationTestConfiguration;
import com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure;
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration;
import org.redisson.spring.starter.RedissonAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;

View File

@@ -1,6 +1,9 @@
package com.zt.plat.framework.test.core.ut;
import cn.hutool.extra.spring.SpringUtil;
import com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure;
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration;
import com.github.yulichang.autoconfigure.MybatisPlusJoinAutoConfiguration;
import com.zt.plat.framework.common.biz.system.sequence.SequenceCommonApi;
import com.zt.plat.framework.datasource.config.ZtDataSourceAutoConfiguration;
import com.zt.plat.framework.mybatis.config.ZtMybatisAutoConfiguration;

View File

@@ -7,6 +7,7 @@ import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.BooleanUtil;
import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.databind.JsonNode;
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
import com.zt.plat.framework.apilog.core.enums.OperateTypeEnum;
import com.zt.plat.framework.common.biz.infra.logger.ApiAccessLogCommonApi;
@@ -19,7 +20,6 @@ import com.zt.plat.framework.common.util.servlet.ServletUtils;
import com.zt.plat.framework.web.config.WebProperties;
import com.zt.plat.framework.web.core.filter.ApiRequestFilter;
import com.zt.plat.framework.web.core.util.WebFrameworkUtils;
import com.fasterxml.jackson.databind.JsonNode;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.FilterChain;

View File

@@ -1,8 +1,8 @@
package com.zt.plat.framework.desensitize.core.slider.annotation;
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.zt.plat.framework.desensitize.core.base.annotation.DesensitizeBy;
import com.zt.plat.framework.desensitize.core.slider.handler.BankCardDesensitization;
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import java.lang.annotation.*;

View File

@@ -1,8 +1,8 @@
package com.zt.plat.framework.desensitize.core.slider.annotation;
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.zt.plat.framework.desensitize.core.base.annotation.DesensitizeBy;
import com.zt.plat.framework.desensitize.core.slider.handler.CarLicenseDesensitization;
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import java.lang.annotation.*;

View File

@@ -1,8 +1,8 @@
package com.zt.plat.framework.desensitize.core.slider.annotation;
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.zt.plat.framework.desensitize.core.base.annotation.DesensitizeBy;
import com.zt.plat.framework.desensitize.core.slider.handler.ChineseNameDesensitization;
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import java.lang.annotation.*;

View File

@@ -1,12 +1,12 @@
package com.zt.plat.framework.web.core.filter;
import com.zt.plat.framework.common.util.servlet.ServletUtils;
import org.springframework.web.filter.OncePerRequestFilter;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.filter.OncePerRequestFilter;
import java.io.IOException;
/**

View File

@@ -1,11 +1,11 @@
package com.zt.plat.framework.web.core.filter;
import com.zt.plat.framework.common.util.servlet.ServletUtils;
import jakarta.servlet.ReadListener;
import jakarta.servlet.ServletInputStream;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletRequestWrapper;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;

View File

@@ -1,15 +1,11 @@
package com.zt.plat.framework.desensitize.core.annotation;
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.zt.plat.framework.desensitize.core.DesensitizeTest;
import com.zt.plat.framework.desensitize.core.base.annotation.DesensitizeBy;
import com.zt.plat.framework.desensitize.core.handler.AddressHandler;
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.annotation.*;
/**
* 地址

View File

@@ -1,8 +1,8 @@
package com.zt.plat.framework.desensitize.core.handler;
import com.zt.plat.framework.desensitize.core.DesensitizeTest;
import com.zt.plat.framework.desensitize.core.base.handler.DesensitizationHandler;
import com.zt.plat.framework.desensitize.core.annotation.Address;
import com.zt.plat.framework.desensitize.core.base.handler.DesensitizationHandler;
/**
* {@link Address} 的脱敏处理器

View File

@@ -3,10 +3,11 @@ package com.zt.plat.gateway.filter.logging;
import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.nacos.common.utils.StringUtils;
import com.zt.plat.framework.common.util.json.JsonUtils;
import com.zt.plat.gateway.util.SecurityFrameworkUtils;
import com.zt.plat.gateway.util.WebFrameworkUtils;
import com.alibaba.nacos.common.utils.StringUtils;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.reactivestreams.Publisher;
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
@@ -37,7 +38,6 @@ import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import jakarta.annotation.Resource;
import java.nio.charset.StandardCharsets;
import java.time.LocalDateTime;
import java.util.List;

View File

@@ -30,6 +30,8 @@ spring:
username: ${config.username} # Nacos 账号
password: ${config.password} # Nacos 密码
discovery: # 【配置中心】配置项
ip: 172.16.46.62
port: 30092
namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
metadata:
@@ -70,7 +72,7 @@ spring:
- id: infra-spring-boot-admin # 路由的编号Spring Boot Admin
uri: grayLb://infra-server
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
- Path=/admin/**
- Path=/admin/
- id: infra-websocket # 路由的编号WebSocket
uri: grayLb://infra-server
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
@@ -186,13 +188,6 @@ spring:
- Path=/admin-api/crm/**
filters:
- RewritePath=/admin-api/crm/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
## rule-server 服务
- id: rule-admin-api # 路由的编号
uri: grayLb://rule-server
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
- Path=/admin-api/rule/**
filters:
- RewritePath=/admin-api/rule/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
## ai-server 服务
- id: ai-admin-api # 路由的编号
uri: grayLb://ai-server
@@ -214,6 +209,64 @@ spring:
- Path=/admin-api/template/**
filters:
- RewritePath=/admin-api/template/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
## logistics-server 服务
- id: logistics-api # 路由的编号
uri: grayLb://logistics-server
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
- Path=/lgst/**
- id: logistics-admin-api # 路由的编号
uri: grayLb://logistics-server
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
- Path=/admin-api/lgst/**
filters:
- RewritePath=/admin-api/lgst/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
## supply-server 服务
- id: supply-admin-api # 路由的编号
uri: grayLb://supply-server
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
- Path=/admin-api/supply/**
filters:
- RewritePath=/admin-api/supply/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
- id: supply-sply-admin-api # 路由的编号supply-server的sply路径
uri: grayLb://supply-server
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
- Path=/admin-api/sply/**
filters:
- RewritePath=/admin-api/sply/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
## qms-server 服务
- id: qms-admin-api # 路由的编号
uri: grayLb://qms-server
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
- Path=/admin-api/qms/**
filters:
- RewritePath=/admin-api/qms/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
## mes-server 服务
- id: mes-admin-api # 路由的编号
uri: grayLb://mes-server
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
- Path=/admin-api/mes/**
filters:
- RewritePath=/admin-api/mes/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
## manage-server 服务
- id: manage-admin-api # 路由的编号
uri: grayLb://manage-server
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
- Path=/admin-api/manage/**
filters:
- RewritePath=/admin-api/manage/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
## base-server 服务
- id: base-admin-api # 路由的编号
uri: grayLb://base-server
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
- Path=/admin-api/base/**
filters:
- RewritePath=/admin-api/base/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
- id: base-bse-admin-api # 路由的编号base-server的bse路径
uri: grayLb://base-server
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
- Path=/admin-api/bse/**
filters:
- RewritePath=/admin-api/bse/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
## databus-server 服务
- id: databus-admin-api # 路由的编号
uri: grayLb://databus-server
@@ -249,48 +302,66 @@ knife4j:
- name: infra-server
service-name: infra-server
url: /admin-api/infra/v3/api-docs
- name: member-server
service-name: member-server
url: /admin-api/member/v3/api-docs
# - name: member-server
# service-name: member-server
# url: /admin-api/member/v3/api-docs
- name: bpm-server
service-name: bpm-server
url: /admin-api/bpm/v3/api-docs
- name: pay-server
service-name: pay-server
url: /admin-api/pay/v3/api-docs
- name: mp-server
service-name: mp-server
url: /admin-api/mp/v3/api-docs
- name: product-server
service-name: product-server
url: /admin-api/product/v3/api-docs
- name: promotion-server
service-name: promotion-server
url: /admin-api/promotion/v3/api-docs
- name: trade-server
service-name: trade-server
url: /admin-api/trade/v3/api-docs
- name: statistics-server
service-name: statistics-server
url: /admin-api/statistics/v3/api-docs
- name: erp-server
service-name: erp-server
url: /admin-api/erp/v3/api-docs
- name: crm-server
service-name: crm-server
url: /admin-api/crm/v3/api-docs
- name: rule-server
service-name: rule-server
url: /admin-api/rule/v3/api-docs
- name: ai-server
service-name: ai-server
url: /admin-api/ai/v3/api-docs
- name: iot-server
service-name: iot-server
url: /admin-api/iot/v3/api-docs
- name: template-server
service-name: template-server
url: /admin-api/template/v3/api-docs
# - name: pay-server
# service-name: pay-server
# url: /admin-api/pay/v3/api-docs
# - name: mp-server
# service-name: mp-server
# url: /admin-api/mp/v3/api-docs
# - name: product-server
# service-name: product-server
# url: /admin-api/product/v3/api-docs
# - name: promotion-server
# service-name: promotion-server
# url: /admin-api/promotion/v3/api-docs
# - name: trade-server
# service-name: trade-server
# url: /admin-api/trade/v3/api-docs
# - name: statistics-server
# service-name: statistics-server
# url: /admin-api/statistics/v3/api-docs
# - name: erp-server
# service-name: erp-server
# url: /admin-api/erp/v3/api-docs
# - name: crm-server
# service-name: crm-server
# url: /admin-api/crm/v3/api-docs
# - name: ai-server
# service-name: ai-server
# url: /admin-api/ai/v3/api-docs
# - name: iot-server
# service-name: iot-server
# url: /admin-api/iot/v3/api-docs
- name: logistics-server
service-name: logistics-server
url: /admin-api/lgst/v3/api-docs
- name: supply-server
service-name: supply-server
url: /admin-api/supply/v3/api-docs
- name: supply-sply-server
service-name: supply-server
url: /admin-api/sply/v3/api-docs
- name: qms-server
service-name: qms-server
url: /admin-api/qms/v3/api-docs
- name: mes-server
service-name: mes-server
url: /admin-api/mes/v3/api-docs
- name: manage-server
service-name: manage-server
url: /admin-api/manage/v3/api-docs
- name: base-server
service-name: base-server
url: /admin-api/base/v3/api-docs
- name: base-bse-server
service-name: base-server
url: /admin-api/bse/v3/api-docs
- name: databus-server
service-name: databus-server
url: /admin-api/databus/v3/api-docs

View File

@@ -5,6 +5,10 @@
<springProperty scope="context" name="zt.info.base-package" source="zt.info.base-package"/>
<!-- 格式化输出:%d 表示日期,%X{tid} SkWalking 链路追踪编号,%thread 表示线程名,%-5level级别从左显示 5 个字符宽度,%msg日志消息%n是换行符 -->
<property name="PATTERN_DEFAULT" value="%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} | %highlight(${LOG_LEVEL_PATTERN:-%5p} ${PID:- }) | %boldYellow(%thread [%tid]) %boldGreen(%-40.40logger{39}) | %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/>
<!--应用名称-->
<springProperty scope="context" name="spring.application.name" source="spring.application.name"/>
<!-- 日志输出路径 -->
<property name="LOG_DIR" value="${user.home}/logs/${spring.application.name}"/>
<!-- 控制台 Appender -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">     
@@ -31,7 +35,7 @@
<!-- 启动服务时,是否清理历史日志,一般不建议清理 -->
<cleanHistoryOnStart>${LOGBACK_ROLLINGPOLICY_CLEAN_HISTORY_ON_START:-false}</cleanHistoryOnStart>
<!-- 日志文件,到达多少容量,进行滚动 -->
<maxFileSize>${LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE:-10MB}</maxFileSize>
<maxFileSize>${LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE:-50MB}</maxFileSize>
<!-- 日志文件的总大小0 表示不限制 -->
<totalSizeCap>${LOGBACK_ROLLINGPOLICY_TOTAL_SIZE_CAP:-0}</totalSizeCap>
<!-- 日志文件的保留天数 -->
@@ -56,18 +60,39 @@
</encoder>
</appender>
<!-- ERROR 级别日志 -->
<appender name="ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_DIR}-error.log</file>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${LOG_DIR}-error.%d{yyyy-MM-dd}.log</fileNamePattern>
<maxHistory>30</maxHistory> <!-- 保留30天的日志 -->
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<!--logback的日志级别 FATAL > ERROR > WARN > INFO > DEBUG-->
<!-- 本地环境 -->
<springProfile name="local">
<root level="INFO">
<springProfile name="local,dev">
<root level="WARN">
<appender-ref ref="STDOUT"/>
<appender-ref ref="ERROR"/>
<appender-ref ref="GRPC"/> <!-- 本地环境下,如果不想接入 SkyWalking 日志服务,可以注释掉本行 -->
<appender-ref ref="ASYNC"/> <!-- 本地环境下,如果不想打印日志,可以注释掉本行 -->
</root>
</springProfile>
<!-- 其它环境 -->
<springProfile name="dev,test,stage,prod,default">
<root level="INFO">
<appender-ref ref="STDOUT"/>
<appender-ref ref="ERROR"/>
<appender-ref ref="ASYNC"/>
<appender-ref ref="GRPC"/>
</root>

View File

@@ -1,9 +1,8 @@
package com.zt.plat.module.bpm.api.task.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import java.util.List;
import java.util.Map;

View File

@@ -33,6 +33,11 @@
<artifactId>zt-module-system-api</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.zt.plat</groupId>
<artifactId>zt-module-capital-api</artifactId>
<version>${revision}</version>
</dependency>
<!-- 业务组件 -->
<dependency>

View File

@@ -11,12 +11,9 @@ import com.alibaba.druid.support.logging.Log;
import com.alibaba.druid.support.logging.LogFactory;
import com.alibaba.druid.util.JdbcUtils;
import com.alibaba.druid.util.MySqlUtils;
import java.net.SocketTimeoutException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Statement;
import java.sql.*;
import java.util.ArrayList;
import java.util.List;

View File

@@ -24,6 +24,7 @@ import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import org.flowable.engine.history.HistoricProcessInstance;
import org.flowable.engine.repository.ProcessDefinition;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
@@ -40,7 +41,7 @@ import static com.zt.plat.framework.web.core.util.WebFrameworkUtils.getLoginUser
* @author jason
*/
@RestController
@Valid
@Validated
public class BpmProcessInstanceApiImpl implements BpmProcessInstanceApi {
@Resource

View File

@@ -1,11 +1,11 @@
package com.zt.plat.module.bpm.controller.admin.definition.vo.model.simple;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.zt.plat.framework.common.core.KeyValue;
import com.zt.plat.framework.common.validation.InEnum;
import com.zt.plat.module.bpm.enums.definition.*;
import com.zt.plat.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotEmpty;

View File

@@ -1,9 +1,9 @@
package com.zt.plat.module.bpm.controller.admin.task.vo.instance;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.zt.plat.module.bpm.controller.admin.base.user.UserSimpleBaseVO;
import com.zt.plat.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO;
import com.zt.plat.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

View File

@@ -1,9 +1,9 @@
package com.zt.plat.module.bpm.controller.admin.task.vo.instance;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.zt.plat.framework.common.core.KeyValue;
import com.zt.plat.module.bpm.controller.admin.base.user.UserSimpleBaseVO;
import com.zt.plat.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

View File

@@ -1,8 +1,8 @@
package com.zt.plat.module.bpm.controller.admin.task.vo.task;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.zt.plat.framework.common.core.KeyValue;
import com.zt.plat.module.bpm.controller.admin.base.user.UserSimpleBaseVO;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

View File

@@ -1,10 +1,10 @@
package com.zt.plat.module.bpm.dal.dataobject.definition;
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

View File

@@ -1,8 +1,8 @@
package com.zt.plat.module.bpm.dal.dataobject.definition;
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

View File

@@ -1,5 +1,7 @@
package com.zt.plat.module.bpm.dal.dataobject.definition;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
import com.zt.plat.framework.mybatis.core.type.LongListTypeHandler;
import com.zt.plat.module.bpm.controller.admin.definition.vo.model.BpmModelMetaInfoVO;
@@ -7,8 +9,6 @@ import com.zt.plat.module.bpm.enums.definition.BpmAutoApproveTypeEnum;
import com.zt.plat.module.bpm.enums.definition.BpmModelFormTypeEnum;
import com.zt.plat.module.bpm.enums.definition.BpmModelTypeEnum;
import com.zt.plat.module.system.api.user.dto.AdminUserRespDTO;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

View File

@@ -1,10 +1,10 @@
package com.zt.plat.module.bpm.dal.dataobject.definition;
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
import lombok.*;
/**

View File

@@ -1,11 +1,11 @@
package com.zt.plat.module.bpm.dal.dataobject.definition;
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
import com.zt.plat.module.bpm.enums.definition.BpmProcessListenerTypeEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
import com.zt.plat.module.bpm.enums.definition.BpmProcessListenerTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

View File

@@ -1,9 +1,9 @@
package com.zt.plat.module.bpm.dal.dataobject.definition;
import com.zt.plat.framework.common.enums.CommonStatusEnum;
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.zt.plat.framework.common.enums.CommonStatusEnum;
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

View File

@@ -1,11 +1,11 @@
package com.zt.plat.module.bpm.dal.dataobject.oa;
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
import com.zt.plat.module.bpm.enums.task.BpmTaskStatusEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
import com.zt.plat.module.bpm.enums.task.BpmTaskStatusEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

View File

@@ -1,10 +1,10 @@
package com.zt.plat.module.bpm.dal.dataobject.task;
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

View File

@@ -10,7 +10,8 @@ import org.springframework.stereotype.Repository;
import java.time.Duration;
import java.time.LocalDateTime;
import static cn.hutool.core.date.DatePattern.*;
import static cn.hutool.core.date.DatePattern.PURE_DATETIME_PATTERN;
import static cn.hutool.core.date.DatePattern.PURE_DATE_PATTERN;
/**
* BPM 流程 Id 编码的 Redis DAO

View File

@@ -5,6 +5,7 @@ import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.spring.SpringUtil;
import com.google.common.annotations.VisibleForTesting;
import com.zt.plat.framework.common.enums.CommonStatusEnum;
import com.zt.plat.framework.common.util.object.ObjectUtils;
import com.zt.plat.framework.datapermission.core.annotation.DataPermission;
@@ -16,7 +17,6 @@ import com.zt.plat.module.bpm.framework.flowable.core.util.FlowableUtils;
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
import com.zt.plat.module.system.api.user.AdminUserApi;
import com.zt.plat.module.system.api.user.dto.AdminUserRespDTO;
import com.google.common.annotations.VisibleForTesting;
import lombok.extern.slf4j.Slf4j;
import org.flowable.bpmn.model.BpmnModel;
import org.flowable.bpmn.model.CallActivity;

View File

@@ -2,11 +2,11 @@ package com.zt.plat.module.bpm.framework.flowable.core.candidate.strategy.dept;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.Assert;
import com.google.common.collect.Sets;
import com.zt.plat.module.bpm.framework.flowable.core.candidate.strategy.user.BpmTaskCandidateUserStrategy;
import com.zt.plat.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum;
import com.zt.plat.module.bpm.framework.flowable.core.util.FlowableUtils;
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
import com.google.common.collect.Sets;
import jakarta.annotation.Resource;
import org.flowable.bpmn.model.BpmnModel;
import org.flowable.engine.delegate.DelegateExecution;

View File

@@ -2,11 +2,11 @@ package com.zt.plat.module.bpm.framework.flowable.core.candidate.strategy.dept;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.Assert;
import com.google.common.collect.Sets;
import com.zt.plat.module.bpm.framework.flowable.core.candidate.strategy.user.BpmTaskCandidateUserStrategy;
import com.zt.plat.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum;
import com.zt.plat.module.bpm.framework.flowable.core.util.FlowableUtils;
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
import com.google.common.collect.Sets;
import jakarta.annotation.Resource;
import org.flowable.bpmn.model.BpmnModel;
import org.flowable.engine.delegate.DelegateExecution;

View File

@@ -1,10 +1,10 @@
package com.zt.plat.module.bpm.framework.flowable.core.candidate.strategy.other;
import com.google.common.collect.Sets;
import com.zt.plat.framework.common.util.collection.CollectionUtils;
import com.zt.plat.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy;
import com.zt.plat.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum;
import com.zt.plat.module.bpm.framework.flowable.core.util.FlowableUtils;
import com.google.common.collect.Sets;
import lombok.extern.slf4j.Slf4j;
import org.flowable.bpmn.model.BpmnModel;
import org.flowable.common.engine.api.FlowableException;

View File

@@ -1,7 +1,7 @@
package com.zt.plat.module.bpm.framework.flowable.core.listener;
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
import com.google.common.collect.ImmutableSet;
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
import jakarta.annotation.Resource;
import org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent;
import org.flowable.common.engine.api.delegate.event.FlowableEngineEventType;

View File

@@ -3,13 +3,13 @@ package com.zt.plat.module.bpm.framework.flowable.core.listener;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.google.common.collect.ImmutableSet;
import com.zt.plat.framework.common.util.number.NumberUtils;
import com.zt.plat.module.bpm.enums.definition.BpmBoundaryEventTypeEnum;
import com.zt.plat.module.bpm.framework.flowable.core.enums.BpmnModelConstants;
import com.zt.plat.module.bpm.framework.flowable.core.util.BpmnModelUtils;
import com.zt.plat.module.bpm.service.definition.BpmModelService;
import com.zt.plat.module.bpm.service.task.BpmTaskService;
import com.google.common.collect.ImmutableSet;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.flowable.bpmn.model.BoundaryEvent;

View File

@@ -2,6 +2,7 @@ package com.zt.plat.module.bpm.framework.flowable.core.util;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.core.type.TypeReference;
import com.zt.plat.framework.common.core.KeyValue;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.util.json.JsonUtils;
@@ -9,7 +10,6 @@ import com.zt.plat.framework.common.util.spring.SpringUtils;
import com.zt.plat.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO;
import com.zt.plat.module.bpm.enums.definition.BpmHttpRequestParamTypeEnum;
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
import com.fasterxml.jackson.core.type.TypeReference;
import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.runtime.ProcessInstance;
import org.springframework.http.HttpEntity;

View File

@@ -7,6 +7,7 @@ import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.ObjUtil;
import cn.hutool.core.util.StrUtil;
import com.google.common.collect.Maps;
import com.zt.plat.framework.common.util.collection.CollectionUtils;
import com.zt.plat.framework.common.util.json.JsonUtils;
import com.zt.plat.framework.common.util.number.NumberUtils;
@@ -15,11 +16,10 @@ import com.zt.plat.module.bpm.controller.admin.definition.vo.model.simple.BpmSim
import com.zt.plat.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
import com.zt.plat.module.bpm.enums.definition.*;
import com.zt.plat.module.bpm.framework.flowable.core.enums.BpmnModelConstants;
import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j;
import org.flowable.bpmn.converter.BpmnXMLConverter;
import org.flowable.bpmn.model.Process;
import org.flowable.bpmn.model.*;
import org.flowable.bpmn.model.Process;
import org.flowable.common.engine.api.FlowableException;
import org.flowable.common.engine.impl.util.io.BytesStreamSource;
import org.flowable.engine.impl.el.FixedValue;

View File

@@ -17,8 +17,8 @@ import com.zt.plat.module.bpm.service.task.listener.BpmCallActivityListener;
import com.zt.plat.module.bpm.service.task.listener.BpmUserTaskListener;
import org.flowable.bpmn.BpmnAutoLayout;
import org.flowable.bpmn.constants.BpmnXMLConstants;
import org.flowable.bpmn.model.Process;
import org.flowable.bpmn.model.*;
import org.flowable.bpmn.model.Process;
import org.flowable.engine.delegate.ExecutionListener;
import org.flowable.engine.delegate.TaskListener;

View File

@@ -1,5 +1,6 @@
package com.zt.plat.module.bpm.framework.rpc.config;
import com.zt.plat.module.capital.api.AmountCreditApplyApi;
import com.zt.plat.module.system.api.dept.DeptApi;
import com.zt.plat.module.system.api.dept.PostApi;
import com.zt.plat.module.system.api.dict.DictDataApi;
@@ -12,6 +13,6 @@ import org.springframework.context.annotation.Configuration;
@Configuration(value = "bpmRpcConfiguration", proxyBeanMethods = false)
@EnableFeignClients(clients = {RoleApi.class, DeptApi.class, PostApi.class, AdminUserApi.class, SmsSendApi.class, DictDataApi.class,
PermissionApi.class})
PermissionApi.class, AmountCreditApplyApi.class})
public class RpcConfiguration {
}

View File

@@ -1,9 +1,7 @@
package com.zt.plat.module.bpm.framework.web.config;
import com.zt.plat.framework.common.enums.WebFilterOrderEnum;
import com.zt.plat.framework.swagger.config.ZtSwaggerAutoConfiguration;
import com.zt.plat.module.bpm.framework.web.core.FlowableWebFilter;
import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

View File

@@ -24,7 +24,9 @@ import com.zt.plat.module.bpm.service.task.BpmProcessInstanceCopyService;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.flowable.bpmn.model.*;
import org.flowable.bpmn.model.BpmnModel;
import org.flowable.bpmn.model.StartEvent;
import org.flowable.bpmn.model.UserTask;
import org.flowable.common.engine.impl.db.SuspensionState;
import org.flowable.engine.HistoryService;
import org.flowable.engine.RepositoryService;
@@ -40,7 +42,9 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import java.util.*;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertMap;

View File

@@ -0,0 +1,42 @@
package com.zt.plat.module.bpm.service.supply.capital.listener;
import com.zt.plat.module.bpm.api.event.BpmProcessInstanceStatusEvent;
import com.zt.plat.module.bpm.api.event.BpmProcessInstanceStatusEventListener;
import com.zt.plat.module.bpm.enums.task.BpmProcessInstanceStatusEnum;
import com.zt.plat.module.capital.api.AmountCreditApplyApi;
import com.zt.plat.module.capital.enums.AmountCreditApplyApiStatusEnum;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* credit_letter_approval_process - 授信单的状态的监听器实现类
*
* @author qianshijiang
*/
@Component
public class BpmCreditLetterApprovalStatusListener extends BpmProcessInstanceStatusEventListener {
@Resource
private AmountCreditApplyApi amountCreditApplyApi;
@Override
protected List<String> getProcessDefinitionKey() {
return List.of(amountCreditApplyApi.PROCESS_KEY);
}
@Override
protected void onEvent(BpmProcessInstanceStatusEvent event) {
// 将流程中的状态转换为业务的状态
Integer status = event.getStatus();
String approvalStatus = null;
if (BpmProcessInstanceStatusEnum.APPROVE.getStatus() == status) {
approvalStatus = AmountCreditApplyApiStatusEnum.ACAS_PASS.getCode();
} else if (BpmProcessInstanceStatusEnum.REJECT.getStatus() == status) {
approvalStatus = AmountCreditApplyApiStatusEnum.ACAS_REJECT.getCode();
}
amountCreditApplyApi.updateAmountCreditApplyStatus(Long.parseLong(event.getBusinessKey()),approvalStatus);
}
}

View File

@@ -1,6 +1,7 @@
package com.zt.plat.module.bpm.service.task.trigger.form;
import cn.hutool.core.collection.CollUtil;
import com.fasterxml.jackson.core.type.TypeReference;
import com.zt.plat.framework.common.util.json.JsonUtils;
import com.zt.plat.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO;
import com.zt.plat.module.bpm.enums.definition.BpmTriggerTypeEnum;
@@ -8,7 +9,6 @@ import com.zt.plat.module.bpm.framework.flowable.core.util.BpmnModelUtils;
import com.zt.plat.module.bpm.framework.flowable.core.util.SimpleModelUtils;
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
import com.zt.plat.module.bpm.service.task.trigger.BpmTrigger;
import com.fasterxml.jackson.core.type.TypeReference;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

View File

@@ -1,6 +1,7 @@
package com.zt.plat.module.bpm.service.task.trigger.form;
import cn.hutool.core.collection.CollUtil;
import com.fasterxml.jackson.core.type.TypeReference;
import com.zt.plat.framework.common.util.json.JsonUtils;
import com.zt.plat.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO.TriggerSetting.FormTriggerSetting;
import com.zt.plat.module.bpm.enums.definition.BpmTriggerTypeEnum;
@@ -8,7 +9,6 @@ import com.zt.plat.module.bpm.framework.flowable.core.util.BpmnModelUtils;
import com.zt.plat.module.bpm.framework.flowable.core.util.SimpleModelUtils;
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
import com.zt.plat.module.bpm.service.task.trigger.BpmTrigger;
import com.fasterxml.jackson.core.type.TypeReference;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

View File

@@ -10,7 +10,6 @@ import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.runtime.ProcessInstance;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
/**
* BPM HTTP 回调触发器

View File

@@ -9,7 +9,6 @@ import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.runtime.ProcessInstance;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
/**
* BPM 发送同步 HTTP 请求触发器

View File

@@ -11,7 +11,6 @@ import liquibase.statement.DatabaseFunction;
import liquibase.util.StringUtil;
import java.util.Locale;
import java.util.regex.Pattern;
@DataTypeInfo(name = "boolean", aliases = {"java.sql.Types.BOOLEAN", "java.lang.Boolean", "bit", "bool"}, minParameters = 0, maxParameters = 0, priority = LiquibaseDataType.PRIORITY_DEFAULT)
public class BooleanType extends LiquibaseDataType {

View File

@@ -12,29 +12,8 @@
*/
package org.flowable.common.engine.impl;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.ServiceLoader;
import java.util.Set;
import javax.naming.InitialContext;
import javax.sql.DataSource;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.builder.xml.XMLConfigBuilder;
import org.apache.ibatis.builder.xml.XMLMapperBuilder;
@@ -47,27 +26,7 @@ import org.apache.ibatis.session.defaults.DefaultSqlSessionFactory;
import org.apache.ibatis.transaction.TransactionFactory;
import org.apache.ibatis.transaction.jdbc.JdbcTransactionFactory;
import org.apache.ibatis.transaction.managed.ManagedTransactionFactory;
import org.apache.ibatis.type.ArrayTypeHandler;
import org.apache.ibatis.type.BigDecimalTypeHandler;
import org.apache.ibatis.type.BlobInputStreamTypeHandler;
import org.apache.ibatis.type.BlobTypeHandler;
import org.apache.ibatis.type.BooleanTypeHandler;
import org.apache.ibatis.type.ByteTypeHandler;
import org.apache.ibatis.type.ClobTypeHandler;
import org.apache.ibatis.type.DateOnlyTypeHandler;
import org.apache.ibatis.type.DateTypeHandler;
import org.apache.ibatis.type.DoubleTypeHandler;
import org.apache.ibatis.type.FloatTypeHandler;
import org.apache.ibatis.type.IntegerTypeHandler;
import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.LongTypeHandler;
import org.apache.ibatis.type.NClobTypeHandler;
import org.apache.ibatis.type.NStringTypeHandler;
import org.apache.ibatis.type.ShortTypeHandler;
import org.apache.ibatis.type.SqlxmlTypeHandler;
import org.apache.ibatis.type.StringTypeHandler;
import org.apache.ibatis.type.TimeOnlyTypeHandler;
import org.apache.ibatis.type.TypeHandlerRegistry;
import org.apache.ibatis.type.*;
import org.flowable.common.engine.api.FlowableException;
import org.flowable.common.engine.api.delegate.event.FlowableEngineEventType;
import org.flowable.common.engine.api.delegate.event.FlowableEventDispatcher;
@@ -79,25 +38,10 @@ import org.flowable.common.engine.impl.cfg.CommandExecutorImpl;
import org.flowable.common.engine.impl.cfg.IdGenerator;
import org.flowable.common.engine.impl.cfg.TransactionContextFactory;
import org.flowable.common.engine.impl.cfg.standalone.StandaloneMybatisTransactionContextFactory;
import org.flowable.common.engine.impl.db.CommonDbSchemaManager;
import org.flowable.common.engine.impl.db.DbSqlSessionFactory;
import org.flowable.common.engine.impl.db.LogSqlExecutionTimePlugin;
import org.flowable.common.engine.impl.db.MybatisTypeAliasConfigurator;
import org.flowable.common.engine.impl.db.MybatisTypeHandlerConfigurator;
import org.flowable.common.engine.impl.db.SchemaManager;
import org.flowable.common.engine.impl.db.*;
import org.flowable.common.engine.impl.event.EventDispatchAction;
import org.flowable.common.engine.impl.event.FlowableEventDispatcherImpl;
import org.flowable.common.engine.impl.interceptor.Command;
import org.flowable.common.engine.impl.interceptor.CommandConfig;
import org.flowable.common.engine.impl.interceptor.CommandContextFactory;
import org.flowable.common.engine.impl.interceptor.CommandContextInterceptor;
import org.flowable.common.engine.impl.interceptor.CommandExecutor;
import org.flowable.common.engine.impl.interceptor.CommandInterceptor;
import org.flowable.common.engine.impl.interceptor.CrDbRetryInterceptor;
import org.flowable.common.engine.impl.interceptor.DefaultCommandInvoker;
import org.flowable.common.engine.impl.interceptor.LogInterceptor;
import org.flowable.common.engine.impl.interceptor.SessionFactory;
import org.flowable.common.engine.impl.interceptor.TransactionContextInterceptor;
import org.flowable.common.engine.impl.interceptor.*;
import org.flowable.common.engine.impl.lock.LockManager;
import org.flowable.common.engine.impl.lock.LockManagerImpl;
import org.flowable.common.engine.impl.logging.LoggingListener;
@@ -107,13 +51,7 @@ import org.flowable.common.engine.impl.persistence.GenericManagerFactory;
import org.flowable.common.engine.impl.persistence.StrongUuidGenerator;
import org.flowable.common.engine.impl.persistence.cache.EntityCache;
import org.flowable.common.engine.impl.persistence.cache.EntityCacheImpl;
import org.flowable.common.engine.impl.persistence.entity.ByteArrayEntityManager;
import org.flowable.common.engine.impl.persistence.entity.ByteArrayEntityManagerImpl;
import org.flowable.common.engine.impl.persistence.entity.Entity;
import org.flowable.common.engine.impl.persistence.entity.PropertyEntityManager;
import org.flowable.common.engine.impl.persistence.entity.PropertyEntityManagerImpl;
import org.flowable.common.engine.impl.persistence.entity.TableDataManager;
import org.flowable.common.engine.impl.persistence.entity.TableDataManagerImpl;
import org.flowable.common.engine.impl.persistence.entity.*;
import org.flowable.common.engine.impl.persistence.entity.data.ByteArrayDataManager;
import org.flowable.common.engine.impl.persistence.entity.data.PropertyDataManager;
import org.flowable.common.engine.impl.persistence.entity.data.impl.MybatisByteArrayDataManager;
@@ -127,8 +65,14 @@ import org.flowable.eventregistry.api.EventRegistryEventConsumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import javax.naming.InitialContext;
import javax.sql.DataSource;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.sql.*;
import java.time.Duration;
import java.util.*;
public abstract class AbstractEngineConfiguration {

View File

@@ -4,15 +4,15 @@ import cn.hutool.core.util.RandomUtil;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.common.util.json.JsonUtils;
import com.zt.plat.framework.test.core.ut.BaseDbUnitTest;
import com.zt.plat.module.bpm.controller.admin.definition.vo.form.BpmFormSaveReqVO;
import com.zt.plat.module.bpm.controller.admin.definition.vo.form.BpmFormPageReqVO;
import com.zt.plat.module.bpm.controller.admin.definition.vo.form.BpmFormSaveReqVO;
import com.zt.plat.module.bpm.dal.dataobject.definition.BpmFormDO;
import com.zt.plat.module.bpm.dal.mysql.definition.BpmFormMapper;
import com.zt.plat.module.bpm.service.definition.dto.BpmFormFieldRespDTO;
import jakarta.annotation.Resource;
import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.Import;
import jakarta.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

View File

@@ -5,16 +5,15 @@ import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.test.core.ut.BaseDbUnitTest;
import com.zt.plat.framework.test.core.util.AssertUtils;
import com.zt.plat.framework.test.core.util.RandomUtils;
import com.zt.plat.module.bpm.controller.admin.definition.vo.group.BpmUserGroupSaveReqVO;
import com.zt.plat.module.bpm.controller.admin.definition.vo.group.BpmUserGroupPageReqVO;
import com.zt.plat.module.bpm.controller.admin.definition.vo.group.BpmUserGroupSaveReqVO;
import com.zt.plat.module.bpm.dal.dataobject.definition.BpmUserGroupDO;
import com.zt.plat.module.bpm.dal.mysql.definition.BpmUserGroupMapper;
import jakarta.annotation.Resource;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.Import;
import jakarta.annotation.Resource;
import java.time.LocalDateTime;
import static com.zt.plat.framework.common.util.date.LocalDateTimeUtils.buildTime;

View File

@@ -0,0 +1,19 @@
## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
## 创建目录,并使用它作为工作目录
RUN mkdir -p /zt-module-databus-server
WORKDIR /zt-module-databus-server
## 将后端项目的 Jar 文件,复制到镜像中
COPY ./target/zt-module-databus-server.jar app.jar
## 设置 TZ 时区
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms512m -Xmx512m"
## 暴露后端项目的 48080 端口
EXPOSE 48082
## 启动后端项目
CMD java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar app.jar

View File

@@ -37,14 +37,20 @@ spring:
primary: master
datasource:
master:
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
#url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
#username: SYSDBA
#password: pgbsci6ddJ6Sqj@e
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
username: SYSDBA
password: pgbsci6ddJ6Sqj@e
password: P@ssword25
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
#url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
#username: SYSDBA
#password: pgbsci6ddJ6Sqj@e
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
username: SYSDBA
password: pgbsci6ddJ6Sqj@e
password: P@ssword25
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data:
@@ -52,9 +58,8 @@ spring:
host: 172.16.46.63 # 地址
port: 30379 # 端口
database: 0 # 数据库索引
username: zt-redis
username: zt-redis # 密码,建议生产环境开启
password: P@ssword25
# password: 123456 # 密码,建议生产环境开启
xxl:
job:

View File

@@ -39,14 +39,20 @@ spring:
primary: master
datasource:
master:
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
#url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
#username: SYSDBA
#password: pgbsci6ddJ6Sqj@e
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
username: SYSDBA
password: pgbsci6ddJ6Sqj@e
password: P@ssword25
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
#url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
#username: SYSDBA
#password: pgbsci6ddJ6Sqj@e
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
username: SYSDBA
password: pgbsci6ddJ6Sqj@e
password: P@ssword25
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data:
@@ -54,7 +60,8 @@ spring:
host: 172.16.46.63 # 地址
port: 30379 # 端口
database: 0 # 数据库索引
# password: 123456 # 密码,建议生产环境开启
username: zt-redis # 密码,建议生产环境开启
password: P@ssword25
xxl:
job:

View File

@@ -50,7 +50,7 @@ spring:
time-to-live: 1h # 设置过期时间为 1 小时
server:
port: 48100
port: 48108
logging:
file:

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