remove
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
BLADE_PROFILES_ACTIVE=test
|
||||
BLADE_OAUTH2_PUBLIC_KEY=国密公钥需自行填写
|
||||
BLADE_OAUTH2_PRIVATE_KEY=国密私钥需自行填写
|
||||
BLADE_TOKEN_SIGN_KEY=令牌密钥需自行填写
|
||||
HOST_IP=宿主机IP需自行填写
|
||||
MYSQL_ROOT_PASSWORD=MYSQL的ROOT密码需自行填写
|
||||
@@ -1,6 +0,0 @@
|
||||
## 一键部署流程
|
||||
1. 将开发完毕的数据库脚本放入`database`目录下,重命名为`init.sql`, 提前修改好`admin`的密码。
|
||||
2. 将`.env`文件内所需的内容填充完整,注意`publicKey`需要与前端配置保持一致。
|
||||
3. 将前端工程配置好`publicKey`后打包,将打包后的文件放入`nginx/html`目录下。
|
||||
4. 生产环境需采用`prod`模式启动,将会强制校验弱密码,未修改`admin`密码将会无法登陆。
|
||||
5. 执行`docker compose up -d`命令启动容器即可。
|
||||
File diff suppressed because one or more lines are too long
@@ -1,114 +0,0 @@
|
||||
# 定义网络配置
|
||||
networks:
|
||||
blade_net:
|
||||
driver: bridge # 使用 bridge 驱动,创建一个桥接网络
|
||||
ipam: # IP 地址管理配置
|
||||
config:
|
||||
- subnet: 172.30.0.0/16 # 定义子网,IP 范围从 172.30.0.0 到 172.30.255.255
|
||||
|
||||
# 定义服务配置
|
||||
services:
|
||||
# BladeX 后端 服务,提供BladeX平台业务功能
|
||||
blade-api:
|
||||
image: blade/blade-api:4.8.0.RELEASE
|
||||
container_name: blade-api
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
# OAuth2 公钥,用于身份验证
|
||||
- BLADE_OAUTH2_PUBLIC_KEY=${BLADE_OAUTH2_PUBLIC_KEY}
|
||||
# OAuth2 私钥,用于验签解码
|
||||
- BLADE_OAUTH2_PRIVATE_KEY=${BLADE_OAUTH2_PRIVATE_KEY}
|
||||
# BladeX 密钥,用于Token签名
|
||||
- BLADE_TOKEN_SIGN_KEY=${BLADE_TOKEN_SIGN_KEY}
|
||||
# 时区设置
|
||||
- TZ=Asia/Shanghai
|
||||
ports:
|
||||
- 8000:80 # 映射 80 端口到主机的 8000 端口
|
||||
command:
|
||||
- --spring.profiles.active=${BLADE_PROFILES_ACTIVE} # 设置系统启动模式
|
||||
- --social.domain=http://${HOST_IP}:2888 # 设置第三方登录跳转域名
|
||||
depends_on:
|
||||
- blade-db # 依赖数据库
|
||||
- blade-oss # 依赖对象存储
|
||||
networks:
|
||||
blade_net:
|
||||
ipv4_address: 172.30.0.80
|
||||
|
||||
# MySQL 数据库服务
|
||||
blade-db:
|
||||
image: mysql:8.3.0
|
||||
container_name: blade-db
|
||||
restart: unless-stopped
|
||||
security_opt:
|
||||
- seccomp:unconfined # 禁用 seccomp 安全配置,允许更多操作
|
||||
environment:
|
||||
- TZ=Asia/Shanghai # 时区设置
|
||||
- MYSQL_CHARSET=utf8mb4 # 设置字符集为 utf8mb4
|
||||
- MYSQL_COLLATION=utf8mb4_unicode_ci # 设置排序规则为 utf8mb4_unicode_ci
|
||||
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} # 数据库 root 密码
|
||||
- MYSQL_USER=bladexadmin
|
||||
- MYSQL_PASSWORD=bladexadmin
|
||||
- MYSQL_DATABASE=bladex_boot
|
||||
ports:
|
||||
- 13306:3306 # 映射 MySQL 服务端口
|
||||
volumes:
|
||||
- ./data/mysql:/var/lib/mysql # 持久化 MySQL 数据
|
||||
- ./database/init.sql:/docker-entrypoint-initdb.d/init.sql # 挂载 SQL 初始化脚本
|
||||
command: --lower_case_table_names=1 # 添加忽略大小写配置
|
||||
networks:
|
||||
blade_net:
|
||||
ipv4_address: 172.30.0.33
|
||||
|
||||
# Redis 服务,用于缓存
|
||||
blade-redis:
|
||||
image: redis:7.2.5
|
||||
container_name: blade-redis
|
||||
environment:
|
||||
- TZ=Asia/Shanghai # 时区设置
|
||||
ports:
|
||||
- 16379:6379 # 映射 Redis 默认端口
|
||||
command: redis-server --appendonly yes --requirepass bladexadmin # 配置密码和持久化
|
||||
privileged: true
|
||||
restart: always
|
||||
volumes:
|
||||
- ./data/redis/data:/data # 持久化 Redis 数据
|
||||
networks:
|
||||
blade_net:
|
||||
ipv4_address: 172.30.0.63
|
||||
|
||||
# MinIO 对象存储服务
|
||||
blade-oss:
|
||||
image: minio/minio:RELEASE.2021-04-22T15-44-28Z.hotfix.56647434e
|
||||
container_name: blade-oss
|
||||
restart: unless-stopped
|
||||
security_opt:
|
||||
- seccomp:unconfined
|
||||
environment:
|
||||
- TZ=Asia/Shanghai # 时区设置
|
||||
- MINIO_ACCESS_KEY=bladexadmin # 存储访问密钥
|
||||
- MINIO_SECRET_KEY=bladexadmin # 存储密钥
|
||||
ports:
|
||||
- 9000:9000 # 映射 MinIO 服务端口
|
||||
command: server /data --address '0.0.0.0:9000' # 启动 MinIO
|
||||
volumes:
|
||||
- ./data/minio/data:/data # 持久化数据
|
||||
networks:
|
||||
blade_net:
|
||||
ipv4_address: 172.30.0.90
|
||||
|
||||
# Nginx 服务,用于反向代理和负载均衡
|
||||
blade-nginx:
|
||||
image: nginx:stable-alpine-perl
|
||||
container_name: blade-nginx
|
||||
environment:
|
||||
- TZ=Asia/Shanghai # 时区设置
|
||||
ports:
|
||||
- 2888:2888 # 映射端口
|
||||
volumes:
|
||||
- ./nginx/html:/usr/share/nginx/html # 持久化 Nginx 网页数据
|
||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf # 持久化 Nginx 配置
|
||||
privileged: true
|
||||
restart: always
|
||||
networks:
|
||||
blade_net:
|
||||
ipv4_address: 172.30.0.18
|
||||
@@ -1,46 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
|
||||
<head>
|
||||
<meta charset='UTF-8' />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
||||
<meta http-equiv='X-UA-Compatible' content='chrome=1' />
|
||||
<meta name='renderer' content='webkit'>
|
||||
<meta name='viewport' content='width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0'>
|
||||
<meta name='apple-mobile-web-app-capable' content='yes'>
|
||||
<meta name='apple-mobile-web-app-status-bar-style' content='black'>
|
||||
<meta name='format-detection' content='telephone=no'>
|
||||
<link rel='icon' href='/favicon.png' />
|
||||
<link rel='stylesheet' href='/iconfont/index.css'>
|
||||
<link rel='stylesheet' href='/iconfont/avue/iconfont.css'>
|
||||
<link rel='stylesheet' href='/iconfont/saber/iconfont.css'>
|
||||
<link rel='stylesheet' href='/iconfont/common/iconfont.css'>
|
||||
<link rel='stylesheet' href='/css/loading.css'>
|
||||
<link rel='stylesheet' href='/css/saber.css'>
|
||||
<title>BladeX微服务开发平台</title>
|
||||
<script type="module" crossorigin src="/assets/index-DpW_RhWM.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/element-plus-BIeOjcXi.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/@smallwei/avue-vR-k9VHw.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BsjWj5lr.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id='app'>
|
||||
<div id='loader-wrapper'>
|
||||
<div class='loader-box'>
|
||||
<span>BladeX</span>
|
||||
<span>微</span>
|
||||
<span>服</span>
|
||||
<span>务</span>
|
||||
<span>开</span>
|
||||
<span>发</span>
|
||||
<span>平</span>
|
||||
<span>台</span>
|
||||
</div>
|
||||
<div class='loader-title'>系统加载中</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,77 +0,0 @@
|
||||
|
||||
user root;
|
||||
worker_processes 1;
|
||||
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
|
||||
#gzip on;
|
||||
|
||||
#include /etc/nginx/conf.d/*.conf;
|
||||
|
||||
upstream gateway {
|
||||
server blade-api;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 2888;
|
||||
server_name web;
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1k;
|
||||
gzip_buffers 4 16k;
|
||||
gzip_http_version 1.1;
|
||||
gzip_comp_level 2;
|
||||
gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
|
||||
gzip_vary on;
|
||||
gzip_proxied expired no-cache no-store private auth;
|
||||
gzip_disable "MSIE [1-6]\.";
|
||||
|
||||
location /{
|
||||
index index.html;
|
||||
error_page 404 /index.html;
|
||||
}
|
||||
|
||||
location ~ ^/(api/)?actuator {
|
||||
return 403;
|
||||
}
|
||||
|
||||
location ^~ /oauth/redirect {
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
|
||||
location ^~ /api/ {
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_buffering off;
|
||||
rewrite ^/api/(.*)$ /$1 break;
|
||||
proxy_pass http://gateway/;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
## 一、调整内存:max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144](elasticsearch用户拥有的内存权限太小,至少需要262144)
|
||||
|
||||
#### 1.修改配置sysctl.conf
|
||||
[root@localhost ~]# vi /etc/sysctl.conf
|
||||
#### 2.添加下面配置:
|
||||
vm.max_map_count=262144
|
||||
#### 3.重新加载:
|
||||
[root@localhost ~]# sysctl -p
|
||||
#### 4.最后重新启动elasticsearch,即可启动成功。
|
||||
|
||||
|
||||
## 二、Docker 命令自动补全
|
||||
#### 1.安装依赖工具bash-complete
|
||||
[root@localhost ~]# yum install -y bash-completion
|
||||
|
||||
[root@localhost ~]# source /usr/share/bash-completion/completions/docker
|
||||
|
||||
[root@localhost ~]# source /usr/share/bash-completion/bash_completion
|
||||
|
||||
## 三、将本文件夹内的文件拷贝至服务器
|
||||
#### 1.对sh脚本赋予执行权限
|
||||
|
||||
#### 2.执行 ./deploy.sh
|
||||
|
||||
#### 3.等待服务启动完毕即可
|
||||
|
||||
#### 4.卸载执行 ./undeploy.sh
|
||||
@@ -1,88 +0,0 @@
|
||||
#./bin/bash
|
||||
# 定义颜色
|
||||
BLUE_COLOR="\033[36m"
|
||||
RED_COLOR="\033[31m"
|
||||
GREEN_COLOR="\033[32m"
|
||||
VIOLET_COLOR="\033[35m"
|
||||
RES="\033[0m"
|
||||
|
||||
echo -e "${BLUE_COLOR}# ######################################################################${RES}"
|
||||
echo -e "${BLUE_COLOR}# Docker ELK Deploy Script #${RES}"
|
||||
echo -e "${BLUE_COLOR}# ######################################################################${RES}"
|
||||
|
||||
# 创建目录
|
||||
echo -e "${BLUE_COLOR}---> create [elasticsearch]directory start.${RES}"
|
||||
if [ ! -d "./elasticsearch/" ]; then
|
||||
mkdir -p ./elasticsearch/master/conf ./elasticsearch/master/data ./elasticsearch/master/logs \
|
||||
./elasticsearch/slave1/conf ./elasticsearch/slave1/data ./elasticsearch/slave1/logs \
|
||||
./elasticsearch/slave2/conf ./elasticsearch/slave2/data ./elasticsearch/slave2/logs
|
||||
fi
|
||||
|
||||
echo -e "${RED_COLOR}---> create [kibana]directory start.${RES}"
|
||||
if [ ! -d "./kibana/" ]; then
|
||||
mkdir -p ./kibana/conf ./kibana/logs
|
||||
fi
|
||||
|
||||
echo -e "${GREEN_COLOR}---> create [logstash]directory start.${RES}"
|
||||
if [ ! -d "./logstash/" ]; then
|
||||
mkdir -p ./logstash/conf ./logstash/logs
|
||||
fi
|
||||
|
||||
echo -e "${GREEN_COLOR}---> create [filebeat]directory start.${RES}"
|
||||
if [ ! -d "./filebeat/" ]; then
|
||||
mkdir -p ./filebeat/conf ./filebeat/logs ./filebeat/data
|
||||
fi
|
||||
|
||||
echo -e "${VIOLET_COLOR}---> create [nginx]directory start.${RES}"
|
||||
if [ ! -d "./nginx/" ]; then
|
||||
mkdir -p ./nginx/conf ./nginx/logs ./nginx/www
|
||||
fi
|
||||
echo -e "${BLUE_COLOR}===> create directory success.${RES}"
|
||||
|
||||
# 目录授权(data/logs 都要授读/写权限)
|
||||
echo -e "${BLUE_COLOR}---> directory authorize start.${RES}"
|
||||
if [ -d "./elasticsearch/" ]; then
|
||||
chmod 777 ./elasticsearch/master/data/ ./elasticsearch/master/logs/ \
|
||||
./elasticsearch/slave1/data/ ./elasticsearch/slave1/logs/ \
|
||||
./elasticsearch/slave2/data/ ./elasticsearch/slave2/logs
|
||||
fi
|
||||
|
||||
if [ -d "./filebeat/" ]; then
|
||||
chmod 777 ./filebeat/data/ ./filebeat/logs/
|
||||
fi
|
||||
echo -e "${BLUE_COLOR}===> directory authorize success.${RES}"
|
||||
|
||||
# 移动配置文件
|
||||
echo -e "${BLUE_COLOR}---> move [elasticsearch]config file start.${RES}"
|
||||
if [ -f "./es-master.yml" ] && [ -f "./es-slave1.yml" ] && [ -f "./es-slave2.yml" ]; then
|
||||
mv ./es-master.yml ./elasticsearch/master/conf
|
||||
mv ./es-slave1.yml ./elasticsearch/slave1/conf
|
||||
mv ./es-slave2.yml ./elasticsearch/slave2/conf
|
||||
fi
|
||||
|
||||
echo -e "${RED_COLOR}---> move [kibana]config file start.${RES}"
|
||||
if [ -f "./kibana.yml" ]; then
|
||||
mv ./kibana.yml ./kibana/conf
|
||||
fi
|
||||
|
||||
echo -e "${GREEN_COLOR}---> move [logstash]config file start.${RES}"
|
||||
if [ -f "./logstash.yml" ] && [ -f "./logstash-filebeat.conf" ]; then
|
||||
mv ./logstash-filebeat.conf ./logstash/conf
|
||||
mv ./logstash.yml ./logstash/conf
|
||||
fi
|
||||
|
||||
echo -e "${GREEN_COLOR}---> move [filebeat]config file start.${RES}"
|
||||
if [ -f "./filebeat.yml" ]; then
|
||||
mv ./filebeat.yml ./filebeat/conf
|
||||
fi
|
||||
|
||||
echo -e "${VIOLET_COLOR}---> move [nginx]config file start.${RES}"
|
||||
if [ -f "./nginx.conf" ]; then
|
||||
mv ./nginx.conf ./nginx/conf
|
||||
fi
|
||||
echo -e "${BLUE_COLOR}===> move config files success.${RES}"
|
||||
echo -e "${GREEN_COLOR}>>>>>>>>>>>>>>>>>> The End <<<<<<<<<<<<<<<<<<${RES}"
|
||||
|
||||
# 部署项目
|
||||
echo -e "${BLUE_COLOR}==================> Docker deploy Start <==================${RES}"
|
||||
docker-compose up --build -d
|
||||
@@ -1,115 +0,0 @@
|
||||
version: "3"
|
||||
services:
|
||||
es-master:
|
||||
container_name: es-master
|
||||
hostname: es-master
|
||||
image: elasticsearch:7.1.1
|
||||
restart: always
|
||||
ports:
|
||||
- 9200:9200
|
||||
- 9300:9300
|
||||
volumes:
|
||||
- ./elasticsearch/master/conf/es-master.yml:/usr/share/elasticsearch/config/elasticsearch.yml
|
||||
- ./elasticsearch/master/data:/usr/share/elasticsearch/data
|
||||
- ./elasticsearch/master/logs:/usr/share/elasticsearch/logs
|
||||
environment:
|
||||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||
|
||||
es-slave1:
|
||||
container_name: es-slave1
|
||||
image: elasticsearch:7.1.1
|
||||
restart: always
|
||||
ports:
|
||||
- 9201:9200
|
||||
- 9301:9300
|
||||
volumes:
|
||||
- ./elasticsearch/slave1/conf/es-slave1.yml:/usr/share/elasticsearch/config/elasticsearch.yml
|
||||
- ./elasticsearch/slave1/data:/usr/share/elasticsearch/data
|
||||
- ./elasticsearch/slave1/logs:/usr/share/elasticsearch/logs
|
||||
environment:
|
||||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||
|
||||
es-slave2:
|
||||
container_name: es-slave2
|
||||
image: elasticsearch:7.1.1
|
||||
restart: always
|
||||
ports:
|
||||
- 9202:9200
|
||||
- 9302:9300
|
||||
volumes:
|
||||
- ./elasticsearch/slave2/conf/es-slave2.yml:/usr/share/elasticsearch/config/elasticsearch.yml
|
||||
- ./elasticsearch/slave2/data:/usr/share/elasticsearch/data
|
||||
- ./elasticsearch/slave2/logs:/usr/share/elasticsearch/logs
|
||||
environment:
|
||||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||
|
||||
es-head:
|
||||
container_name: es-head
|
||||
image: mobz/elasticsearch-head:5
|
||||
restart: always
|
||||
ports:
|
||||
- 9100:9100
|
||||
depends_on:
|
||||
- es-master
|
||||
- es-slave1
|
||||
- es-slave2
|
||||
|
||||
kibana:
|
||||
container_name: kibana
|
||||
hostname: kibana
|
||||
image: kibana:7.1.1
|
||||
restart: always
|
||||
ports:
|
||||
- 5601:5601
|
||||
volumes:
|
||||
- ./kibana/conf/kibana.yml:/usr/share/kibana/config/kibana.yml
|
||||
environment:
|
||||
- elasticsearch.hosts=http://es-master:9200
|
||||
depends_on:
|
||||
- es-master
|
||||
- es-slave1
|
||||
- es-slave2
|
||||
|
||||
filebeat:
|
||||
# 容器名称
|
||||
container_name: filebeat
|
||||
# 主机名称
|
||||
hostname: filebeat
|
||||
# 镜像
|
||||
image: docker.elastic.co/beats/filebeat:7.1.1
|
||||
# 重启机制
|
||||
restart: always
|
||||
# 持久化挂载
|
||||
volumes:
|
||||
- ./filebeat/conf/filebeat.yml:/usr/share/filebeat/filebeat.yml
|
||||
# 映射到容器中[作为数据源]
|
||||
- ./logs:/home/project/elk/logs
|
||||
- ./filebeat/logs:/usr/share/filebeat/logs
|
||||
- ./filebeat/data:/usr/share/filebeat/data
|
||||
# 将指定容器连接到当前连接,可以设置别名,避免ip方式导致的容器重启动态改变的无法连接情况
|
||||
links:
|
||||
- logstash
|
||||
ports:
|
||||
- 9000:9000
|
||||
# 依赖服务[可无]
|
||||
depends_on:
|
||||
- es-master
|
||||
- es-slave1
|
||||
- es-slave2
|
||||
|
||||
logstash:
|
||||
container_name: logstash
|
||||
hostname: logstash
|
||||
image: logstash:7.1.1
|
||||
command: logstash -f ./conf/logstash-filebeat.conf
|
||||
restart: always
|
||||
volumes:
|
||||
# 映射到容器中
|
||||
- ./logstash/conf/logstash-filebeat.conf:/usr/share/logstash/conf/logstash-filebeat.conf
|
||||
- ./logstash/conf/logstash.yml:/usr/share/logstash/config/logstash.yml
|
||||
ports:
|
||||
- 5044:5044
|
||||
depends_on:
|
||||
- es-master
|
||||
- es-slave1
|
||||
- es-slave2
|
||||
@@ -1,28 +0,0 @@
|
||||
# 集群名称
|
||||
cluster.name: es-cluster
|
||||
# 节点名称
|
||||
node.name: es-master
|
||||
# 是否可以成为master节点
|
||||
node.master: true
|
||||
# 是否允许该节点存储数据,默认开启
|
||||
node.data: false
|
||||
# 网络绑定
|
||||
network.host: 0.0.0.0
|
||||
# 设置对外服务的http端口
|
||||
http.port: 9200
|
||||
# 设置节点间交互的tcp端口
|
||||
transport.port: 9300
|
||||
# 集群发现
|
||||
discovery.seed_hosts:
|
||||
- es-master
|
||||
- es-slave1
|
||||
- es-slave2
|
||||
# 手动指定可以成为 mater 的所有节点的 name 或者 ip,这些配置将会在第一次选举中进行计算
|
||||
cluster.initial_master_nodes:
|
||||
- es-master
|
||||
# 支持跨域访问
|
||||
http.cors.enabled: true
|
||||
http.cors.allow-origin: "*"
|
||||
# 安全认证
|
||||
xpack.security.enabled: false
|
||||
#http.cors.allow-headers: "Authorization"
|
||||
@@ -1,28 +0,0 @@
|
||||
# 集群名称
|
||||
cluster.name: es-cluster
|
||||
# 节点名称
|
||||
node.name: es-slave1
|
||||
# 是否可以成为master节点
|
||||
node.master: true
|
||||
# 是否允许该节点存储数据,默认开启
|
||||
node.data: true
|
||||
# 网络绑定
|
||||
network.host: 0.0.0.0
|
||||
# 设置对外服务的http端口
|
||||
http.port: 9201
|
||||
# 设置节点间交互的tcp端口
|
||||
#transport.port: 9301
|
||||
# 集群发现
|
||||
discovery.seed_hosts:
|
||||
- es-master
|
||||
- es-slave1
|
||||
- es-slave2
|
||||
# 手动指定可以成为 mater 的所有节点的 name 或者 ip,这些配置将会在第一次选举中进行计算
|
||||
cluster.initial_master_nodes:
|
||||
- es-master
|
||||
# 支持跨域访问
|
||||
http.cors.enabled: true
|
||||
http.cors.allow-origin: "*"
|
||||
# 安全认证
|
||||
xpack.security.enabled: false
|
||||
#http.cors.allow-headers: "Authorization"
|
||||
@@ -1,28 +0,0 @@
|
||||
# 集群名称
|
||||
cluster.name: es-cluster
|
||||
# 节点名称
|
||||
node.name: es-slave2
|
||||
# 是否可以成为master节点
|
||||
node.master: true
|
||||
# 是否允许该节点存储数据,默认开启
|
||||
node.data: true
|
||||
# 网络绑定
|
||||
network.host: 0.0.0.0
|
||||
# 设置对外服务的http端口
|
||||
http.port: 9202
|
||||
# 设置节点间交互的tcp端口
|
||||
#transport.port: 9302
|
||||
# 集群发现
|
||||
discovery.seed_hosts:
|
||||
- es-master
|
||||
- es-slave1
|
||||
- es-slave2
|
||||
# 手动指定可以成为 mater 的所有节点的 name 或者 ip,这些配置将会在第一次选举中进行计算
|
||||
cluster.initial_master_nodes:
|
||||
- es-master
|
||||
# 支持跨域访问
|
||||
http.cors.enabled: true
|
||||
http.cors.allow-origin: "*"
|
||||
# 安全认证
|
||||
xpack.security.enabled: false
|
||||
#http.cors.allow-headers: "Authorization"
|
||||
@@ -1,37 +0,0 @@
|
||||
filebeat.inputs:
|
||||
- type: log
|
||||
enabled: true
|
||||
paths:
|
||||
# 当前目录下的所有.log文件
|
||||
- /home/project/elk/logs/*.log
|
||||
multiline.pattern: ^\[
|
||||
multiline.negate: true
|
||||
multiline.match: after
|
||||
- type: tcp
|
||||
enabled: true
|
||||
max_message_size: 10MiB
|
||||
host: "0.0.0.0:9000"
|
||||
|
||||
filebeat.config.modules:
|
||||
path: ${path.config}/modules.d/*.yml
|
||||
reload.enabled: false
|
||||
|
||||
setup.template.settings:
|
||||
index.number_of_shards: 1
|
||||
|
||||
setup.dashboards.enabled: false
|
||||
|
||||
setup.kibana:
|
||||
host: "http://kibana:5601"
|
||||
|
||||
# 不直接传输至ES
|
||||
#output.elasticsearch:
|
||||
# hosts: ["http://es-master:9200"]
|
||||
# index: "filebeat-%{[beat.version]}-%{+yyyy.MM.dd}"
|
||||
|
||||
output.logstash:
|
||||
hosts: ["logstash:5044"]
|
||||
|
||||
processors:
|
||||
- add_host_metadata: ~
|
||||
- add_cloud_metadata: ~
|
||||
@@ -1,8 +0,0 @@
|
||||
# 服务端口
|
||||
server.port: 5601
|
||||
# 服务IP
|
||||
server.host: "0.0.0.0"
|
||||
# ES
|
||||
elasticsearch.hosts: ["http://es-master:9200"]
|
||||
# 汉化
|
||||
i18n.locale: "zh-CN"
|
||||
@@ -1,23 +0,0 @@
|
||||
input {
|
||||
# 来源beats
|
||||
beats {
|
||||
# 端口
|
||||
port => "5044"
|
||||
}
|
||||
}
|
||||
# 分析、过滤插件,可以多个
|
||||
filter {
|
||||
grok {
|
||||
match => { "message" => "%{COMBINEDAPACHELOG}"}
|
||||
}
|
||||
geoip {
|
||||
source => "clientip"
|
||||
}
|
||||
}
|
||||
output {
|
||||
# 选择elasticsearch
|
||||
elasticsearch {
|
||||
hosts => ["http://es-master:9200"]
|
||||
index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
# 服务IP
|
||||
http.host: "0.0.0.0"
|
||||
# ES
|
||||
xpack.monitoring.elasticsearch.hosts: [ "http://es-master:9200" ]
|
||||
|
||||
xpack.monitoring.enabled: true
|
||||
|
||||
xpack.management.enabled: false
|
||||
@@ -1,16 +0,0 @@
|
||||
#./bin/bash
|
||||
# 定义颜色
|
||||
BLUE_COLOR="\033[36m"
|
||||
RED_COLOR="\033[31m"
|
||||
GREEN_COLOR="\033[32m"
|
||||
VIOLET_COLOR="\033[35m"
|
||||
RES="\033[0m"
|
||||
|
||||
echo -e "${BLUE_COLOR}# ######################################################################${RES}"
|
||||
echo -e "${BLUE_COLOR}# Docker ELK UnDeploy Script #${RES}"
|
||||
echo -e "${BLUE_COLOR}# ######################################################################${RES}"
|
||||
|
||||
# 部署项目
|
||||
echo -e "${BLUE_COLOR}==================> Docker UnDeploy Start <==================${RES}"
|
||||
docker-compose stop
|
||||
docker-compose rm
|
||||
@@ -1,46 +0,0 @@
|
||||
create table aliyun_certify
|
||||
(
|
||||
id int8 not null primary key,
|
||||
user_id int8 not null,
|
||||
user_phone int8,
|
||||
name varchar(128) null,
|
||||
id_card varchar(128) null,
|
||||
certify_id varchar(64) null,
|
||||
image text null,
|
||||
message varchar(255) null,
|
||||
is_success integer default 0 not null,
|
||||
is_deleted integer default 0 not null,
|
||||
create_time timestamp not null,
|
||||
create_user int8 null,
|
||||
update_time timestamp null,
|
||||
update_user int8 null,
|
||||
create_dept int8 null,
|
||||
status integer null
|
||||
);
|
||||
|
||||
comment on table aliyun_certify is '阿里云实名记录表';
|
||||
comment on column aliyun_certify.id is 'ID';
|
||||
comment on column aliyun_certify.user_id is '用户ID';
|
||||
comment on column aliyun_certify.user_phone is '用户手机号';
|
||||
comment on column aliyun_certify.name is '实名用户名';
|
||||
comment on column aliyun_certify.id_card is '实名身份证';
|
||||
comment on column aliyun_certify.certify_id is '阿里云实名身份标识';
|
||||
comment on column aliyun_certify.image is '实名照片';
|
||||
comment on column aliyun_certify.message is '阿里云认证消息';
|
||||
comment on column aliyun_certify.is_success is '是否成功';
|
||||
comment on column aliyun_certify.is_deleted is '是否删除';
|
||||
comment on column aliyun_certify.create_time is '创建时间';
|
||||
comment on column aliyun_certify.create_user is '创建人ID';
|
||||
comment on column aliyun_certify.update_time is '修改时间';
|
||||
comment on column aliyun_certify.update_user is '修改人ID';
|
||||
comment on column aliyun_certify.create_dept is '创建部门';
|
||||
comment on column aliyun_certify.status is '状态';
|
||||
|
||||
create index certify_id_index
|
||||
on aliyun_certify (is_deleted, certify_id);
|
||||
|
||||
create index user_certify_id_index
|
||||
on aliyun_certify (is_deleted, user_id, certify_id);
|
||||
|
||||
create index user_id_index
|
||||
on aliyun_certify (is_deleted, user_id, is_success);
|
||||
@@ -1,42 +0,0 @@
|
||||
|
||||
-- 创建表
|
||||
CREATE TABLE app_banner
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
cover_url VARCHAR(300) NULL,
|
||||
route VARCHAR(255) NULL,
|
||||
outside_url VARCHAR(300) NULL,
|
||||
sort INTEGER DEFAULT 1 NOT NULL,
|
||||
banner_type INTEGER NULL,
|
||||
remark VARCHAR(100) NULL,
|
||||
is_show INTEGER DEFAULT 0 NOT NULL,
|
||||
tag_name VARCHAR(255) NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
-- 添加表注释
|
||||
COMMENT ON TABLE app_banner IS '首页轮播图';
|
||||
|
||||
-- 添加列注释
|
||||
COMMENT ON COLUMN app_banner.id IS 'ID';
|
||||
COMMENT ON COLUMN app_banner.cover_url IS '轮播图地址';
|
||||
COMMENT ON COLUMN app_banner.route IS '路由';
|
||||
COMMENT ON COLUMN app_banner.outside_url IS '外链地址';
|
||||
COMMENT ON COLUMN app_banner.sort IS '排序';
|
||||
COMMENT ON COLUMN app_banner.banner_type IS '轮播图类型 1-主banner 2-商城banner';
|
||||
COMMENT ON COLUMN app_banner.remark IS '备注';
|
||||
COMMENT ON COLUMN app_banner.is_show IS '是否显示';
|
||||
COMMENT ON COLUMN app_banner.tag_name IS '标签名';
|
||||
COMMENT ON COLUMN app_banner.create_user IS '创建人';
|
||||
COMMENT ON COLUMN app_banner.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN app_banner.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN app_banner.update_user IS '修改人';
|
||||
COMMENT ON COLUMN app_banner.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN app_banner.status IS '状态';
|
||||
COMMENT ON COLUMN app_banner.is_deleted IS '是否已删除';
|
||||
@@ -1,168 +0,0 @@
|
||||
CREATE TABLE mall_spu
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
spu_sn VARCHAR(255) DEFAULT '' NOT NULL,
|
||||
spu_name VARCHAR(255) DEFAULT '' NOT NULL,
|
||||
main_img VARCHAR(255) DEFAULT '' NOT NULL,
|
||||
detail_img text NULL,
|
||||
top_img text NULL,
|
||||
cate_id VARCHAR(255) DEFAULT '' NOT NULL,
|
||||
cate_ids VARCHAR(255) DEFAULT '' NOT NULL,
|
||||
cost_price DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
original_price DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
retail_price DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
profit DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
sales INTEGER DEFAULT 0 NOT NULL,
|
||||
spu_qty INTEGER DEFAULT 0 NOT NULL,
|
||||
tags text DEFAULT '' NOT NULL,
|
||||
status INTEGER DEFAULT 0 NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
|
||||
COMMENT ON TABLE mall_spu IS '商城spu';
|
||||
COMMENT ON COLUMN mall_spu.id IS '主键';
|
||||
COMMENT ON COLUMN mall_spu.spu_sn IS '商品编码';
|
||||
COMMENT ON COLUMN mall_spu.spu_name IS '商品名称';
|
||||
COMMENT ON COLUMN mall_spu.main_img IS '主图';
|
||||
COMMENT ON COLUMN mall_spu.detail_img IS '详情图(多图,逗号分割)';
|
||||
COMMENT ON COLUMN mall_spu.top_img IS '顶图(多图,逗号分割)';
|
||||
COMMENT ON COLUMN mall_spu.cate_id IS 'cate_id分类';
|
||||
COMMENT ON COLUMN mall_spu.cate_ids IS 'cate_id分类';
|
||||
COMMENT ON COLUMN mall_spu.cost_price IS '成本价';
|
||||
COMMENT ON COLUMN mall_spu.original_price IS '原价';
|
||||
COMMENT ON COLUMN mall_spu.retail_price IS '销售价';
|
||||
COMMENT ON COLUMN mall_spu.profit IS '利润';
|
||||
COMMENT ON COLUMN mall_spu.sales IS '销量';
|
||||
COMMENT ON COLUMN mall_spu.spu_qty IS '库存';
|
||||
COMMENT ON COLUMN mall_spu.tags IS '标签(多标签,逗号分割 )';
|
||||
COMMENT ON COLUMN mall_spu.status IS '状态(0=下架,1=上架,3=删除)';
|
||||
COMMENT ON COLUMN mall_spu.create_user IS '创建人';
|
||||
COMMENT ON COLUMN mall_spu.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN mall_spu.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN mall_spu.update_user IS '修改人';
|
||||
COMMENT ON COLUMN mall_spu.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN mall_spu.is_deleted IS '是否已删除';
|
||||
|
||||
|
||||
|
||||
CREATE TABLE ys_category
|
||||
(
|
||||
id INTEGER NOT NULL PRIMARY KEY,
|
||||
cname VARCHAR(100) DEFAULT '' NOT NULL,
|
||||
pid int8 DEFAULT 0 NOT NULL,
|
||||
level INTEGER DEFAULT 0 NOT NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
create_user int8 NULL,
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
status INTEGER NULL,
|
||||
create_dept int8 NULL
|
||||
);
|
||||
|
||||
CREATE SEQUENCE ys_category_id_seq START 1;
|
||||
ALTER TABLE ys_category ALTER COLUMN id SET DEFAULT nextval('ys_category_id_seq');
|
||||
ALTER SEQUENCE ys_category_id_seq OWNED BY ys_category.id;
|
||||
|
||||
COMMENT ON TABLE ys_category IS '商品分类';
|
||||
COMMENT ON COLUMN ys_category.id IS '主键';
|
||||
COMMENT ON COLUMN ys_category.cname IS '分类名称';
|
||||
COMMENT ON COLUMN ys_category.pid IS 'pid';
|
||||
COMMENT ON COLUMN ys_category.level IS 'level';
|
||||
COMMENT ON COLUMN ys_category.is_deleted IS '是否已删除';
|
||||
COMMENT ON COLUMN ys_category.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN ys_category.create_user IS '创建人';
|
||||
COMMENT ON COLUMN ys_category.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN ys_category.update_user IS '修改人';
|
||||
COMMENT ON COLUMN ys_category.status IS '状态';
|
||||
COMMENT ON COLUMN ys_category.create_dept IS '创建部门';
|
||||
|
||||
|
||||
CREATE TABLE mall_cart
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 DEFAULT 0 NOT NULL,
|
||||
title VARCHAR(200) DEFAULT '' NOT NULL,
|
||||
spu_id int8 DEFAULT 0 NOT NULL,
|
||||
quantity INTEGER DEFAULT 0 NOT NULL,
|
||||
original_price DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
main_img VARCHAR(255) DEFAULT '' NOT NULL,
|
||||
retail_price DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
|
||||
COMMENT ON TABLE mall_cart IS '商城购物车';
|
||||
COMMENT ON COLUMN mall_cart.id IS '主键';
|
||||
COMMENT ON COLUMN mall_cart.user_id IS '用户id';
|
||||
COMMENT ON COLUMN mall_cart.title IS '商品名称';
|
||||
COMMENT ON COLUMN mall_cart.spu_id IS 'spuId';
|
||||
COMMENT ON COLUMN mall_cart.quantity IS '数量';
|
||||
COMMENT ON COLUMN mall_cart.original_price IS '原价';
|
||||
COMMENT ON COLUMN mall_cart.main_img IS '主图';
|
||||
COMMENT ON COLUMN mall_cart.retail_price IS '销售价';
|
||||
COMMENT ON COLUMN mall_cart.create_user IS '创建人';
|
||||
COMMENT ON COLUMN mall_cart.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN mall_cart.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN mall_cart.update_user IS '修改人';
|
||||
COMMENT ON COLUMN mall_cart.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN mall_cart.status IS '状态';
|
||||
COMMENT ON COLUMN mall_cart.is_deleted IS '是否已删除';
|
||||
CREATE INDEX idx_user_id ON mall_cart (user_id);
|
||||
|
||||
|
||||
|
||||
CREATE TABLE user_address
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 NULL,
|
||||
regions_info_id int8 NULL,
|
||||
province VARCHAR(200) NULL,
|
||||
city VARCHAR(200) NULL,
|
||||
district VARCHAR(200) NULL,
|
||||
street VARCHAR(200) NULL,
|
||||
detail VARCHAR(200) NULL,
|
||||
consignee VARCHAR(200) NULL,
|
||||
phone VARCHAR(200) NULL,
|
||||
is_default INTEGER NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
|
||||
COMMENT ON TABLE user_address IS '用户地址表';
|
||||
COMMENT ON COLUMN user_address.id IS '主键';
|
||||
COMMENT ON COLUMN user_address.user_id IS '用户id';
|
||||
COMMENT ON COLUMN user_address.regions_info_id IS '地区信息id';
|
||||
COMMENT ON COLUMN user_address.province IS '省份';
|
||||
COMMENT ON COLUMN user_address.city IS '城市';
|
||||
COMMENT ON COLUMN user_address.district IS '区县';
|
||||
COMMENT ON COLUMN user_address.street IS '街道';
|
||||
COMMENT ON COLUMN user_address.detail IS '详细地址';
|
||||
COMMENT ON COLUMN user_address.consignee IS '收货人';
|
||||
COMMENT ON COLUMN user_address.phone IS '联系电话';
|
||||
COMMENT ON COLUMN user_address.is_default IS '是否默认地址(0=否,1=是)';
|
||||
COMMENT ON COLUMN user_address.create_user IS '创建人';
|
||||
COMMENT ON COLUMN user_address.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN user_address.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN user_address.update_user IS '修改人';
|
||||
COMMENT ON COLUMN user_address.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN user_address.status IS '状态';
|
||||
COMMENT ON COLUMN user_address.is_deleted IS '是否已删除';
|
||||
@@ -1,299 +0,0 @@
|
||||
CREATE TABLE user_order
|
||||
(
|
||||
id int8 DEFAULT 0 NOT NULL PRIMARY KEY,
|
||||
user_id int8 DEFAULT 0 NOT NULL,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
order_type INTEGER DEFAULT 0 NOT NULL,
|
||||
order_id int8 DEFAULT 0 NOT NULL,
|
||||
title VARCHAR(256) DEFAULT '' NOT NULL,
|
||||
images VARCHAR(512) NULL,
|
||||
quantity INTEGER NULL,
|
||||
description VARCHAR(200) DEFAULT '' NOT NULL,
|
||||
order_status INTEGER DEFAULT 0 NOT NULL,
|
||||
total_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
actual_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
payment_type INTEGER DEFAULT 0 NOT NULL,
|
||||
payment_time TIMESTAMP NULL,
|
||||
payment_track VARCHAR(255) DEFAULT '' NOT NULL,
|
||||
payment_status INTEGER DEFAULT 1 NOT NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE user_order IS '用户订单';
|
||||
COMMENT ON COLUMN user_order.id IS '主键';
|
||||
COMMENT ON COLUMN user_order.user_id IS '用户id';
|
||||
COMMENT ON COLUMN user_order.user_phone IS '用户手机号';
|
||||
COMMENT ON COLUMN user_order.user_name IS '用户名称';
|
||||
COMMENT ON COLUMN user_order.order_type IS '订单类型';
|
||||
COMMENT ON COLUMN user_order.order_id IS '订单id';
|
||||
COMMENT ON COLUMN user_order.title IS '订单名称';
|
||||
COMMENT ON COLUMN user_order.images IS '图片';
|
||||
COMMENT ON COLUMN user_order.quantity IS '数量';
|
||||
COMMENT ON COLUMN user_order.description IS '订单描述';
|
||||
COMMENT ON COLUMN user_order.order_status IS '订单状态';
|
||||
COMMENT ON COLUMN user_order.total_amount IS '订单金额';
|
||||
COMMENT ON COLUMN user_order.actual_amount IS '实际支付金额';
|
||||
COMMENT ON COLUMN user_order.payment_type IS '支付方式';
|
||||
COMMENT ON COLUMN user_order.payment_time IS '支付时间';
|
||||
COMMENT ON COLUMN user_order.payment_track IS '支付凭证编号';
|
||||
COMMENT ON COLUMN user_order.payment_status IS '支付状态';
|
||||
COMMENT ON COLUMN user_order.create_user IS '创建人';
|
||||
COMMENT ON COLUMN user_order.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN user_order.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN user_order.update_user IS '修改人';
|
||||
COMMENT ON COLUMN user_order.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN user_order.status IS '状态';
|
||||
COMMENT ON COLUMN user_order.update_user IS '修改人';
|
||||
COMMENT ON COLUMN user_order.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN user_order.status IS '状态';
|
||||
COMMENT ON COLUMN user_order.payment_time IS '支付时间';
|
||||
COMMENT ON COLUMN user_order.payment_track IS '支付凭证编号';
|
||||
COMMENT ON COLUMN user_order.payment_status IS '支付状态';
|
||||
COMMENT ON COLUMN user_order.create_user IS '创建人';
|
||||
COMMENT ON COLUMN user_order.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN user_order.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN user_order.update_user IS '修改人';
|
||||
COMMENT ON COLUMN user_order.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN user_order.status IS '状态';
|
||||
COMMENT ON COLUMN user_order.update_user IS '修改人';
|
||||
COMMENT ON COLUMN user_order.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN user_order.status IS '状态';
|
||||
COMMENT ON COLUMN user_order.update_user IS '修改人';
|
||||
COMMENT ON COLUMN user_order.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN user_order.status IS '状态';
|
||||
COMMENT ON COLUMN user_order.is_deleted IS '是否已删除';
|
||||
|
||||
CREATE INDEX user_order_index ON user_order (user_id, order_type);
|
||||
|
||||
|
||||
|
||||
CREATE TABLE mall_summary_order
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 DEFAULT 0 NOT NULL,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
products_info text NULL,
|
||||
order_info text NULL,
|
||||
confirm_info text NULL,
|
||||
vendor_regions_id int8 NOT NULL,
|
||||
address_id int8 NOT NULL,
|
||||
delivery_info text NULL,
|
||||
freight_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
cost_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
order_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
total_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
actual_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
refund_amount DECIMAL(10, 2) DEFAULT 0.00 NULL,
|
||||
payment_type INTEGER DEFAULT 0 NOT NULL,
|
||||
extra_type INTEGER DEFAULT 0 NOT NULL,
|
||||
payment_status INTEGER DEFAULT 0 NOT NULL,
|
||||
order_status INTEGER DEFAULT 0 NOT NULL,
|
||||
payment_completed_time TIMESTAMP NULL,
|
||||
payment_track VARCHAR(200) DEFAULT '' NOT NULL,
|
||||
expire_time TIMESTAMP NULL,
|
||||
give_token DECIMAL(10, 2) NULL,
|
||||
actual_give_token DECIMAL(10, 2) NULL,
|
||||
is_royalty INTEGER DEFAULT 0 NULL,
|
||||
is_recorded INTEGER DEFAULT 0 NULL,
|
||||
is_statistics INTEGER DEFAULT 0 NULL,
|
||||
remarks VARCHAR(200) DEFAULT '' NOT NULL,
|
||||
version int8 DEFAULT 0 NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP NULL,
|
||||
status INTEGER DEFAULT 0 NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
|
||||
);
|
||||
|
||||
COMMENT ON TABLE mall_summary_order IS '商城汇总订单';
|
||||
COMMENT ON COLUMN mall_summary_order.id IS '主键';
|
||||
COMMENT ON COLUMN mall_summary_order.user_id IS '用户id';
|
||||
COMMENT ON COLUMN mall_summary_order.user_phone IS '用户手机号';
|
||||
COMMENT ON COLUMN mall_summary_order.user_name IS '用户名称';
|
||||
COMMENT ON COLUMN mall_summary_order.products_info IS '商品信息';
|
||||
COMMENT ON COLUMN mall_summary_order.order_info IS '订单信息';
|
||||
COMMENT ON COLUMN mall_summary_order.confirm_info IS '订单确认信息';
|
||||
COMMENT ON COLUMN mall_summary_order.vendor_regions_id IS '地区id';
|
||||
COMMENT ON COLUMN mall_summary_order.address_id IS '地址id';
|
||||
COMMENT ON COLUMN mall_summary_order.delivery_info IS '快递信息';
|
||||
COMMENT ON COLUMN mall_summary_order.freight_amount IS '运费';
|
||||
COMMENT ON COLUMN mall_summary_order.cost_amount IS '订单成本';
|
||||
COMMENT ON COLUMN mall_summary_order.order_amount IS '订单金额';
|
||||
COMMENT ON COLUMN mall_summary_order.total_amount IS '总金额';
|
||||
COMMENT ON COLUMN mall_summary_order.actual_amount IS '实际支付';
|
||||
COMMENT ON COLUMN mall_summary_order.refund_amount IS '退款金额';
|
||||
COMMENT ON COLUMN mall_summary_order.payment_type IS '支付类型';
|
||||
COMMENT ON COLUMN mall_summary_order.extra_type IS '附加支付类型';
|
||||
COMMENT ON COLUMN mall_summary_order.payment_status IS '支付状态';
|
||||
COMMENT ON COLUMN mall_summary_order.extra_type IS '附加支付类型';
|
||||
COMMENT ON COLUMN mall_summary_order.order_status IS '订单状态 0=失败,1=待确认,2=待发货,3=待收货,4=已完成,5=已取消,6=售后中,7=已完结';
|
||||
COMMENT ON COLUMN mall_summary_order.payment_completed_time IS '支付完成时间';
|
||||
COMMENT ON COLUMN mall_summary_order.payment_track IS '支付凭证';
|
||||
COMMENT ON COLUMN mall_summary_order.order_status IS '订单状态 0=失败,1=待确认,2=待发货,3=待收货,4=已完成,5=已取消,6=售后中,7=已完结';
|
||||
COMMENT ON COLUMN mall_summary_order.payment_completed_time IS '支付完成时间';
|
||||
COMMENT ON COLUMN mall_summary_order.payment_track IS '支付凭证';
|
||||
COMMENT ON COLUMN mall_summary_order.expire_time IS '超时时间';
|
||||
COMMENT ON COLUMN mall_summary_order.give_token IS '赠送积分';
|
||||
COMMENT ON COLUMN mall_summary_order.actual_give_token IS '实际赠送扣分';
|
||||
COMMENT ON COLUMN mall_summary_order.is_royalty IS '是否已经给上级分红 0=否,1=是';
|
||||
COMMENT ON COLUMN mall_summary_order.is_recorded IS '是否记录资金账户里 0=否,1=是';
|
||||
COMMENT ON COLUMN mall_summary_order.is_statistics IS '是否统计到用户现金业绩里 0=否,1=是';
|
||||
COMMENT ON COLUMN mall_summary_order.remarks IS '备注';
|
||||
COMMENT ON COLUMN mall_summary_order.status IS '状态';
|
||||
COMMENT ON COLUMN mall_summary_order.is_deleted IS '是否已删除';
|
||||
|
||||
|
||||
CREATE INDEX mso_index ON mall_summary_order (user_id);
|
||||
CREATE INDEX mso_status_index ON mall_summary_order (payment_status, status);
|
||||
CREATE INDEX mso_recorded_index ON mall_summary_order (payment_status, is_recorded);
|
||||
CREATE INDEX mso_statistics_index ON mall_summary_order (payment_status, is_statistics);
|
||||
|
||||
|
||||
|
||||
CREATE TABLE mall_detail_order
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 DEFAULT 0 NOT NULL,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
summary_order_id int8 DEFAULT 0 NOT NULL,
|
||||
spu_id int8 DEFAULT 0 NOT NULL,
|
||||
quantity INTEGER DEFAULT 0 NOT NULL,
|
||||
sku_snapshot text NULL,
|
||||
actual_cost_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
order_amount DECIMAL(10, 2) NULL,
|
||||
cost_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
actual_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
given_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
remarks VARCHAR(200) DEFAULT '' NOT NULL,
|
||||
order_status INTEGER DEFAULT 0 NOT NULL,
|
||||
freight VARCHAR(200) DEFAULT 0.00 NOT NULL,
|
||||
logistics VARCHAR(200) DEFAULT 0.00 NOT NULL,
|
||||
delivery_time timestamp(6),
|
||||
products_info text NULL,
|
||||
version integer DEFAULT 0 NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP NULL,
|
||||
status INTEGER DEFAULT -1 NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE mall_detail_order IS '商城详情订单';
|
||||
COMMENT ON COLUMN mall_detail_order.id IS '主键';
|
||||
COMMENT ON COLUMN mall_detail_order.user_id IS '用户id';
|
||||
COMMENT ON COLUMN mall_detail_order.user_phone IS '用户手机号';
|
||||
COMMENT ON COLUMN mall_detail_order.user_name IS '用户名称';
|
||||
COMMENT ON COLUMN mall_detail_order.summary_order_id IS '主订单id';
|
||||
COMMENT ON COLUMN mall_detail_order.spu_id IS '商品id';
|
||||
COMMENT ON COLUMN mall_detail_order.quantity IS '数量';
|
||||
COMMENT ON COLUMN mall_detail_order.spu_id IS '商品id';
|
||||
COMMENT ON COLUMN mall_detail_order.quantity IS '数量';
|
||||
COMMENT ON COLUMN mall_detail_order.sku_snapshot IS '商品快照';
|
||||
COMMENT ON COLUMN mall_detail_order.actual_cost_amount IS '实际成本';
|
||||
COMMENT ON COLUMN mall_detail_order.order_amount IS '订单金额';
|
||||
COMMENT ON COLUMN mall_detail_order.cost_amount IS '订单成本';
|
||||
COMMENT ON COLUMN mall_detail_order.cost_amount IS '订单成本';
|
||||
COMMENT ON COLUMN mall_detail_order.actual_amount IS '实际支付';
|
||||
COMMENT ON COLUMN mall_detail_order.given_amount IS '赠送积分';
|
||||
COMMENT ON COLUMN mall_detail_order.remarks IS '备注';
|
||||
COMMENT ON COLUMN mall_detail_order.logistics IS '物流';
|
||||
COMMENT ON COLUMN mall_detail_order.products_info IS '商品信息';
|
||||
COMMENT ON COLUMN mall_detail_order.freight IS '运费';
|
||||
COMMENT ON COLUMN mall_detail_order.order_status IS '订单状态 0=失败,1=待确认,2=待发货,3=待收货,4=已完成,5=已取消,6=售后中,7=已完结';
|
||||
COMMENT ON COLUMN mall_detail_order.status IS '状态';
|
||||
COMMENT ON COLUMN mall_detail_order.is_deleted IS '是否已删除';
|
||||
COMMENT ON COLUMN mall_detail_order.status IS '状态';
|
||||
COMMENT ON COLUMN mall_detail_order.is_deleted IS '是否已删除';
|
||||
|
||||
CREATE INDEX mdo_index ON mall_detail_order (summary_order_id);
|
||||
CREATE INDEX mdo_uid_index ON mall_detail_order (user_id);
|
||||
|
||||
|
||||
CREATE TABLE mall_summary_order_after
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 DEFAULT -1 NOT NULL,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
summary_order_id int8 DEFAULT -1 NOT NULL,
|
||||
goods_id int8 DEFAULT -1 NOT NULL,
|
||||
sku_id int8 NOT NULL,
|
||||
goods_name VARCHAR(256) NOT NULL,
|
||||
third_plat_order_no VARCHAR(32) NOT NULL,
|
||||
third_plat_after_no VARCHAR(32) NOT NULL,
|
||||
quantity INTEGER DEFAULT -1 NULL,
|
||||
apply_type INTEGER NULL,
|
||||
apply_reason VARCHAR(100) DEFAULT '-1' NULL,
|
||||
apply_pic_urls TEXT NULL,
|
||||
refund_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
refund_status INTEGER DEFAULT 0 NULL,
|
||||
refund_reason VARCHAR(255) NULL,
|
||||
receiver VARCHAR(125) NULL,
|
||||
receiver_phone VARCHAR(255) NULL,
|
||||
receiver_addr VARCHAR(255) NULL,
|
||||
receiver_delivery_no VARCHAR(255) NULL,
|
||||
remarks VARCHAR(200) DEFAULT '' NULL,
|
||||
version integer DEFAULT 0 NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP NULL,
|
||||
status INTEGER DEFAULT 0 NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL,
|
||||
after_info JSON NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE mall_summary_order_after IS '商品售后订单表';
|
||||
COMMENT ON COLUMN mall_summary_order_after.id IS '售后订单号';
|
||||
COMMENT ON COLUMN mall_summary_order_after.user_id IS '用户id';
|
||||
COMMENT ON COLUMN mall_summary_order_after.user_phone IS '用户手机号';
|
||||
COMMENT ON COLUMN mall_summary_order_after.user_name IS '用户名称';
|
||||
COMMENT ON COLUMN mall_summary_order_after.summary_order_id IS '总订单id';
|
||||
COMMENT ON COLUMN mall_summary_order_after.goods_id IS '商品ID';
|
||||
COMMENT ON COLUMN mall_summary_order_after.sku_id IS '商品订单号';
|
||||
COMMENT ON COLUMN mall_summary_order_after.goods_name IS '商品名称';
|
||||
COMMENT ON COLUMN mall_summary_order_after.third_plat_order_no IS '第三方订单单号';
|
||||
COMMENT ON COLUMN mall_summary_order_after.third_plat_after_no IS '第三方售后单号';
|
||||
COMMENT ON COLUMN mall_summary_order_after.quantity IS '商品数量';
|
||||
COMMENT ON COLUMN mall_summary_order_after.apply_type IS '申请售后类型,1=未收货退款,2=退货退款,3=换货补发,4=不退货仅退款';
|
||||
COMMENT ON COLUMN mall_summary_order_after.apply_reason IS '申请售后原因';
|
||||
COMMENT ON COLUMN mall_summary_order_after.apply_pic_urls IS '图片地址';
|
||||
COMMENT ON COLUMN mall_summary_order_after.refund_amount IS '退款金额';
|
||||
COMMENT ON COLUMN mall_summary_order_after.refund_status IS '处理售后状态';
|
||||
COMMENT ON COLUMN mall_summary_order_after.refund_reason IS '处理回复';
|
||||
COMMENT ON COLUMN mall_summary_order_after.receiver IS '退件收货人姓名';
|
||||
COMMENT ON COLUMN mall_summary_order_after.receiver_phone IS '退件收货人电话';
|
||||
COMMENT ON COLUMN mall_summary_order_after.receiver_addr IS '退件地址';
|
||||
COMMENT ON COLUMN mall_summary_order_after.receiver_delivery_no IS '退货物流单号';
|
||||
COMMENT ON COLUMN mall_summary_order_after.remarks IS '备注';
|
||||
COMMENT ON COLUMN mall_summary_order_after.status IS '状态';
|
||||
COMMENT ON COLUMN mall_summary_order_after.status IS '状态';
|
||||
COMMENT ON COLUMN mall_summary_order_after.is_deleted IS '是否已删除';
|
||||
COMMENT ON COLUMN mall_summary_order_after.after_info IS '售后详情';
|
||||
COMMENT ON COLUMN mall_summary_order_after.refund_amount IS '退款金额';
|
||||
COMMENT ON COLUMN mall_summary_order_after.refund_status IS '处理售后状态';
|
||||
COMMENT ON COLUMN mall_summary_order_after.refund_reason IS '处理回复';
|
||||
COMMENT ON COLUMN mall_summary_order_after.receiver IS '退件收货人姓名';
|
||||
COMMENT ON COLUMN mall_summary_order_after.receiver_phone IS '退件收货人电话';
|
||||
COMMENT ON COLUMN mall_summary_order_after.receiver_addr IS '退件地址';
|
||||
COMMENT ON COLUMN mall_summary_order_after.receiver_delivery_no IS '退货物流单号';
|
||||
COMMENT ON COLUMN mall_summary_order_after.remarks IS '备注';
|
||||
COMMENT ON COLUMN mall_summary_order_after.status IS '状态';
|
||||
COMMENT ON COLUMN mall_summary_order_after.is_deleted IS '是否已删除';
|
||||
COMMENT ON COLUMN mall_summary_order_after.after_info IS '售后详情';
|
||||
|
||||
@@ -1,250 +0,0 @@
|
||||
CREATE TABLE registration_order
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
spu_id int8 NULL,
|
||||
sku_id int8 NULL,
|
||||
title VARCHAR(100) NOT NULL,
|
||||
transaction_type INTEGER NOT NULL,
|
||||
thumbnail VARCHAR(500) NOT NULL,
|
||||
thumbnail_height INTEGER NULL,
|
||||
detail TEXT NULL,
|
||||
price DECIMAL(10, 2) NOT NULL,
|
||||
points DECIMAL(10, 2) NOT NULL,
|
||||
quantity INTEGER NOT NULL,
|
||||
remaining INTEGER NOT NULL,
|
||||
user_id int8 NOT NULL,
|
||||
user_nickname VARCHAR(100) NULL,
|
||||
in_transaction INTEGER DEFAULT 0 NOT NULL,
|
||||
is_full_package INTEGER DEFAULT 0 NOT NULL,
|
||||
delivery_type INTEGER DEFAULT 1 NULL,
|
||||
region_code VARCHAR(10) NULL,
|
||||
region_name VARCHAR(100) NULL,
|
||||
receiver_address VARCHAR(100) NULL,
|
||||
contact VARCHAR(100) NULL,
|
||||
contact_number VARCHAR(100) NULL,
|
||||
is_virtual INTEGER DEFAULT 0 NOT NULL,
|
||||
is_closed INTEGER DEFAULT 0 NOT NULL,
|
||||
version integer DEFAULT 0 NOT NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL,
|
||||
is_vendor INTEGER DEFAULT 0 NULL,
|
||||
is_priority INTEGER DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE registration_order IS '挂单表';
|
||||
COMMENT ON COLUMN registration_order.id IS '挂单ID';
|
||||
COMMENT ON COLUMN registration_order.spu_id IS 'spuId';
|
||||
COMMENT ON COLUMN registration_order.sku_id IS 'skuId';
|
||||
COMMENT ON COLUMN registration_order.title IS '规格名称';
|
||||
COMMENT ON COLUMN registration_order.transaction_type IS '交易类型 1-买 2-卖';
|
||||
COMMENT ON COLUMN registration_order.thumbnail IS '商品缩略图';
|
||||
COMMENT ON COLUMN registration_order.thumbnail_height IS '缩略图高度';
|
||||
COMMENT ON COLUMN registration_order.detail IS '详情图';
|
||||
COMMENT ON COLUMN registration_order.price IS '单价';
|
||||
COMMENT ON COLUMN registration_order.points IS '单个赠送积分';
|
||||
COMMENT ON COLUMN registration_order.quantity IS '数量';
|
||||
COMMENT ON COLUMN registration_order.remaining IS '剩余数量';
|
||||
COMMENT ON COLUMN registration_order.user_id IS '用户id';
|
||||
COMMENT ON COLUMN registration_order.user_nickname IS '用户昵称';
|
||||
COMMENT ON COLUMN registration_order.in_transaction IS '是否交易中 1-交易中 0-空闲中';
|
||||
COMMENT ON COLUMN registration_order.is_full_package IS '是否全量交易 1-是 0-否';
|
||||
COMMENT ON COLUMN registration_order.delivery_type IS '配送方式 1-物流快递 2-同城配送 3-上门自提';
|
||||
COMMENT ON COLUMN registration_order.region_code IS '收货地址区域编码';
|
||||
COMMENT ON COLUMN registration_order.region_name IS '行政区域名称';
|
||||
COMMENT ON COLUMN registration_order.receiver_address IS '收货地址';
|
||||
COMMENT ON COLUMN registration_order.contact IS '收货人';
|
||||
COMMENT ON COLUMN registration_order.contact_number IS '收货人联系方式';
|
||||
COMMENT ON COLUMN registration_order.is_virtual IS '是否虚拟商品 1-是 0-否';
|
||||
COMMENT ON COLUMN registration_order.is_closed IS '是否交易完成 1-是 0-否';
|
||||
COMMENT ON COLUMN registration_order.version IS '乐观锁版本号';
|
||||
COMMENT ON COLUMN registration_order.create_user IS '创建人';
|
||||
COMMENT ON COLUMN registration_order.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN registration_order.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN registration_order.update_user IS '修改人';
|
||||
COMMENT ON COLUMN registration_order.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN registration_order.status IS '状态';
|
||||
COMMENT ON COLUMN registration_order.is_deleted IS '是否已删除';
|
||||
COMMENT ON COLUMN registration_order.is_vendor IS '是否服务商订单';
|
||||
COMMENT ON COLUMN registration_order.is_priority IS '是否优先';
|
||||
|
||||
|
||||
|
||||
CREATE TABLE transaction_order
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
registration_id int8 NOT NULL,
|
||||
sku_id int8 NULL,
|
||||
title VARCHAR(100) NOT NULL,
|
||||
transaction_type INTEGER NOT NULL,
|
||||
thumbnail VARCHAR(500) NOT NULL,
|
||||
price DECIMAL(10, 2) NOT NULL,
|
||||
points DECIMAL(10, 2) NOT NULL,
|
||||
quantity INTEGER NOT NULL,
|
||||
total_amount DECIMAL(10, 2) NOT NULL,
|
||||
total_points DECIMAL(10, 2) NOT NULL,
|
||||
user_id int8 NOT NULL,
|
||||
user_nickname VARCHAR(500) NULL,
|
||||
payment_voucher VARCHAR(500) NULL,
|
||||
delivery_voucher VARCHAR(500) NULL,
|
||||
delivery_type INTEGER DEFAULT 1 NOT NULL,
|
||||
region_code VARCHAR(10) NULL,
|
||||
region_name VARCHAR(100) NULL,
|
||||
receiver_address VARCHAR(100) NULL,
|
||||
contact VARCHAR(100) NULL,
|
||||
contact_number VARCHAR(100) NULL,
|
||||
counterparty_order_id int8 DEFAULT 0 NOT NULL,
|
||||
is_virtual INTEGER DEFAULT 0 NOT NULL,
|
||||
supplier_order_sn VARCHAR(100) NULL,
|
||||
expire_time TIMESTAMP NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE transaction_order IS '交易单表';
|
||||
COMMENT ON COLUMN transaction_order.id IS '交易单ID';
|
||||
COMMENT ON COLUMN transaction_order.registration_id IS '挂单Id';
|
||||
COMMENT ON COLUMN transaction_order.sku_id IS 'skuId';
|
||||
COMMENT ON COLUMN transaction_order.title IS '规格名称';
|
||||
COMMENT ON COLUMN transaction_order.transaction_type IS '交易类型 1-买 2-卖';
|
||||
COMMENT ON COLUMN transaction_order.thumbnail IS '商品缩略图';
|
||||
COMMENT ON COLUMN transaction_order.price IS '单价';
|
||||
COMMENT ON COLUMN transaction_order.points IS '单个赠送积分';
|
||||
COMMENT ON COLUMN transaction_order.quantity IS '数量';
|
||||
COMMENT ON COLUMN transaction_order.total_amount IS '总金额';
|
||||
COMMENT ON COLUMN transaction_order.total_points IS '总赠送积分';
|
||||
COMMENT ON COLUMN transaction_order.user_id IS '用户id';
|
||||
COMMENT ON COLUMN transaction_order.user_nickname IS '用户昵称';
|
||||
COMMENT ON COLUMN transaction_order.payment_voucher IS '付款凭证';
|
||||
COMMENT ON COLUMN transaction_order.delivery_voucher IS '物流凭证';
|
||||
COMMENT ON COLUMN transaction_order.delivery_type IS '收货方式 1-物流快递 2-同城配送 3-上门自提';
|
||||
COMMENT ON COLUMN transaction_order.region_code IS '收货地址区域编码';
|
||||
COMMENT ON COLUMN transaction_order.region_name IS '行政区域名称';
|
||||
COMMENT ON COLUMN transaction_order.receiver_address IS '收货地址';
|
||||
COMMENT ON COLUMN transaction_order.contact IS '收货联系人';
|
||||
COMMENT ON COLUMN transaction_order.contact_number IS '收货人联系方式';
|
||||
COMMENT ON COLUMN transaction_order.counterparty_order_id IS '对手单单号';
|
||||
COMMENT ON COLUMN transaction_order.is_virtual IS '是否虚拟商品 1-是 0-否';
|
||||
COMMENT ON COLUMN transaction_order.supplier_order_sn IS '三方供应商订单号';
|
||||
COMMENT ON COLUMN transaction_order.expire_time IS '待支付超时时间';
|
||||
COMMENT ON COLUMN transaction_order.create_user IS '创建人';
|
||||
COMMENT ON COLUMN transaction_order.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN transaction_order.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN transaction_order.update_user IS '修改人';
|
||||
COMMENT ON COLUMN transaction_order.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN transaction_order.status IS '状态 1-待支付 2-已支付 3-待发货 4-已发货 5-已完成';
|
||||
COMMENT ON COLUMN transaction_order.is_deleted IS '是否已删除';
|
||||
|
||||
CREATE TABLE user_inventory
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 NOT NULL,
|
||||
sku_id int8 NOT NULL,
|
||||
title VARCHAR(100) NOT NULL,
|
||||
thumbnail VARCHAR(500) NOT NULL,
|
||||
price DECIMAL(10, 2) NOT NULL,
|
||||
quantity INTEGER NOT NULL,
|
||||
is_virtual INTEGER DEFAULT 0 NOT NULL,
|
||||
attribute JSON NULL,
|
||||
version int8 DEFAULT 0 NOT NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE user_inventory IS '用户库存';
|
||||
COMMENT ON COLUMN user_inventory.id IS '库存ID';
|
||||
COMMENT ON COLUMN user_inventory.user_id IS '用户Id';
|
||||
COMMENT ON COLUMN user_inventory.sku_id IS 'skuId';
|
||||
COMMENT ON COLUMN user_inventory.title IS '规格名称';
|
||||
COMMENT ON COLUMN user_inventory.thumbnail IS '商品缩略图';
|
||||
COMMENT ON COLUMN user_inventory.price IS '单价';
|
||||
COMMENT ON COLUMN user_inventory.quantity IS '数量';
|
||||
COMMENT ON COLUMN user_inventory.is_virtual IS '是否虚拟商品 1-是 0-否';
|
||||
COMMENT ON COLUMN user_inventory.attribute IS '规格';
|
||||
COMMENT ON COLUMN user_inventory.version IS '乐观锁版本号';
|
||||
COMMENT ON COLUMN user_inventory.create_user IS '创建人';
|
||||
COMMENT ON COLUMN user_inventory.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN user_inventory.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN user_inventory.update_user IS '修改人';
|
||||
COMMENT ON COLUMN user_inventory.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN user_inventory.status IS '状态';
|
||||
COMMENT ON COLUMN user_inventory.is_deleted IS '是否已删除';
|
||||
|
||||
|
||||
CREATE TABLE calendar_non_working
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
off_date DATE NOT NULL,
|
||||
remark VARCHAR(200) NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE calendar_non_working IS '节假日';
|
||||
COMMENT ON COLUMN calendar_non_working.id IS '主键';
|
||||
COMMENT ON COLUMN calendar_non_working.off_date IS '休息日期';
|
||||
COMMENT ON COLUMN calendar_non_working.remark IS '备忘';
|
||||
COMMENT ON COLUMN calendar_non_working.create_user IS '创建人';
|
||||
COMMENT ON COLUMN calendar_non_working.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN calendar_non_working.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN calendar_non_working.update_user IS '修改人';
|
||||
COMMENT ON COLUMN calendar_non_working.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN calendar_non_working.status IS '状态';
|
||||
COMMENT ON COLUMN calendar_non_working.is_deleted IS '是否已删除';
|
||||
|
||||
|
||||
|
||||
CREATE TABLE user_otc_info
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 NOT NULL,
|
||||
alipay_account VARCHAR(200) NULL,
|
||||
wechat_account VARCHAR(200) NULL,
|
||||
alipay_qr_code VARCHAR(200) NULL,
|
||||
wechat_qr_code VARCHAR(200) NULL,
|
||||
bank_account VARCHAR(200) NULL,
|
||||
branch_info VARCHAR(200) NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE user_otc_info IS 'OTC收款信息';
|
||||
COMMENT ON COLUMN user_otc_info.id IS 'ID';
|
||||
COMMENT ON COLUMN user_otc_info.user_id IS '用户ID';
|
||||
COMMENT ON COLUMN user_otc_info.alipay_account IS '支付宝账号';
|
||||
COMMENT ON COLUMN user_otc_info.wechat_account IS '微信账号';
|
||||
COMMENT ON COLUMN user_otc_info.alipay_qr_code IS '支付宝收款码';
|
||||
COMMENT ON COLUMN user_otc_info.wechat_qr_code IS '微信收款码';
|
||||
COMMENT ON COLUMN user_otc_info.bank_account IS '银行账号';
|
||||
COMMENT ON COLUMN user_otc_info.branch_info IS '银行信息';
|
||||
COMMENT ON COLUMN user_otc_info.create_user IS '创建人';
|
||||
COMMENT ON COLUMN user_otc_info.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN user_otc_info.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN user_otc_info.update_user IS '修改人';
|
||||
COMMENT ON COLUMN user_otc_info.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN user_otc_info.status IS '状态';
|
||||
COMMENT ON COLUMN user_otc_info.is_deleted IS '是否已删除';
|
||||
@@ -1,48 +0,0 @@
|
||||
CREATE TABLE regions_info
|
||||
(
|
||||
id SERIAL PRIMARY KEY,
|
||||
name VARCHAR(50) NULL,
|
||||
level INTEGER NULL,
|
||||
pid INTEGER DEFAULT 0 NULL,
|
||||
lon DECIMAL(10, 6) NULL,
|
||||
lat DECIMAL(10, 6) NULL,
|
||||
region_code VARCHAR(128) NULL,
|
||||
full_name VARCHAR(200) NULL,
|
||||
vendor_region_id int8 NULL,
|
||||
store_city_id int8 NULL,
|
||||
hotel_city_code VARCHAR(128) NULL,
|
||||
hotel_city_pinyin VARCHAR(128) NULL,
|
||||
hotel_city_initials VARCHAR(4) NULL,
|
||||
sight_city_name VARCHAR(32) NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
create_user int8 NULL,
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
status INTEGER NULL,
|
||||
create_dept int8 NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE regions_info IS '地区详情表';
|
||||
COMMENT ON COLUMN regions_info.id IS '主键';
|
||||
COMMENT ON COLUMN regions_info.name IS '名称';
|
||||
COMMENT ON COLUMN regions_info.level IS '层级';
|
||||
COMMENT ON COLUMN regions_info.pid IS '父主键';
|
||||
COMMENT ON COLUMN regions_info.lon IS '经度';
|
||||
COMMENT ON COLUMN regions_info.lat IS '纬度';
|
||||
COMMENT ON COLUMN regions_info.region_code IS '地区编码';
|
||||
COMMENT ON COLUMN regions_info.full_name IS '全称';
|
||||
COMMENT ON COLUMN regions_info.vendor_region_id IS '服务商地区表id';
|
||||
COMMENT ON COLUMN regions_info.store_city_id IS '城市店铺id';
|
||||
COMMENT ON COLUMN regions_info.hotel_city_code IS '酒店地区编码';
|
||||
COMMENT ON COLUMN regions_info.hotel_city_pinyin IS '酒店地区拼音';
|
||||
COMMENT ON COLUMN regions_info.hotel_city_initials IS '酒店地区拼音首字母';
|
||||
COMMENT ON COLUMN regions_info.sight_city_name IS '景点城市名';
|
||||
COMMENT ON COLUMN regions_info.is_deleted IS '是否删除';
|
||||
COMMENT ON COLUMN regions_info.create_user IS '创建人';
|
||||
COMMENT ON COLUMN regions_info.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN regions_info.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN regions_info.update_user IS '修改人';
|
||||
COMMENT ON COLUMN regions_info.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN regions_info.status IS '状态';
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
CREATE TABLE user_daily_sign
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 NULL,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
statistics_date DATE NULL,
|
||||
sign_count INTEGER NULL,
|
||||
type INTEGER DEFAULT 1 NULL,
|
||||
remarks TEXT NULL,
|
||||
is_complete INTEGER DEFAULT 0 NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
create_user int8 NULL,
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
status INTEGER NULL,
|
||||
create_dept int8 NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE user_daily_sign IS '用户看广告记录表';
|
||||
COMMENT ON COLUMN user_daily_sign.user_id IS '用户id';
|
||||
COMMENT ON COLUMN user_daily_sign.user_phone IS '用户手机号';
|
||||
COMMENT ON COLUMN user_daily_sign.user_name IS '用户名称';
|
||||
COMMENT ON COLUMN user_daily_sign.statistics_date IS '统计日期';
|
||||
COMMENT ON COLUMN user_daily_sign.sign_count IS '看广告统计';
|
||||
COMMENT ON COLUMN user_daily_sign.type IS '广告类型 1-积分分产出';
|
||||
COMMENT on column user_daily_sign.is_complete is '是否完成 0-未完成 1-完成';
|
||||
COMMENT ON COLUMN user_daily_sign.remarks IS '备注';
|
||||
comment on column user_daily_sign.create_user is '创建人';
|
||||
comment on column user_daily_sign.create_dept is '创建部门';
|
||||
comment on column user_daily_sign.create_time is '创建时间';
|
||||
comment on column user_daily_sign.update_user is '修改人';
|
||||
comment on column user_daily_sign.update_time is '修改时间';
|
||||
comment on column user_daily_sign.status is '状态';
|
||||
comment on column user_daily_sign.is_deleted is '是否已删除';
|
||||
|
||||
CREATE INDEX uds_date_index
|
||||
ON user_daily_sign (is_deleted, type, statistics_date);
|
||||
|
||||
CREATE INDEX uds_complete_index
|
||||
ON user_daily_sign (is_deleted, statistics_date ,type, is_complete);
|
||||
|
||||
CREATE INDEX uds_uid_index
|
||||
ON user_daily_sign (is_deleted, type, user_id, statistics_date);
|
||||
|
||||
|
||||
|
||||
CREATE TABLE ads
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
name VARCHAR(255) NULL,
|
||||
url VARCHAR(255) NULL,
|
||||
sort INTEGER DEFAULT 1,
|
||||
type INTEGER DEFAULT 1,
|
||||
ads_time INTEGER NULL,
|
||||
is_deleted INTEGER DEFAULT 0,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
create_user int8 NULL,
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
status INTEGER NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE ads IS '广告表';
|
||||
COMMENT ON COLUMN ads.name IS '视频名称';
|
||||
COMMENT ON COLUMN ads.url IS '视频链接';
|
||||
COMMENT ON COLUMN ads.sort IS '广告序号';
|
||||
COMMENT ON COLUMN ads.type IS '广告类型 1-积分分产出';
|
||||
COMMENT ON COLUMN ads.ads_time IS '视频观看时长';
|
||||
COMMENT ON COLUMN ads.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN ads.status IS '状态';
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,44 +0,0 @@
|
||||
|
||||
-- 创建表
|
||||
CREATE TABLE user_notice
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 DEFAULT 0 NOT NULL,
|
||||
notice_type INTEGER DEFAULT 0 NOT NULL,
|
||||
has_read INTEGER DEFAULT 0 NOT NULL,
|
||||
release_time TIMESTAMP NULL,
|
||||
title VARCHAR(100) NULL,
|
||||
content TEXT NULL,
|
||||
remarks VARCHAR(200) NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
|
||||
create index user_notice_user_index
|
||||
on user_notice (is_deleted, user_id);
|
||||
|
||||
-- 添加表注释
|
||||
COMMENT ON TABLE user_notice IS '用户通知';
|
||||
|
||||
-- 添加列注释
|
||||
COMMENT ON COLUMN user_notice.id IS '主键';
|
||||
COMMENT ON COLUMN user_notice.user_id IS '用户id';
|
||||
COMMENT ON COLUMN user_notice.notice_type IS '通知类型0-系统通知';
|
||||
COMMENT ON COLUMN user_notice.has_read IS '是否已读 0-否 1-是';
|
||||
COMMENT ON COLUMN user_notice.release_time IS '阅读时间';
|
||||
COMMENT ON COLUMN user_notice.title IS '标题';
|
||||
COMMENT ON COLUMN user_notice.content IS '内容';
|
||||
COMMENT ON COLUMN user_notice.remarks IS '备注';
|
||||
COMMENT ON COLUMN user_notice.create_user IS '创建人';
|
||||
COMMENT ON COLUMN user_notice.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN user_notice.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN user_notice.update_user IS '修改人';
|
||||
COMMENT ON COLUMN user_notice.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN user_notice.status IS '状态';
|
||||
COMMENT ON COLUMN user_notice.is_deleted IS '是否已删除';
|
||||
@@ -1,180 +0,0 @@
|
||||
create table user_performance
|
||||
(
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
performance decimal(16, 4) default 0,
|
||||
own_performance decimal(16, 4) default 0,
|
||||
version int default 1,
|
||||
create_user int8,
|
||||
create_dept int8,
|
||||
create_time timestamp(6),
|
||||
update_user int8,
|
||||
update_time timestamp(6),
|
||||
status integer default 1,
|
||||
is_deleted integer default 0
|
||||
);
|
||||
create index up_index
|
||||
on user_performance (is_deleted, user_id);
|
||||
COMMENT ON TABLE user_performance IS '用户现金业绩表';
|
||||
COMMENT ON COLUMN user_performance.id IS '主键';
|
||||
COMMENT ON COLUMN user_performance.user_id IS '用户ID';
|
||||
COMMENT ON COLUMN user_performance.user_phone IS '用户手机号';
|
||||
COMMENT ON COLUMN user_performance.user_name IS '用户名称';
|
||||
COMMENT ON COLUMN user_performance.performance IS '总业绩';
|
||||
COMMENT ON COLUMN user_performance.own_performance IS '自身业绩';
|
||||
COMMENT ON COLUMN user_performance.version IS '版本号';
|
||||
comment on column user_performance.create_user is '创建人';
|
||||
comment on column user_performance.create_dept is '创建部门';
|
||||
comment on column user_performance.create_time is '创建时间';
|
||||
comment on column user_performance.update_user is '修改人';
|
||||
comment on column user_performance.update_time is '修改时间';
|
||||
comment on column user_performance.status is '状态';
|
||||
comment on column user_performance.is_deleted is '是否已删除';
|
||||
|
||||
alter table user_performance
|
||||
owner to postgres;
|
||||
|
||||
create table user_performance_log
|
||||
(
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 4) default 0,
|
||||
source_id int8,
|
||||
source_detail text,
|
||||
order_id int8,
|
||||
type int default 1,
|
||||
statistical_date timestamp(6),
|
||||
channel varchar(64),
|
||||
channel_detail text,
|
||||
remark text,
|
||||
create_user int8,
|
||||
create_dept int8,
|
||||
create_time timestamp(6),
|
||||
update_user int8,
|
||||
update_time timestamp(6),
|
||||
status integer default 1,
|
||||
is_deleted integer default 0
|
||||
);
|
||||
|
||||
create index user_performance_log_index
|
||||
on user_performance_log (is_deleted, user_id, statistical_date , type);
|
||||
|
||||
comment on table user_performance_log is '用户现金业绩日志表';
|
||||
comment on column user_performance_log.id is '主键';
|
||||
comment on column user_performance_log.user_id is '用户ID';
|
||||
comment on column user_performance_log.user_phone is '用户手机号';
|
||||
comment on column user_performance_log.user_name is '用户名称';
|
||||
comment on column user_performance_log.amount is '业绩变动金额';
|
||||
comment on column user_performance_log.source_id is '来源ID';
|
||||
comment on column user_performance_log.source_detail is '来源详情';
|
||||
comment on column user_performance_log.order_id is '订单ID';
|
||||
comment on column user_performance_log.type is '类型 1增加 2减少';
|
||||
comment on column user_performance_log.statistical_date is '统计日期';
|
||||
comment on column user_performance_log.channel is '渠道';
|
||||
comment on column user_performance_log.channel_detail is '渠道详情';
|
||||
comment on column user_performance_log.remark is '备注';
|
||||
comment on column user_performance_log.create_user is '创建人';
|
||||
comment on column user_performance_log.create_dept is '创建部门';
|
||||
comment on column user_performance_log.create_time is '创建时间';
|
||||
comment on column user_performance_log.update_user is '修改人';
|
||||
comment on column user_performance_log.update_time is '修改时间';
|
||||
comment on column user_performance_log.status is '状态';
|
||||
comment on column user_performance_log.is_deleted is '是否已删除';
|
||||
|
||||
alter table user_performance_log
|
||||
owner to postgres;
|
||||
|
||||
|
||||
create table user_performance_benefit
|
||||
(
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
performance decimal(16, 4) default 0,
|
||||
own_performance decimal(16, 4) default 0,
|
||||
version int default 1,
|
||||
create_user int8,
|
||||
create_dept int8,
|
||||
create_time timestamp(6),
|
||||
update_user int8,
|
||||
update_time timestamp(6),
|
||||
status integer default 1,
|
||||
is_deleted integer default 0
|
||||
);
|
||||
create index upb_index
|
||||
on user_performance_benefit (is_deleted, user_id);
|
||||
COMMENT ON TABLE user_performance_benefit IS '用户福利值业绩表';
|
||||
COMMENT ON COLUMN user_performance_benefit.id IS '主键';
|
||||
COMMENT ON COLUMN user_performance_benefit.user_id IS '用户ID';
|
||||
COMMENT ON COLUMN user_performance_benefit.user_phone IS '用户手机号';
|
||||
COMMENT ON COLUMN user_performance_benefit.user_name IS '用户名称';
|
||||
COMMENT ON COLUMN user_performance_benefit.performance IS '总业绩';
|
||||
COMMENT ON COLUMN user_performance_benefit.own_performance IS '自身业绩';
|
||||
COMMENT ON COLUMN user_performance_benefit.version IS '版本号';
|
||||
comment on column user_performance_benefit.create_user is '创建人';
|
||||
comment on column user_performance_benefit.create_dept is '创建部门';
|
||||
comment on column user_performance_benefit.create_time is '创建时间';
|
||||
comment on column user_performance_benefit.update_user is '修改人';
|
||||
comment on column user_performance_benefit.update_time is '修改时间';
|
||||
comment on column user_performance_benefit.status is '状态';
|
||||
comment on column user_performance_benefit.is_deleted is '是否已删除';
|
||||
|
||||
alter table user_performance_benefit
|
||||
owner to postgres;
|
||||
|
||||
create table user_performance_benefit_log
|
||||
(
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 4) default 0,
|
||||
source_id int8,
|
||||
source_detail text,
|
||||
order_id int8,
|
||||
type int default 1,
|
||||
statistical_date timestamp(6),
|
||||
channel varchar(64),
|
||||
channel_detail text,
|
||||
remark text,
|
||||
create_user int8,
|
||||
create_dept int8,
|
||||
create_time timestamp(6),
|
||||
update_user int8,
|
||||
update_time timestamp(6),
|
||||
status integer default 1,
|
||||
is_deleted integer default 0
|
||||
);
|
||||
|
||||
create index upbl_index
|
||||
on user_performance_benefit_log (is_deleted, user_id, statistical_date , type);
|
||||
|
||||
comment on table user_performance_benefit_log is '用户福利值业绩日志表';
|
||||
comment on column user_performance_benefit_log.id is '主键';
|
||||
comment on column user_performance_benefit_log.user_id is '用户ID';
|
||||
comment on column user_performance_benefit_log.user_phone is '用户手机号';
|
||||
comment on column user_performance_benefit_log.user_name is '用户名称';
|
||||
comment on column user_performance_benefit_log.amount is '业绩变动金额';
|
||||
comment on column user_performance_benefit_log.source_id is '来源ID';
|
||||
comment on column user_performance_benefit_log.source_detail is '来源详情';
|
||||
comment on column user_performance_benefit_log.order_id is '订单ID';
|
||||
comment on column user_performance_benefit_log.type is '类型 1增加 2减少';
|
||||
comment on column user_performance_benefit_log.statistical_date is '统计日期';
|
||||
comment on column user_performance_benefit_log.channel is '渠道';
|
||||
comment on column user_performance_benefit_log.channel_detail is '渠道详情';
|
||||
comment on column user_performance_benefit_log.remark is '备注';
|
||||
comment on column user_performance_benefit_log.create_user is '创建人';
|
||||
comment on column user_performance_benefit_log.create_dept is '创建部门';
|
||||
comment on column user_performance_benefit_log.create_time is '创建时间';
|
||||
comment on column user_performance_benefit_log.update_user is '修改人';
|
||||
comment on column user_performance_benefit_log.update_time is '修改时间';
|
||||
comment on column user_performance_benefit_log.status is '状态';
|
||||
comment on column user_performance_benefit_log.is_deleted is '是否已删除';
|
||||
|
||||
alter table user_performance_benefit_log
|
||||
owner to postgres;
|
||||
@@ -1,424 +0,0 @@
|
||||
create table user_benefit
|
||||
(
|
||||
id int8 not null primary key,
|
||||
amount decimal(14, 2) default 0,
|
||||
version int default 1,
|
||||
create_user int8,
|
||||
create_dept int8,
|
||||
create_time timestamp(6),
|
||||
update_user int8,
|
||||
update_time timestamp(6),
|
||||
status integer default 1,
|
||||
is_deleted integer default 0
|
||||
);
|
||||
|
||||
|
||||
comment on table user_benefit is '用户福利值表';
|
||||
comment on column user_benefit.id is '主键';
|
||||
comment on column user_benefit.amount is '金额';
|
||||
comment on column user_benefit.version is '版本号';
|
||||
comment on column user_benefit.create_user is '创建人';
|
||||
comment on column user_benefit.create_dept is '创建部门';
|
||||
comment on column user_benefit.create_time is '创建时间';
|
||||
comment on column user_benefit.update_user is '修改人';
|
||||
comment on column user_benefit.update_time is '修改时间';
|
||||
comment on column user_benefit.status is '状态';
|
||||
comment on column user_benefit.is_deleted is '是否已删除';
|
||||
|
||||
alter table user_benefit
|
||||
owner to postgres;
|
||||
|
||||
create table user_benefit_log
|
||||
(
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 2) default 0,
|
||||
source_id int8,
|
||||
user_pack_id int8,
|
||||
source_detail text,
|
||||
order_id int8,
|
||||
type int default 1,
|
||||
statistical_date timestamp(6),
|
||||
channel varchar(64),
|
||||
channel_detail text,
|
||||
remark text,
|
||||
create_user int8,
|
||||
create_dept int8,
|
||||
create_time timestamp(6),
|
||||
update_user int8,
|
||||
update_time timestamp(6),
|
||||
status integer default 1,
|
||||
is_deleted integer default 0
|
||||
|
||||
);
|
||||
create index ub_log_date_index
|
||||
on user_benefit_log (is_deleted, user_id , statistical_date , type);
|
||||
|
||||
comment on table user_benefit_log is '用户福利值流水表';
|
||||
comment on column user_benefit_log.id is '主键';
|
||||
comment on column user_benefit_log.user_id is '用户id';
|
||||
comment on column user_benefit_log.user_phone is '用户手机号';
|
||||
comment on column user_benefit_log.user_name is '用户名称';
|
||||
comment on column user_benefit_log.amount is '金额';
|
||||
comment on column user_benefit_log.source_id is '来源id';
|
||||
comment on column user_benefit_log.user_pack_id is '用户积分包id';
|
||||
comment on column user_benefit_log.source_detail is '来源详情';
|
||||
comment on column user_benefit_log.order_id is '订单id';
|
||||
comment on column user_benefit_log.type is '消费类型 1-收入 2-支出';
|
||||
comment on column user_benefit_log.statistical_date is '统计时间';
|
||||
comment on column user_benefit_log.channel is '消费渠道';
|
||||
comment on column user_benefit_log.channel_detail is '消费渠道详情';
|
||||
comment on column user_benefit_log.remark is '备注';
|
||||
comment on column user_benefit_log.create_user is '创建人';
|
||||
comment on column user_benefit_log.create_dept is '创建部门';
|
||||
comment on column user_benefit_log.create_time is '创建时间';
|
||||
comment on column user_benefit_log.update_user is '修改人';
|
||||
comment on column user_benefit_log.update_time is '修改时间';
|
||||
comment on column user_benefit_log.status is '状态';
|
||||
comment on column user_benefit_log.is_deleted is '是否已删除';
|
||||
alter table user_benefit_log
|
||||
owner to postgres;
|
||||
|
||||
|
||||
|
||||
create table user_commission
|
||||
(
|
||||
id int8 not null primary key,
|
||||
amount decimal(14, 2) default 0,
|
||||
version int default 1,
|
||||
create_user int8,
|
||||
create_dept int8,
|
||||
create_time timestamp(6),
|
||||
update_user int8,
|
||||
update_time timestamp(6),
|
||||
status integer default 1,
|
||||
is_deleted integer default 0
|
||||
);
|
||||
|
||||
|
||||
comment on table user_commission is '用户佣金表';
|
||||
comment on column user_commission.id is '主键';
|
||||
comment on column user_commission.amount is '佣金金额';
|
||||
comment on column user_commission.version is '版本号';
|
||||
comment on column user_commission.create_user is '创建人';
|
||||
comment on column user_commission.create_dept is '创建部门';
|
||||
comment on column user_commission.create_time is '创建时间';
|
||||
comment on column user_commission.update_user is '修改人';
|
||||
comment on column user_commission.update_time is '修改时间';
|
||||
comment on column user_commission.status is '状态';
|
||||
comment on column user_commission.is_deleted is '是否已删除';
|
||||
|
||||
alter table user_commission
|
||||
owner to postgres;
|
||||
|
||||
|
||||
create table user_commission_log
|
||||
(
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 2) default 0,
|
||||
source_id int8,
|
||||
source_detail text,
|
||||
order_id int8,
|
||||
type int default 1,
|
||||
statistical_date timestamp(6),
|
||||
channel varchar(64),
|
||||
channel_detail text,
|
||||
remark text,
|
||||
create_user int8,
|
||||
create_dept int8,
|
||||
create_time timestamp(6),
|
||||
update_user int8,
|
||||
update_time timestamp(6),
|
||||
status integer default 1,
|
||||
is_deleted integer default 0
|
||||
);
|
||||
|
||||
create index user_commission_log_index
|
||||
on user_commission_log (is_deleted, user_id, statistical_date, type);
|
||||
|
||||
comment on table user_commission_log is '用户佣金流水表';
|
||||
comment on column user_commission_log.id is '主键';
|
||||
comment on column user_commission_log.user_id is '用户id';
|
||||
comment on column user_commission_log.user_phone is '用户手机号';
|
||||
comment on column user_commission_log.user_name is '用户名称';
|
||||
comment on column user_commission_log.amount is '金额';
|
||||
comment on column user_commission_log.source_id is '来源id';
|
||||
comment on column user_commission_log.source_detail is '来源详情';
|
||||
comment on column user_commission_log.order_id is '订单id';
|
||||
comment on column user_commission_log.type is '消费类型 1-收入 2-支出';
|
||||
comment on column user_commission_log.statistical_date is '统计时间';
|
||||
comment on column user_commission_log.channel is '消费渠道';
|
||||
comment on column user_commission_log.channel_detail is '消费渠道详情';
|
||||
comment on column user_commission_log.remark is '备注';
|
||||
comment on column user_commission_log.create_user is '创建人';
|
||||
comment on column user_commission_log.create_dept is '创建部门';
|
||||
comment on column user_commission_log.create_time is '创建时间';
|
||||
comment on column user_commission_log.update_user is '修改人';
|
||||
comment on column user_commission_log.update_time is '修改时间';
|
||||
comment on column user_commission_log.status is '状态';
|
||||
comment on column user_commission_log.is_deleted is '是否已删除';
|
||||
|
||||
alter table user_commission_log
|
||||
owner to postgres;
|
||||
|
||||
|
||||
create table user_cash
|
||||
(
|
||||
id int8 not null primary key,
|
||||
amount decimal(14, 2) default 0,
|
||||
version int default 1,
|
||||
create_user int8,
|
||||
create_dept int8,
|
||||
create_time timestamp(6),
|
||||
update_user int8,
|
||||
update_time timestamp(6),
|
||||
status integer default 1,
|
||||
is_deleted integer default 0
|
||||
);
|
||||
|
||||
|
||||
comment on table user_cash is '用户现金券表';
|
||||
comment on column user_cash.id is '主键';
|
||||
comment on column user_cash.amount is '面额';
|
||||
comment on column user_cash.version is '版本号';
|
||||
comment on column user_cash.create_user is '创建人';
|
||||
comment on column user_cash.create_dept is '创建部门';
|
||||
comment on column user_cash.create_time is '创建时间';
|
||||
comment on column user_cash.update_user is '修改人';
|
||||
comment on column user_cash.update_time is '修改时间';
|
||||
comment on column user_cash.status is '状态';
|
||||
comment on column user_cash.is_deleted is '是否已删除';
|
||||
|
||||
alter table user_cash
|
||||
owner to postgres;
|
||||
|
||||
|
||||
create table user_cash_log
|
||||
(
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 2) default 0,
|
||||
source_id int8,
|
||||
source_detail text,
|
||||
order_id int8,
|
||||
type int default 1,
|
||||
statistical_date timestamp(6),
|
||||
channel varchar(64),
|
||||
channel_detail text,
|
||||
remark text,
|
||||
create_user int8,
|
||||
create_dept int8,
|
||||
create_time timestamp(6),
|
||||
update_user int8,
|
||||
update_time timestamp(6),
|
||||
status integer default 1,
|
||||
is_deleted integer default 0
|
||||
);
|
||||
|
||||
create index user_cash_log_index
|
||||
on user_cash_log (is_deleted, user_id, statistical_date , type);
|
||||
|
||||
comment on table user_cash_log is '用户现金券流水表';
|
||||
comment on column user_cash_log.id is '主键';
|
||||
comment on column user_cash_log.user_id is '用户id';
|
||||
comment on column user_cash_log.user_phone is '用户手机号';
|
||||
comment on column user_cash_log.user_name is '用户名称';
|
||||
comment on column user_cash_log.amount is '金额';
|
||||
comment on column user_cash_log.source_id is '来源id';
|
||||
comment on column user_cash_log.source_detail is '来源详情';
|
||||
comment on column user_cash_log.order_id is '订单id';
|
||||
comment on column user_cash_log.type is '消费类型 1-收入 2-支出';
|
||||
comment on column user_cash_log.statistical_date is '统计时间';
|
||||
comment on column user_cash_log.channel is '消费渠道';
|
||||
comment on column user_cash_log.channel_detail is '消费渠道详情';
|
||||
comment on column user_cash_log.remark is '备注';
|
||||
comment on column user_cash_log.create_user is '创建人';
|
||||
comment on column user_cash_log.create_dept is '创建部门';
|
||||
comment on column user_cash_log.create_time is '创建时间';
|
||||
comment on column user_cash_log.update_user is '修改人';
|
||||
comment on column user_cash_log.update_time is '修改时间';
|
||||
comment on column user_cash_log.status is '状态';
|
||||
comment on column user_cash_log.is_deleted is '是否已删除';
|
||||
|
||||
alter table user_cash_log
|
||||
owner to postgres;
|
||||
|
||||
|
||||
create table user_mall_integral
|
||||
(
|
||||
id int8 not null primary key,
|
||||
amount decimal(14, 2) default 0,
|
||||
version int default 1,
|
||||
create_user int8,
|
||||
create_dept int8,
|
||||
create_time timestamp(6),
|
||||
update_user int8,
|
||||
update_time timestamp(6),
|
||||
status integer default 1,
|
||||
is_deleted integer default 0
|
||||
);
|
||||
|
||||
|
||||
comment on table user_mall_integral is '用户商城积分表';
|
||||
comment on column user_mall_integral.amount is '面额';
|
||||
comment on column user_mall_integral.version is '版本号';
|
||||
comment on column user_mall_integral.create_user is '创建人';
|
||||
comment on column user_mall_integral.create_dept is '创建部门';
|
||||
comment on column user_mall_integral.create_time is '创建时间';
|
||||
comment on column user_mall_integral.update_user is '修改人';
|
||||
comment on column user_mall_integral.update_time is '修改时间';
|
||||
comment on column user_mall_integral.is_deleted is '是否已删除';
|
||||
|
||||
alter table user_mall_integral
|
||||
owner to postgres;
|
||||
|
||||
|
||||
create table user_mall_integral_log
|
||||
(
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 2) default 0,
|
||||
source_id int8,
|
||||
source_detail text,
|
||||
order_id int8,
|
||||
type int default 1,
|
||||
statistical_date timestamp(6),
|
||||
channel varchar(64),
|
||||
channel_detail text,
|
||||
remark text,
|
||||
create_user int8,
|
||||
create_dept int8,
|
||||
create_time timestamp(6),
|
||||
update_user int8,
|
||||
update_time timestamp(6),
|
||||
status integer default 1,
|
||||
is_deleted integer default 0
|
||||
);
|
||||
|
||||
create index user_mall_integral_log_index
|
||||
on user_mall_integral_log (is_deleted, user_id, statistical_date , type);
|
||||
|
||||
comment on table user_mall_integral_log is '用户商城积分流水表';
|
||||
comment on column user_mall_integral_log.id is '主键';
|
||||
comment on column user_mall_integral_log.user_id is '用户id';
|
||||
comment on column user_mall_integral_log.user_phone is '用户手机号';
|
||||
comment on column user_mall_integral_log.user_name is '用户名称';
|
||||
comment on column user_mall_integral_log.amount is '金额';
|
||||
comment on column user_mall_integral_log.source_id is '来源id';
|
||||
comment on column user_mall_integral_log.source_detail is '来源详情';
|
||||
comment on column user_mall_integral_log.order_id is '订单id';
|
||||
comment on column user_mall_integral_log.type is '消费类型 1-收入 2-支出';
|
||||
comment on column user_mall_integral_log.statistical_date is '统计时间';
|
||||
comment on column user_mall_integral_log.channel is '消费渠道';
|
||||
comment on column user_mall_integral_log.channel_detail is '消费渠道详情';
|
||||
comment on column user_mall_integral_log.remark is '备注';
|
||||
comment on column user_mall_integral_log.create_user is '创建人';
|
||||
comment on column user_mall_integral_log.create_dept is '创建部门';
|
||||
comment on column user_mall_integral_log.create_time is '创建时间';
|
||||
comment on column user_mall_integral_log.update_user is '修改人';
|
||||
comment on column user_mall_integral_log.update_time is '修改时间';
|
||||
comment on column user_mall_integral_log.status is '状态';
|
||||
comment on column user_mall_integral_log.is_deleted is '是否已删除';
|
||||
|
||||
alter table user_mall_integral_log
|
||||
owner to postgres;
|
||||
|
||||
|
||||
|
||||
create table user_gains_day
|
||||
(
|
||||
id int8 not null primary key,
|
||||
statistical_date timestamp(6),
|
||||
user_id int8,
|
||||
amount decimal(14, 2) default 0,
|
||||
gains_details text,
|
||||
is_credited integer default 0,
|
||||
version int default 1,
|
||||
create_user int8,
|
||||
create_dept int8,
|
||||
create_time timestamp(6),
|
||||
update_user int8,
|
||||
update_time timestamp(6),
|
||||
status integer default 1,
|
||||
is_deleted integer default 0
|
||||
);
|
||||
|
||||
create index ugd_date_index
|
||||
on user_gains_day (is_deleted, statistical_date , is_credited);
|
||||
|
||||
comment on table user_gains_day is '用户每日加速福利值汇总表';
|
||||
comment on column user_gains_day.id is '主键';
|
||||
comment on column user_gains_day.statistical_date is '统计时间';
|
||||
comment on column user_gains_day.user_id is '用户id';
|
||||
comment on column user_gains_day.amount is '金额';
|
||||
comment on column user_gains_day.gains_details is '福利值汇总详情';
|
||||
comment on column user_gains_day.is_credited is '是否已入账 0-未入账 1-已入账';
|
||||
comment on column user_gains_day.version is '版本号';
|
||||
comment on column user_gains_day.create_user is '创建人';
|
||||
comment on column user_gains_day.create_dept is '创建部门';
|
||||
comment on column user_gains_day.create_time is '创建时间';
|
||||
comment on column user_gains_day.update_user is '修改人';
|
||||
comment on column user_gains_day.update_time is '修改时间';
|
||||
comment on column user_gains_day.status is '状态';
|
||||
comment on column user_gains_day.is_deleted is '是否已删除';
|
||||
|
||||
alter table user_gains_day
|
||||
owner to postgres;
|
||||
|
||||
create table user_gains_day_log
|
||||
(
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 2) default 0,
|
||||
source_id int8,
|
||||
source_detail text,
|
||||
gains_details text,
|
||||
order_id int8,
|
||||
statistical_date timestamp(6),
|
||||
is_summary integer default 0,
|
||||
remark text,
|
||||
create_user int8,
|
||||
create_dept int8,
|
||||
create_time timestamp(6),
|
||||
update_user int8,
|
||||
update_time timestamp(6),
|
||||
status integer default 1,
|
||||
is_deleted integer default 0
|
||||
|
||||
);
|
||||
create index ugd_log_date_index
|
||||
on user_gains_day_log (is_deleted, statistical_date , is_summary );
|
||||
|
||||
comment on table user_gains_day_log is '用户每日加速福利值流水表';
|
||||
comment on column user_gains_day_log.id is '主键';
|
||||
comment on column user_gains_day_log.user_id is '用户id';
|
||||
comment on column user_gains_day_log.user_phone is '用户手机号';
|
||||
comment on column user_gains_day_log.user_name is '用户名称';
|
||||
comment on column user_gains_day_log.amount is '金额';
|
||||
comment on column user_gains_day_log.source_id is '来源id';
|
||||
comment on column user_gains_day_log.source_detail is '来源详情';
|
||||
comment on column user_gains_day_log.gains_details is '加速福利详情';
|
||||
comment on column user_gains_day_log.order_id is '订单id';
|
||||
comment on column user_gains_day_log.statistical_date is '统计时间';
|
||||
comment on column user_gains_day_log.is_summary is '是否汇总 0-否 1-是';
|
||||
comment on column user_gains_day_log.remark is '备注';
|
||||
comment on column user_gains_day_log.create_user is '创建人';
|
||||
comment on column user_gains_day_log.create_dept is '创建部门';
|
||||
comment on column user_gains_day_log.create_time is '创建时间';
|
||||
comment on column user_gains_day_log.update_user is '修改人';
|
||||
comment on column user_gains_day_log.update_time is '修改时间';
|
||||
comment on column user_gains_day_log.status is '状态';
|
||||
comment on column user_gains_day_log.is_deleted is '是否已删除';
|
||||
alter table user_gains_day_log
|
||||
owner to postgres;
|
||||
@@ -1,322 +0,0 @@
|
||||
CREATE TABLE vendor_daily_activity
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
settle_date DATE NOT NULL,
|
||||
region_id int8 NOT NULL,
|
||||
region_level INTEGER DEFAULT 0 NOT NULL,
|
||||
total_amount INTEGER DEFAULT 0 NOT NULL,
|
||||
activity_amount INTEGER DEFAULT 0 NOT NULL,
|
||||
activity_value_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
increase_activity_value_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE vendor_daily_activity IS '服务商用户收益';
|
||||
COMMENT ON COLUMN vendor_daily_activity.id IS '主键';
|
||||
COMMENT ON COLUMN vendor_daily_activity.settle_date IS '结算日期';
|
||||
COMMENT ON COLUMN vendor_daily_activity.region_id IS '地域id';
|
||||
COMMENT ON COLUMN vendor_daily_activity.region_level IS '地域等级 1-省 2-市 3-区';
|
||||
COMMENT ON COLUMN vendor_daily_activity.total_amount IS '用户总量';
|
||||
COMMENT ON COLUMN vendor_daily_activity.activity_amount IS '活跃数量';
|
||||
COMMENT ON COLUMN vendor_daily_activity.activity_value_amount IS '活跃值总数';
|
||||
COMMENT ON COLUMN vendor_daily_activity.increase_activity_value_amount IS '活跃值增量';
|
||||
COMMENT ON COLUMN vendor_daily_activity.create_user IS '创建人';
|
||||
COMMENT ON COLUMN vendor_daily_activity.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN vendor_daily_activity.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN vendor_daily_activity.update_user IS '修改人';
|
||||
COMMENT ON COLUMN vendor_daily_activity.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN vendor_daily_activity.status IS '状态';
|
||||
COMMENT ON COLUMN vendor_daily_activity.is_deleted IS '是否已删除';
|
||||
|
||||
|
||||
CREATE TABLE vendor_daily_profit
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
settle_date DATE NOT NULL,
|
||||
region_id int8 NOT NULL,
|
||||
region_level INTEGER DEFAULT 0 NOT NULL,
|
||||
profit_type INTEGER DEFAULT 0 NOT NULL,
|
||||
order_type INTEGER NOT NULL,
|
||||
total_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
profit_amount DECIMAL(10, 1) DEFAULT 0.0 NOT NULL,
|
||||
quantity INTEGER DEFAULT 0 NOT NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE vendor_daily_profit IS '服务商营收收益';
|
||||
COMMENT ON COLUMN vendor_daily_profit.id IS '主键';
|
||||
COMMENT ON COLUMN vendor_daily_profit.settle_date IS '结算日期';
|
||||
COMMENT ON COLUMN vendor_daily_profit.region_id IS '地域id';
|
||||
COMMENT ON COLUMN vendor_daily_profit.region_level IS '地域等级 1-省 2-市 3-区';
|
||||
COMMENT ON COLUMN vendor_daily_profit.profit_type IS '收益类型: 1.线上商城 2.线下点餐';
|
||||
COMMENT ON COLUMN vendor_daily_profit.order_type IS '订单类型 1-商城订单 8-活动订单 9-店铺订单 10-旅行订单 11-门票订单 12-酒店订单';
|
||||
COMMENT ON COLUMN vendor_daily_profit.total_amount IS '总金额';
|
||||
COMMENT ON COLUMN vendor_daily_profit.profit_amount IS '总利润';
|
||||
COMMENT ON COLUMN vendor_daily_profit.quantity IS '总单数';
|
||||
COMMENT ON COLUMN vendor_daily_profit.create_user IS '创建人';
|
||||
COMMENT ON COLUMN vendor_daily_profit.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN vendor_daily_profit.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN vendor_daily_profit.update_user IS '修改人';
|
||||
COMMENT ON COLUMN vendor_daily_profit.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN vendor_daily_profit.status IS '状态';
|
||||
COMMENT ON COLUMN vendor_daily_profit.is_deleted IS '是否已删除';
|
||||
|
||||
|
||||
|
||||
CREATE TABLE vendor_info
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
region_id int8 NOT NULL,
|
||||
user_id int8 NOT NULL,
|
||||
company_name VARCHAR(200) DEFAULT '' NOT NULL,
|
||||
legal_person_name VARCHAR(200) DEFAULT '' NOT NULL,
|
||||
id_card VARCHAR(50) DEFAULT '' NOT NULL,
|
||||
contact_no VARCHAR(50) DEFAULT '' NOT NULL,
|
||||
id_card_front VARCHAR(200) DEFAULT '' NOT NULL,
|
||||
id_card_back VARCHAR(200) DEFAULT '' NOT NULL,
|
||||
id_card_handheld VARCHAR(200) DEFAULT '' NOT NULL,
|
||||
business_license VARCHAR(200) DEFAULT '' NOT NULL,
|
||||
audit_status INTEGER DEFAULT 1 NOT NULL,
|
||||
auditor int8 NULL,
|
||||
reject_reason VARCHAR(200) DEFAULT '' NOT NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL,
|
||||
apply_time TIMESTAMP(6) NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE vendor_info IS '服务商';
|
||||
COMMENT ON COLUMN vendor_info.id IS '主键';
|
||||
COMMENT ON COLUMN vendor_info.region_id IS '区域id';
|
||||
COMMENT ON COLUMN vendor_info.user_id IS '用户id';
|
||||
COMMENT ON COLUMN vendor_info.company_name IS '企业名称';
|
||||
COMMENT ON COLUMN vendor_info.legal_person_name IS '法人';
|
||||
COMMENT ON COLUMN vendor_info.id_card IS '身份证';
|
||||
COMMENT ON COLUMN vendor_info.contact_no IS '联系电话';
|
||||
COMMENT ON COLUMN vendor_info.id_card_front IS '身份证正面';
|
||||
COMMENT ON COLUMN vendor_info.id_card_back IS '身份证反面';
|
||||
COMMENT ON COLUMN vendor_info.id_card_handheld IS '手持身份证照片';
|
||||
COMMENT ON COLUMN vendor_info.business_license IS '营业执照';
|
||||
COMMENT ON COLUMN vendor_info.audit_status IS '审核状态 1-待审核 2-审核通过 3-审核失败';
|
||||
COMMENT ON COLUMN vendor_info.auditor IS '审核人';
|
||||
COMMENT ON COLUMN vendor_info.reject_reason IS '拒绝原因';
|
||||
COMMENT ON COLUMN vendor_info.create_user IS '创建人';
|
||||
COMMENT ON COLUMN vendor_info.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN vendor_info.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN vendor_info.update_user IS '修改人';
|
||||
COMMENT ON COLUMN vendor_info.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN vendor_info.status IS '状态';
|
||||
COMMENT ON COLUMN vendor_info.is_deleted IS '是否已删除';
|
||||
COMMENT ON COLUMN vendor_info.apply_time IS '申请时间';
|
||||
|
||||
|
||||
|
||||
CREATE TABLE vendor_payout_apply
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 DEFAULT 0 NOT NULL,
|
||||
apply_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
company_fully_name VARCHAR(255) NULL,
|
||||
bank_account VARCHAR(255) NULL,
|
||||
branch_info VARCHAR(255) NULL,
|
||||
transfer_description VARCHAR(255) NULL,
|
||||
invoice_url TEXT NULL,
|
||||
invoice_number VARCHAR(255) NULL,
|
||||
transfer_voucher TEXT NULL,
|
||||
apply_status INTEGER DEFAULT 1 NOT NULL,
|
||||
remark VARCHAR(255) NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE vendor_payout_apply IS '服务商提现申请';
|
||||
COMMENT ON COLUMN vendor_payout_apply.id IS '主键';
|
||||
COMMENT ON COLUMN vendor_payout_apply.user_id IS '用户主键';
|
||||
COMMENT ON COLUMN vendor_payout_apply.apply_amount IS '申请提现金额';
|
||||
COMMENT ON COLUMN vendor_payout_apply.company_fully_name IS '公司全称';
|
||||
COMMENT ON COLUMN vendor_payout_apply.bank_account IS '银行账号';
|
||||
COMMENT ON COLUMN vendor_payout_apply.branch_info IS '开户行信息';
|
||||
COMMENT ON COLUMN vendor_payout_apply.transfer_description IS '转账内容描述';
|
||||
COMMENT ON COLUMN vendor_payout_apply.invoice_url IS '发票截图地址';
|
||||
COMMENT ON COLUMN vendor_payout_apply.invoice_number IS '发票号';
|
||||
COMMENT ON COLUMN vendor_payout_apply.transfer_voucher IS '转账凭证';
|
||||
COMMENT ON COLUMN vendor_payout_apply.apply_status IS '申请提现状态 1:待审核 2:审核通过 3:审核不通过';
|
||||
COMMENT ON COLUMN vendor_payout_apply.remark IS '备注';
|
||||
COMMENT ON COLUMN vendor_payout_apply.create_user IS '创建人';
|
||||
COMMENT ON COLUMN vendor_payout_apply.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN vendor_payout_apply.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN vendor_payout_apply.update_user IS '修改人';
|
||||
COMMENT ON COLUMN vendor_payout_apply.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN vendor_payout_apply.status IS '状态';
|
||||
COMMENT ON COLUMN vendor_payout_apply.is_deleted IS '是否已删除';
|
||||
|
||||
|
||||
|
||||
CREATE TABLE vendor_profit_detail
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
order_id int8 DEFAULT 0 NOT NULL,
|
||||
user_id int8 DEFAULT 0 NOT NULL,
|
||||
district_id int8 DEFAULT 0 NOT NULL,
|
||||
city_id int8 DEFAULT 0 NOT NULL,
|
||||
province_id int8 DEFAULT 0 NOT NULL,
|
||||
order_type INTEGER DEFAULT 0 NOT NULL,
|
||||
payment_type INTEGER DEFAULT 0 NOT NULL,
|
||||
actual_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
cost_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
profit_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
order_settle_date TIMESTAMP NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE vendor_profit_detail IS '服务商分润详情';
|
||||
COMMENT ON COLUMN vendor_profit_detail.id IS '主键';
|
||||
COMMENT ON COLUMN vendor_profit_detail.order_id IS '订单主键';
|
||||
COMMENT ON COLUMN vendor_profit_detail.user_id IS '用户主键';
|
||||
COMMENT ON COLUMN vendor_profit_detail.district_id IS '区主键';
|
||||
COMMENT ON COLUMN vendor_profit_detail.city_id IS '市主键';
|
||||
COMMENT ON COLUMN vendor_profit_detail.province_id IS '省主键';
|
||||
COMMENT ON COLUMN vendor_profit_detail.order_type IS '订单类型';
|
||||
COMMENT ON COLUMN vendor_profit_detail.payment_type IS '支付类型';
|
||||
COMMENT ON COLUMN vendor_profit_detail.actual_amount IS '实际支付金额';
|
||||
COMMENT ON COLUMN vendor_profit_detail.cost_amount IS '成本金额';
|
||||
COMMENT ON COLUMN vendor_profit_detail.profit_amount IS '利润金额';
|
||||
COMMENT ON COLUMN vendor_profit_detail.order_settle_date IS '订单结算日期';
|
||||
COMMENT ON COLUMN vendor_profit_detail.create_user IS '创建人';
|
||||
COMMENT ON COLUMN vendor_profit_detail.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN vendor_profit_detail.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN vendor_profit_detail.update_user IS '修改人';
|
||||
COMMENT ON COLUMN vendor_profit_detail.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN vendor_profit_detail.status IS '状态';
|
||||
COMMENT ON COLUMN vendor_profit_detail.is_deleted IS '是否已删除';
|
||||
|
||||
|
||||
|
||||
CREATE TABLE vendor_regions
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
name VARCHAR(50) NULL,
|
||||
level INTEGER NULL,
|
||||
pid INTEGER DEFAULT 0 NULL,
|
||||
lon DECIMAL(10, 6) NULL,
|
||||
lat DECIMAL(10, 6) NULL,
|
||||
vendor_id int8 NULL,
|
||||
token_amount DECIMAL(10, 2) DEFAULT 0.00 NULL,
|
||||
points_amount DECIMAL(10, 2) DEFAULT 0.00 NULL,
|
||||
apply_amount DECIMAL(10, 2) DEFAULT 0.00 NULL,
|
||||
apply_status INTEGER DEFAULT 1 NULL,
|
||||
region_code VARCHAR(10) NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE vendor_regions IS '服务商地区';
|
||||
COMMENT ON COLUMN vendor_regions.id IS '主键';
|
||||
COMMENT ON COLUMN vendor_regions.name IS '名称';
|
||||
COMMENT ON COLUMN vendor_regions.level IS '层级';
|
||||
COMMENT ON COLUMN vendor_regions.pid IS '父主键';
|
||||
COMMENT ON COLUMN vendor_regions.lon IS '经度';
|
||||
COMMENT ON COLUMN vendor_regions.lat IS '纬度';
|
||||
COMMENT ON COLUMN vendor_regions.vendor_id IS '服务商id';
|
||||
COMMENT ON COLUMN vendor_regions.token_amount IS '消费金数量';
|
||||
COMMENT ON COLUMN vendor_regions.points_amount IS '抵扣券数量';
|
||||
COMMENT ON COLUMN vendor_regions.apply_amount IS '申请金额';
|
||||
COMMENT ON COLUMN vendor_regions.apply_status IS '1-未申请 2-申请中 3-已申请';
|
||||
COMMENT ON COLUMN vendor_regions.region_code IS '区划编号';
|
||||
|
||||
|
||||
|
||||
CREATE TABLE vendor_virtual_data_activity
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
region_id INTEGER NOT NULL,
|
||||
user_amount INTEGER DEFAULT 0 NOT NULL,
|
||||
active_user_amount INTEGER DEFAULT 0 NOT NULL,
|
||||
order_amount DECIMAL(10, 2) DEFAULT 0.00 NULL,
|
||||
order_quantity INTEGER DEFAULT 0 NOT NULL,
|
||||
activity_value DECIMAL(10, 2) DEFAULT 0.00 NULL,
|
||||
increase_activity_value DECIMAL(10, 2) DEFAULT 0.00 NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE vendor_virtual_data_activity IS '服务商活跃度虚拟增益';
|
||||
COMMENT ON COLUMN vendor_virtual_data_activity.id IS '主键';
|
||||
COMMENT ON COLUMN vendor_virtual_data_activity.region_id IS '地区id';
|
||||
COMMENT ON COLUMN vendor_virtual_data_activity.user_amount IS '用户数量';
|
||||
COMMENT ON COLUMN vendor_virtual_data_activity.active_user_amount IS '活跃用户数量';
|
||||
COMMENT ON COLUMN vendor_virtual_data_activity.order_amount IS '订单总额';
|
||||
COMMENT ON COLUMN vendor_virtual_data_activity.order_quantity IS '订单量';
|
||||
COMMENT ON COLUMN vendor_virtual_data_activity.activity_value IS '活跃值';
|
||||
COMMENT ON COLUMN vendor_virtual_data_activity.increase_activity_value IS '新增活跃值';
|
||||
COMMENT ON COLUMN vendor_virtual_data_activity.create_user IS '创建人';
|
||||
COMMENT ON COLUMN vendor_virtual_data_activity.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN vendor_virtual_data_activity.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN vendor_virtual_data_activity.update_user IS '修改人';
|
||||
COMMENT ON COLUMN vendor_virtual_data_activity.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN vendor_virtual_data_activity.status IS '状态';
|
||||
COMMENT ON COLUMN vendor_virtual_data_activity.is_deleted IS '是否已删除';
|
||||
|
||||
|
||||
|
||||
CREATE TABLE vendor_virtual_data_profit
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
region_id INTEGER NOT NULL,
|
||||
settle_date DATE NOT NULL,
|
||||
online_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
offline_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
activity_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE vendor_virtual_data_profit IS '服务商营收虚拟增益';
|
||||
COMMENT ON COLUMN vendor_virtual_data_profit.id IS '主键';
|
||||
COMMENT ON COLUMN vendor_virtual_data_profit.region_id IS '地区id';
|
||||
COMMENT ON COLUMN vendor_virtual_data_profit.settle_date IS '日期';
|
||||
COMMENT ON COLUMN vendor_virtual_data_profit.online_amount IS '线上收益';
|
||||
COMMENT ON COLUMN vendor_virtual_data_profit.offline_amount IS '线下收益';
|
||||
COMMENT ON COLUMN vendor_virtual_data_profit.activity_amount IS '活跃值收益';
|
||||
COMMENT ON COLUMN vendor_virtual_data_profit.create_user IS '创建人';
|
||||
COMMENT ON COLUMN vendor_virtual_data_profit.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN vendor_virtual_data_profit.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN vendor_virtual_data_profit.update_user IS '修改人';
|
||||
COMMENT ON COLUMN vendor_virtual_data_profit.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN vendor_virtual_data_profit.status IS '状态';
|
||||
COMMENT ON COLUMN vendor_virtual_data_profit.is_deleted IS '是否已删除';
|
||||
@@ -1,79 +0,0 @@
|
||||
CREATE TABLE prize_spu
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
spu_name VARCHAR(255) DEFAULT '' NOT NULL,
|
||||
main_img VARCHAR(255) DEFAULT '' NOT NULL,
|
||||
detail_img text NULL,
|
||||
cost_price DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
original_price DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
spu_qty INTEGER DEFAULT 0 NOT NULL,
|
||||
status INTEGER DEFAULT 0 NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE prize_spu IS '奖池商品';
|
||||
COMMENT ON COLUMN prize_spu.id IS '主键';
|
||||
COMMENT ON COLUMN prize_spu.spu_name IS '商品名称';
|
||||
COMMENT ON COLUMN prize_spu.main_img IS '主图';
|
||||
COMMENT ON COLUMN prize_spu.detail_img IS '详情图(多图,逗号分割)';
|
||||
COMMENT ON COLUMN prize_spu.cost_price IS '成本价';
|
||||
COMMENT ON COLUMN prize_spu.original_price IS '原价';
|
||||
COMMENT ON COLUMN prize_spu.spu_qty IS '库存';
|
||||
COMMENT ON COLUMN prize_spu.status IS '状态(0=下架,1=上架,3=删除)';
|
||||
COMMENT ON COLUMN prize_spu.create_user IS '创建人';
|
||||
COMMENT ON COLUMN prize_spu.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN prize_spu.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN prize_spu.update_user IS '修改人';
|
||||
COMMENT ON COLUMN prize_spu.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN prize_spu.is_deleted IS '是否已删除';
|
||||
|
||||
|
||||
|
||||
CREATE TABLE prize_spu_order
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 DEFAULT 0 NOT NULL,
|
||||
user_name VARCHAR(128) NULL,
|
||||
user_phone int8 NULL,
|
||||
spu_id int8 NULL,
|
||||
spu_name VARCHAR(255) NULL,
|
||||
main_img VARCHAR(255) NULL,
|
||||
detail_img text NULL,
|
||||
quantity INTEGER DEFAULT 0 NOT NULL,
|
||||
order_status INTEGER DEFAULT 0 NOT NULL,
|
||||
version int8 DEFAULT 0 NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
status INTEGER DEFAULT -1 NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
create index prize_spu_order_index on prize_spu_order (user_id);
|
||||
|
||||
COMMENT ON TABLE prize_spu_order IS '奖池商品订单';
|
||||
comment on column prize_spu_order.id is '主键';
|
||||
comment on column prize_spu_order.user_id is '用户ID';
|
||||
comment on column prize_spu_order.user_name is '用户名称';
|
||||
comment on column prize_spu_order.user_phone is '用户手机号';
|
||||
comment on column prize_spu_order.spu_id is '商品ID';
|
||||
comment on column prize_spu_order.spu_name is '商品名称';
|
||||
comment on column prize_spu_order.main_img is '商品主图';
|
||||
comment on column prize_spu_order.detail_img is '商品详情图(多图,逗号分割)';
|
||||
comment on column prize_spu_order.quantity is '商品数量';
|
||||
comment on column prize_spu_order.order_status is '订单状态(0=待发货,1=已发货,2=已完成,3=已取消)';
|
||||
comment on column prize_spu_order.version is '版本号';
|
||||
comment on column prize_spu_order.create_user is '创建人';
|
||||
comment on column prize_spu_order.create_dept is '创建部门';
|
||||
comment on column prize_spu_order.create_time is '创建时间';
|
||||
comment on column prize_spu_order.update_user is '修改人';
|
||||
comment on column prize_spu_order.update_time is '修改时间';
|
||||
comment on column prize_spu_order.status is '状态(-1=无效,0=有效)';
|
||||
comment on column prize_spu_order.is_deleted is '是否已删除';
|
||||
File diff suppressed because one or more lines are too long
@@ -1,4 +0,0 @@
|
||||
INSERT INTO ads ("id", "name", "url", "sort", "type", "ads_time", "is_deleted", "create_time", "create_user", "update_time", "update_user", "create_dept", "status") VALUES (2017839712136810498, '广告1', '11111', 1, 1, 5, 0, '2026-02-01 13:57:31', 1123598821738675201, '2026-02-01 13:57:44.351', 1123598821738675201, 1123598813738675201, 1);
|
||||
INSERT INTO ads ("id", "name", "url", "sort", "type", "ads_time", "is_deleted", "create_time", "create_user", "update_time", "update_user", "create_dept", "status") VALUES (2017839810455490561, '广告2', '22222', 2, 1, 5, 0, '2026-02-01 13:57:55.123', 1123598821738675201, '2026-02-01 13:57:55.123', 1123598821738675201, 1123598813738675201, 1);
|
||||
INSERT INTO ads ("id", "name", "url", "sort", "type", "ads_time", "is_deleted", "create_time", "create_user", "update_time", "update_user", "create_dept", "status") VALUES (2017839854445350914, '广告3', '33333', 3, 1, 5, 0, '2026-02-01 13:58:05.608', 1123598821738675201, '2026-02-01 13:58:05.608', 1123598821738675201, 1123598813738675201, 1);
|
||||
INSERT INTO ads ("id", "name", "url", "sort", "type", "ads_time", "is_deleted", "create_time", "create_user", "update_time", "update_user", "create_dept", "status") VALUES (2017839920576942081, '广告4', '44444', 4, 1, 5, 0, '2026-02-01 13:58:21.378', 1123598821738675201, '2026-02-01 13:58:21.378', 1123598821738675201, 1123598813738675201, 1);
|
||||
@@ -1,2 +0,0 @@
|
||||
INSERT INTO blade_client ("id", "client_id", "client_secret", "resource_ids", "scope", "authorized_grant_types", "web_server_redirect_uri", "authorities", "access_token_validity", "refresh_token_validity", "additional_information", "autoapprove", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2016023363404103681, 'appFormal', 'uP1mG5gT1sC6tG4mT7nU7fL9yP6yW1sY', '', 'all', 'refresh_token,password,sms_code,register', 'http://localhost:8081', '', 86400, 604800, NULL, 'true', 1123598821738675201, 1123598813738675201, '2026-01-27 13:40:00', 1123598821738675201, '2026-01-30 21:11:21.64', 1, 0);
|
||||
INSERT INTO blade_client ("id", "client_id", "client_secret", "resource_ids", "scope", "authorized_grant_types", "web_server_redirect_uri", "authorities", "access_token_validity", "refresh_token_validity", "additional_information", "autoapprove", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017525783019851778, 'appOffline', 'gL8nS4oV2cS8fC2zD9tB3xB9zY8vA3hE9xS2uR7gC2tO0sO8pE4gC4sF6kB7bN7q', '', 'all', 'refresh_token,password,sms_code', 'http://localhost:8081', '', 259200, 604800, NULL, 'true', 1123598821738675201, 1123598813738675201, '2026-01-31 17:10:05', 1123598821738675201, '2026-01-31 17:10:19.598', 1, 0);
|
||||
@@ -1,36 +0,0 @@
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017256532300197889, 0, 'app_order_status', '-1', 'app订单状态', 17, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017256701003493378, 2017256532300197889, 'app_order_status', '3', '待收货', 3, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017256735887519745, 2017256532300197889, 'app_order_status', '4', '已完成', 4, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017256766271057921, 2017256532300197889, 'app_order_status', '5', '已取消', 5, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017256798575587330, 2017256532300197889, 'app_order_status', '6', '售后中', 6, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017256831240826882, 2017256532300197889, 'app_order_status', '7', '已完结', 7, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017277351755730945, 0, 'app_yes_no', '-1', 'app是否状态', 18, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017277404973060097, 2017277351755730945, 'app_yes_no', '0', '否', 0, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017277445628448770, 2017277351755730945, 'app_yes_no', '1', '是', 1, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017279052097212417, 0, 'app_pay_status', '-1', 'app支付状态', 19, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017279219479302146, 2017279052097212417, 'app_pay_status', '1', '待支付', 1, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017279260155662338, 2017279052097212417, 'app_pay_status', '2', '已支付', 2, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017279292049149953, 2017279052097212417, 'app_pay_status', '3', '已关闭', 3, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017256666383708162, 2017256532300197889, 'app_order_status', '2', '已支付', 2, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017256633735245825, 2017256532300197889, 'app_order_status', '1', '待支付', 1, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017279326488580097, 2017279052097212417, 'app_pay_status', '4', '退款中', 4, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017279356754677762, 2017279052097212417, 'app_pay_status', '5', '已退款', 5, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017280506669256705, 0, 'app_order_model', '-1', 'app订单类型', 20, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017280559299383297, 2017280506669256705, 'app_order_model', '1', '商城订单', 1, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017448732011200513, 0, 'app_pay_type', '-1', 'app支付类型', 21, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017448799661129730, 2017448732011200513, 'app_pay_type', '1', '支付宝', 1, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017448849464295426, 2017448732011200513, 'app_pay_type', '2', '微信', 2, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017448927499321345, 2017448732011200513, 'app_pay_type', '3', '线下支付', 3, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017256598469537794, 2017256532300197889, 'app_order_status', '0', '待支付', 0, '', 0, 1, 1);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017478580159041538, 0, 'app_point_spending_type', '-1', 'app积分消费类型', 22, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017478672572141569, 2017478580159041538, 'app_point_spending_type', '1', '收入', 1, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017478708412469249, 2017478580159041538, 'app_point_spending_type', '2', '支出', 2, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017517140190855170, 0, 'app_package_type', '-1', 'app福利包类型', 23, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017517209350733826, 2017517140190855170, 'app_package_type', '1', '积分兑换', 1, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017517264824598530, 2017517140190855170, 'app_package_type', '2', '后台划拨', 2, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2018600540205121537, 0, 'app_banner_type', '-1', 'app轮播图类型', 24, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2018600645536677890, 2018600540205121537, 'app_banner_type', '1', '主banner', 1, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2018600683209916417, 2018600540205121537, 'app_banner_type', '2', '商城banner', 2, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2018607816655708161, 0, 'app_user_notice', '-1', 'app用户通知类型', 25, '', 0, 1, 0);
|
||||
INSERT INTO blade_dict ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2018607875027836929, 2018607816655708161, 'app_user_notice', '0', '系统通知', 0, '', 0, 1, 0);
|
||||
|
||||
@@ -1,245 +0,0 @@
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511999274860547, 2016511999274860546, 'ads_add', '新增', 'add', '/userPackInfo/ads/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511999274860548, 2016511999274860546, 'ads_edit', '修改', 'edit', '/userPackInfo/ads/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511999274860549, 2016511999274860546, 'ads_delete', '删除', 'delete', '/api/blade-ads/ads/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511999274860550, 2016511999274860546, 'ads_view', '查看', 'view', '/userPackInfo/ads/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511986561925122, 2016511986561925121, 'level_info_add', '新增', 'add', '/customer/levelInfo/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016444412729917441, 0, 'customer', '用户信息', 'menu', '/customer', 'iconfont iconicon_subordinate', 9, 1, -1, 1, '', '', 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016445572647911425, 0, 'cashAccount', '资金账户', 'menu', '/cashAccount', 'iconfont icon-biaodanzujian-biaoge', 10, 1, -1, 1, '', '', 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016445919294554113, 0, 'mall', '商城', 'menu', '/mall', 'iconfont iconicon_message', 11, 1, NULL, 1, NULL, '', 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016446167375052801, 0, 'order', '订单管理', 'menu', '/order', 'iconfont iconicon_message', 12, 1, NULL, 1, NULL, '', 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016446332399943682, 0, 'userPackInfo', '积分包管理', 'menu', '/userPackInfo', 'iconfont iconicon_principal', 13, 1, NULL, 1, NULL, '', 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016446547672596482, 0, 'userPoint', '用户积分管理', 'menu', '/userPoint', 'iconfont iconicon_message', 14, 1, NULL, 1, NULL, '', 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511986561925123, 2016511986561925121, 'level_info_edit', '修改', 'edit', '/customer/levelInfo/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511986561925124, 2016511986561925121, 'level_info_delete', '删除', 'delete', '/api/blade-level-info/level_info/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511986561925125, 2016511986561925121, 'level_info_view', '查看', 'view', '/customer/levelInfo/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511987606306819, 2016511987606306818, 'cart_add', '新增', 'add', '/mall/mallCart/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511987606306820, 2016511987606306818, 'cart_edit', '修改', 'edit', '/mall/mallCart/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511987606306821, 2016511987606306818, 'cart_delete', '删除', 'delete', '/api/blade-mall-cart/cart/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511987606306822, 2016511987606306818, 'cart_view', '查看', 'view', '/mall/mallCart/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511989300805634, 2016511989300805633, 'detailOrder_add', '新增', 'add', '/order/mallDetailOrder/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511989300805635, 2016511989300805633, 'detailOrder_edit', '修改', 'edit', '/order/mallDetailOrder/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511989300805636, 2016511989300805633, 'detailOrder_delete', '删除', 'delete', '/api/blade-mall-detailorder/detailOrder/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511989300805637, 2016511989300805633, 'detailOrder_view', '查看', 'view', '/order/mallDetailOrder/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511988126400515, 2016511988126400514, 'spu_add', '新增', 'add', '/mall/mallSpu/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511988126400516, 2016511988126400514, 'spu_edit', '修改', 'edit', '/mall/mallSpu/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511988126400517, 2016511988126400514, 'spu_delete', '删除', 'delete', '/api/blade-mall-spu/spu/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511988126400518, 2016511988126400514, 'spu_view', '查看', 'view', '/mall/mallSpu/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511989883813891, 2016511989883813890, 'summaryOrder_add', '新增', 'add', '/order/mallSummaryOrder/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511989883813892, 2016511989883813890, 'summaryOrder_edit', '修改', 'edit', '/order/mallSummaryOrder/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511989883813893, 2016511989883813890, 'summaryOrder_delete', '删除', 'delete', '/api/blade-mall-summaryorder/summaryOrder/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511989883813894, 2016511989883813890, 'summaryOrder_view', '查看', 'view', '/order/mallSummaryOrder/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511990412296194, 2016511990412296193, 'summaryOrderAfter_add', '新增', 'add', '/order/mallSummaryOrderAfter/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511990412296195, 2016511990412296193, 'summaryOrderAfter_edit', '修改', 'edit', '/order/mallSummaryOrderAfter/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511990412296196, 2016511990412296193, 'summaryOrderAfter_delete', '删除', 'delete', '/api/blade-mall-summaryorderafter/summaryOrderAfter/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511990412296197, 2016511990412296193, 'summaryOrderAfter_view', '查看', 'view', '/order/mallSummaryOrderAfter/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511985072947202, 2016511985072947201, 'info_add', '新增', 'add', '/userPackInfo/appPackageInfo/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511985072947203, 2016511985072947201, 'info_edit', '修改', 'edit', '/userPackInfo/appPackageInfo/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511985072947204, 2016511985072947201, 'info_delete', '删除', 'delete', '/blade-app-package/info/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511985072947205, 2016511985072947201, 'info_view', '查看', 'view', '/userPackInfo/appPackageInfo/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511997844602884, 2016511997844602881, 'info_delete', '删除', 'delete', '/api/blade-app-regions/info/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511988646494210, 2016511988646494209, 'address_add', '新增', 'add', '/mall/userAddress/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511988646494211, 2016511988646494209, 'address_edit', '修改', 'edit', '/mall/userAddress/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511988646494212, 2016511988646494209, 'address_delete', '删除', 'delete', '/api/blade-user-address/address/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511988646494213, 2016511988646494209, 'address_view', '查看', 'view', '/mall/userAddress/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511979087675395, 2016511979087675394, 'benefit_add', '新增', 'add', '/userPoint/userBenefit/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511979087675396, 2016511979087675394, 'benefit_edit', '修改', 'edit', '/userPoint/userBenefit/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511979087675397, 2016511979087675394, 'benefit_delete', '删除', 'delete', '/api/blade-user-benefit/benefit/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511979087675398, 2016511979087675394, 'benefit_view', '查看', 'view', '/userPoint/userBenefit/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511998809292802, 2016511998809292801, 'benefitLog_add', '新增', 'add', '/userPoint/userBenefitLog/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511998809292803, 2016511998809292801, 'benefitLog_edit', '修改', 'edit', '/userPoint/userBenefitLog/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511998809292804, 2016511998809292801, 'benefitLog_delete', '删除', 'delete', '/api/blade-user-benefitlog/benefitLog/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511998809292805, 2016511998809292801, 'benefitLog_view', '查看', 'view', '/userPoint/userBenefitLog/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511985072947201, 2016446332399943682, 'info', '积分包信息', 'menu', '/userPackInfo/appPackageInfo', NULL, 2, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511989883813890, 2016446167375052801, 'summaryOrder', '商城总订单', 'menu', '/order/mallSummaryOrder', NULL, 2, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511989300805633, 2016446167375052801, 'detailOrder', '商城详情订单', 'menu', '/order/mallDetailOrder', NULL, 3, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511988126400514, 2016445919294554113, 'spu', '商城spu', 'menu', '/mall/mallSpu', NULL, 2, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511987606306818, 2016445919294554113, 'cart', '商城购物车', 'menu', '/mall/mallCart', NULL, 4, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511990412296193, 2016446167375052801, 'summaryOrderAfter', '商品售后订单', 'menu', '/order/mallSummaryOrderAfter', NULL, 4, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511979087675394, 2016446547672596482, 'benefit', '用户福利值', 'menu', '/userPoint/userBenefit', NULL, 3, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511988646494209, 2016445919294554113, 'address', '用户地址', 'menu', '/mall/userAddress', NULL, 3, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511979599380483, 2016511979599380482, 'cash_add', '新增', 'add', '/userPoint/userCash/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511979599380484, 2016511979599380482, 'cash_edit', '修改', 'edit', '/userPoint/userCash/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511979599380485, 2016511979599380482, 'cash_delete', '删除', 'delete', '/api/blade-user-cash/cash/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511979599380486, 2016511979599380482, 'cash_view', '查看', 'view', '/userPoint/userCash/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511998356307971, 2016511998356307970, 'cashLog_add', '新增', 'add', '/userPoint/userCashLog/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511998356307972, 2016511998356307970, 'cashLog_edit', '修改', 'edit', '/userPoint/userCashLog/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511998356307973, 2016511998356307970, 'cashLog_delete', '删除', 'delete', '/api/blade-user-cashlog/cashLog/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511998356307974, 2016511998356307970, 'cashLog_view', '查看', 'view', '/userPoint/userCashLog/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511980115279874, 2016511980115279873, 'commission_add', '新增', 'add', '/userPoint/userCommission/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511980115279875, 2016511980115279873, 'commission_edit', '修改', 'edit', '/userPoint/userCommission/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511980115279876, 2016511980115279873, 'commission_delete', '删除', 'delete', '/api/blade-user-commission/commission/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511980115279877, 2016511980115279873, 'commission_view', '查看', 'view', '/userPoint/userCommission/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511991586701314, 2016511991586701313, 'commissionAccount_add', '新增', 'add', '/cashAccount/userCommissionAccount/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511991586701315, 2016511991586701313, 'commissionAccount_edit', '修改', 'edit', '/cashAccount/userCommissionAccount/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511991586701316, 2016511991586701313, 'commissionAccount_delete', '删除', 'delete', '/api/blade-user-commissionaccount/commissionAccount/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511991586701317, 2016511991586701313, 'commissionAccount_view', '查看', 'view', '/cashAccount/userCommissionAccount/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511992102600706, 2016511992102600705, 'commissionAdvertisingLog_add', '新增', 'add', '/cashAccount/userCommissionAdvertisingLog/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511992102600707, 2016511992102600705, 'commissionAdvertisingLog_edit', '修改', 'edit', '/cashAccount/userCommissionAdvertisingLog/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511992102600708, 2016511992102600705, 'commissionAdvertisingLog_delete', '删除', 'delete', '/api/blade-user-commissionadvertisinglog/commissionAdvertisingLog/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511992102600709, 2016511992102600705, 'commissionAdvertisingLog_view', '查看', 'view', '/cashAccount/userCommissionAdvertisingLog/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511994174586883, 2016511994174586882, 'commissionAgencyLog_add', '新增', 'add', '/cashAccount/userCommissionAgencyLog/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511994174586884, 2016511994174586882, 'commissionAgencyLog_edit', '修改', 'edit', '/cashAccount/userCommissionAgencyLog/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511994174586885, 2016511994174586882, 'commissionAgencyLog_delete', '删除', 'delete', '/api/blade-user-commissionagencylog/commissionAgencyLog/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511994174586886, 2016511994174586882, 'commissionAgencyLog_view', '查看', 'view', '/cashAccount/userCommissionAgencyLog/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511994694680578, 2016511994694680577, 'commissionCoCreatorLog_add', '新增', 'add', '/cashAccount/userCommissionCoCreatorLog/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511994694680579, 2016511994694680577, 'commissionCoCreatorLog_edit', '修改', 'edit', '/cashAccount/userCommissionCoCreatorLog/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511994694680580, 2016511994694680577, 'commissionCoCreatorLog_delete', '删除', 'delete', '/api/blade-user-commissioncocreatorlog/commissionCoCreatorLog/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511994694680581, 2016511994694680577, 'commissionCoCreatorLog_view', '查看', 'view', '/cashAccount/userCommissionCoCreatorLog/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511995218968579, 2016511995218968578, 'commissionDirectPushLog_add', '新增', 'add', '/cashAccount/userCommissionDirectPushLog/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511995218968580, 2016511995218968578, 'commissionDirectPushLog_edit', '修改', 'edit', '/cashAccount/userCommissionDirectPushLog/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511995218968581, 2016511995218968578, 'commissionDirectPushLog_delete', '删除', 'delete', '/api/blade-user-commissiondirectpushlog/commissionDirectPushLog/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511995218968582, 2016511995218968578, 'commissionDirectPushLog_view', '查看', 'view', '/cashAccount/userCommissionDirectPushLog/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511995743256578, 2016511995743256577, 'commissionGoodsCostLog_add', '新增', 'add', '/cashAccount/userCommissionGoodsCostLog/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511995743256579, 2016511995743256577, 'commissionGoodsCostLog_edit', '修改', 'edit', '/cashAccount/userCommissionGoodsCostLog/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511995743256580, 2016511995743256577, 'commissionGoodsCostLog_delete', '删除', 'delete', '/api/blade-user-commissiongoodscostlog/commissionGoodsCostLog/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511995743256581, 2016511995743256577, 'commissionGoodsCostLog_view', '查看', 'view', '/cashAccount/userCommissionGoodsCostLog/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511980631179267, 2016511980631179266, 'commissionLog_add', '新增', 'add', '/userPoint/userCommissionLog/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511980631179268, 2016511980631179266, 'commissionLog_edit', '修改', 'edit', '/userPoint/userCommissionLog/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511980631179269, 2016511980631179266, 'commissionLog_delete', '删除', 'delete', '/api/blade-user-commissionlog/commissionLog/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511980631179270, 2016511980631179266, 'commissionLog_view', '查看', 'view', '/userPoint/userCommissionLog/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511996863135746, 2016511996863135745, 'commissionServiceProviderLog_add', '新增', 'add', '/cashAccount/userCommissionServiceProviderLog/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511996863135747, 2016511996863135745, 'commissionServiceProviderLog_edit', '修改', 'edit', '/cashAccount/userCommissionServiceProviderLog/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511996863135748, 2016511996863135745, 'commissionServiceProviderLog_delete', '删除', 'delete', '/api/blade-user-commissionserviceproviderlog/commissionServiceProviderLog/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511996863135749, 2016511996863135745, 'commissionServiceProviderLog_view', '查看', 'view', '/cashAccount/userCommissionServiceProviderLog/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511997387423747, 2016511997387423746, 'commissionUserPointLog_add', '新增', 'add', '/cashAccount/userCommissionUserPointLog/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511997387423748, 2016511997387423746, 'commissionUserPointLog_edit', '修改', 'edit', '/cashAccount/userCommissionUserPointLog/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511997387423749, 2016511997387423746, 'commissionUserPointLog_delete', '删除', 'delete', '/api/blade-user-commissionuserpointlog/commissionUserPointLog/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511997387423750, 2016511997387423746, 'commissionUserPointLog_view', '查看', 'view', '/cashAccount/userCommissionUserPointLog/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511981159661571, 2016511981159661570, 'gainsDay_add', '新增', 'add', '/userPoint/userGainsDay/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511981159661572, 2016511981159661570, 'gainsDay_edit', '修改', 'edit', '/userPoint/userGainsDay/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511981159661573, 2016511981159661570, 'gainsDay_delete', '删除', 'delete', '/api/blade-user-gainsday/gainsDay/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511981159661574, 2016511981159661570, 'gainsDay_view', '查看', 'view', '/userPoint/userGainsDay/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511981612646403, 2016511981612646402, 'gainsDayLog_add', '新增', 'add', '/userPoint/userGainsDayLog/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511981612646404, 2016511981612646402, 'gainsDayLog_edit', '修改', 'edit', '/userPoint/userGainsDayLog/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511981612646405, 2016511981612646402, 'gainsDayLog_delete', '删除', 'delete', '/api/blade-user-gainsdaylog/gainsDayLog/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511981612646406, 2016511981612646402, 'gainsDayLog_view', '查看', 'view', '/userPoint/userGainsDayLog/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511992614305794, 2016511992614305793, 'genealogy_add', '新增', 'add', '/customer/userGenealogy/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511992614305795, 2016511992614305793, 'genealogy_edit', '修改', 'edit', '/customer/userGenealogy/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511992614305796, 2016511992614305793, 'genealogy_delete', '删除', 'delete', '/api/blade-user-genealogy/genealogy/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511992614305797, 2016511992614305793, 'genealogy_view', '查看', 'view', '/customer/userGenealogy/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511993197314050, 2016511993197314049, 'increaseDay_add', '新增', 'add', '/customer/userIncreaseDay/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511993197314051, 2016511993197314049, 'increaseDay_edit', '修改', 'edit', '/customer/userIncreaseDay/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511993197314052, 2016511993197314049, 'increaseDay_delete', '删除', 'delete', '/api/blade-user-increaseday/increaseDay/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511993197314053, 2016511993197314049, 'increaseDay_view', '查看', 'view', '/customer/userIncreaseDay/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511978492084226, 2016511978492084225, 'levelLog_add', '新增', 'add', '/customer/userLevelLog/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511978492084227, 2016511978492084225, 'levelLog_edit', '修改', 'edit', '/customer/userLevelLog/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511978492084228, 2016511978492084225, 'levelLog_delete', '删除', 'delete', '/api/blade-userLevellog/levelLog/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511978492084229, 2016511978492084225, 'levelLog_view', '查看', 'view', '/customer/userLevelLog/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511982136934402, 2016511982136934401, 'mallIntegral_add', '新增', 'add', '/userPoint/userMallIntegral/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511982136934403, 2016511982136934401, 'mallIntegral_edit', '修改', 'edit', '/userPoint/userMallIntegral/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511982136934404, 2016511982136934401, 'mallIntegral_delete', '删除', 'delete', '/api/blade-user-mallintegral/mallIntegral/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511982136934405, 2016511982136934401, 'mallIntegral_view', '查看', 'view', '/userPoint/userMallIntegral/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511982589919235, 2016511982589919234, 'mallIntegralLog_add', '新增', 'add', '/userPoint/userMallIntegralLog/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511982589919236, 2016511982589919234, 'mallIntegralLog_edit', '修改', 'edit', '/userPoint/userMallIntegralLog/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511982589919237, 2016511982589919234, 'mallIntegralLog_delete', '删除', 'delete', '/api/blade-user-mallintegrallog/mallIntegralLog/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511982589919238, 2016511982589919234, 'mallIntegralLog_view', '查看', 'view', '/userPoint/userMallIntegralLog/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511991016275970, 2016446167375052801, 'order', '用户订单', 'menu', '/order/userOrder', NULL, 1, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511991016275971, 2016511991016275970, 'order_add', '新增', 'add', '/order/userOrder/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511991016275972, 2016511991016275970, 'order_edit', '修改', 'edit', '/order/userOrder/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511991016275973, 2016511991016275970, 'order_delete', '删除', 'delete', '/api/blade-user-order/order/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511991016275974, 2016511991016275970, 'order_view', '查看', 'view', '/order/userOrder/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511985525932035, 2016511985525932034, 'packageInfo_add', '新增', 'add', '/userPackInfo/userPackageInfo/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511985525932036, 2016511985525932034, 'packageInfo_edit', '修改', 'edit', '/userPackInfo/userPackageInfo/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511985525932037, 2016511985525932034, 'packageInfo_delete', '删除', 'delete', '/api/blade-user-packageinfo/packageInfo/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511985525932038, 2016511985525932034, 'packageInfo_view', '查看', 'view', '/userPackInfo/userPackageInfo/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511986113134594, 2016511986113134593, 'packageInfoCopy_add', '新增', 'add', '/userPackInfo/userPackageInfoCopy/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511986113134595, 2016511986113134593, 'packageInfoCopy_edit', '修改', 'edit', '/userPackInfo/userPackageInfoCopy/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511986113134596, 2016511986113134593, 'packageInfoCopy_delete', '删除', 'delete', '/api/blade-user-packageinfocopy/packageInfoCopy/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511986113134597, 2016511986113134593, 'packageInfoCopy_view', '查看', 'view', '/userPackInfo/userPackageInfoCopy/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511983047098372, 2016511983047098369, 'performance_delete', '删除', 'delete', '/api/blade-user-performance/performance/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511984091480068, 2016511984091480065, 'performanceBenefit_delete', '删除', 'delete', '/api/blade-user-performancebenefit/performanceBenefit/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511984548659205, 2016511984548659202, 'performanceBenefitLog_delete', '删除', 'delete', '/api/blade-user-performancebenefitlog/performanceBenefitLog/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511983634300933, 2016511983634300930, 'performanceLog_delete', '删除', 'delete', '/api/blade-user-performancelog/performanceLog/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511993717407747, 2016511993717407746, 'tree_add', '新增', 'add', '/customer/userTree/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511993717407748, 2016511993717407746, 'tree_edit', '修改', 'edit', '/customer/userTree/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511993717407750, 2016511993717407746, 'tree_view', '查看', 'view', '/customer/userTree/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511996271738882, 2016511996271738881, 'commissionOperationLog_add', '新增', 'add', '/cashAccount/userCommissionOperationLog/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511996271738883, 2016511996271738881, 'commissionOperationLog_edit', '修改', 'edit', '/cashAccount/userCommissionOperationLog/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511996271738884, 2016511996271738881, 'commissionOperationLog_delete', '删除', 'delete', '/api/blade-user-commissionoperationlog/commissionOperationLog/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511996271738885, 2016511996271738881, 'commissionOperationLog_view', '查看', 'view', '/cashAccount/userCommissionOperationLog/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511997844602885, 2016511997844602881, 'info_view', '查看', 'view', '/customer/appRegionsInfo/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511997844602882, 2016511997844602881, 'info_add', '新增', 'add', '/customer/appRegionsInfo/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511997844602883, 2016511997844602881, 'info_edit', '修改', 'edit', '/customer/appRegionsInfo/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511993717407749, 2016511993717407746, 'tree_delete', '删除', 'delete', '/api/blade-user-tree/tree/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511984091480069, 2016511984091480065, 'performanceBenefit_view', '查看', 'view', '/userPoint/userPerformanceBenefit/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511984091480065, 2016446547672596482, 'performanceBenefit', '用户福利值业绩', 'menu', '/userPoint/userPerformanceBenefit', NULL, 11, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511984091480067, 2016511984091480065, 'performanceBenefit_edit', '修改', 'edit', '/userPoint/userPerformanceBenefit/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511984548659202, 2016446547672596482, 'performanceBenefitLog', '用户福利值业绩日志', 'menu', '/userPoint/userPerformanceLog', NULL, 13, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511983047098371, 2016511983047098369, 'performance_edit', '修改', 'edit', '/userPoint/userPerformance/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511984548659206, 2016511984548659202, 'performanceBenefitLog_view', '查看', 'view', '/userPoint/userPerformanceLog/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511983634300934, 2016511983634300930, 'performanceLog_view', '查看', 'view', '/userPoint/userPerformanceLog/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511984548659203, 2016511984548659202, 'performanceBenefitLog_add', '新增', 'add', '/userPoint/userPerformanceLog/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511983634300931, 2016511983634300930, 'performanceLog_add', '新增', 'add', '/userPoint/userPerformanceLog/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511996271738881, 2016445572647911425, 'commissionOperationLog', '5%运营佣金流水', 'menu', '/cashAccount/userCommissionOperationLog', NULL, 5, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511984548659204, 2016511984548659202, 'performanceBenefitLog_edit', '修改', 'edit', '/userPoint/userPerformanceLog/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511984091480066, 2016511984091480065, 'performanceBenefit_add', '新增', 'add', '/userPoint/userPerformanceBenefit/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511983634300932, 2016511983634300930, 'performanceLog_edit', '修改', 'edit', '/userPoint/userPerformanceLog/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511983047098373, 2016511983047098369, 'performance_view', '查看', 'view', '/userPoint/userPerformance/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511993717407746, 2016444412729917441, 'tree', '用户树结构', 'menu', '/customer/userTree', NULL, 2, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511997844602881, 2016444412729917441, 'info', '地区详情', 'menu', '/customer/appRegionsInfo', NULL, 6, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511986113134593, 2016446332399943682, 'packageInfoCopy', '用户积分包详细信息', 'menu', '/userPackInfo/userPackageInfoCopy', NULL, 4, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511983634300930, 2016446547672596482, 'performanceLog', '用户现金业绩日志', 'menu', '/userPoint/userPerformanceLog', NULL, 10, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511983047098370, 2016511983047098369, 'performance_add', '新增', 'add', '/userPoint/userPerformance/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016894266199486466, 2016445919294554113, 'category', '商品分类', 'menu', '/mall/category', NULL, 1, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016894266199486467, 2016894266199486466, 'category_add', '新增', 'add', '/mall/category/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016894266199486468, 2016894266199486466, 'category_edit', '修改', 'edit', '/mall/category/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016894266199486469, 2016894266199486466, 'category_delete', '删除', 'delete', '/api/blade-category/category/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016894266199486470, 2016894266199486466, 'category_view', '查看', 'view', '/mall/category/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511999274860546, 2016446332399943682, 'ads', '广告', 'menu', '/userPackInfo/ads', NULL, 1, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511982136934401, 2016446547672596482, 'mallIntegral', '用户商城积分', 'menu', '/userPoint/userMallIntegral', NULL, 1, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511991586701313, 2016445572647911425, 'commissionAccount', '用户佣金账户', 'menu', '/cashAccount/userCommissionAccount', NULL, 1, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511992614305793, 2016444412729917441, 'genealogy', '用户族谱', 'menu', '/customer/userGenealogy', NULL, 1, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511996863135745, 2016445572647911425, 'commissionServiceProviderLog', '5%服务商佣金流水', 'menu', '/cashAccount/userCommissionServiceProviderLog', NULL, 7, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511985525932034, 2016446332399943682, 'packageInfo', '用户积分包信息', 'menu', '/userPackInfo/userPackageInfo', NULL, 3, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511982589919234, 2016446547672596482, 'mallIntegralLog', '用户商城积分流水', 'menu', '/userPoint/userMallIntegralLog', NULL, 2, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511998809292801, 2016446547672596482, 'benefitLog', '用户福利值流水', 'menu', '/userPoint/userBenefitLog', NULL, 4, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511998356307970, 2016446547672596482, 'cashLog', '用户现金券流水', 'menu', '/userPoint/userCashLog', NULL, 6, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511979599380482, 2016446547672596482, 'cash', '用户现金券', 'menu', '/userPoint/userCash', NULL, 5, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511980115279873, 2016446547672596482, 'commission', '用户佣金', 'menu', '/userPoint/userCommission', NULL, 7, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511980631179266, 2016446547672596482, 'commissionLog', '用户佣金流水', 'menu', '/userPoint/userCommissionLog', NULL, 8, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511983047098369, 2016446547672596482, 'performance', '用户现金业绩', 'menu', '/userPoint/userPerformance', NULL, 9, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511981159661570, 2016446547672596482, 'gainsDay', '用户每日加速福利值汇总', 'menu', '/userPoint/userGainsDay', NULL, 12, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511981612646402, 2016446547672596482, 'gainsDayLog', '用户每日加速福利值流水', 'menu', '/userPoint/userGainsDayLog', NULL, 14, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511986561925121, 2016444412729917441, 'level_info', '等级信息', 'menu', '/customer/levelInfo', NULL, 4, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511995743256577, 2016445572647911425, 'commissionGoodsCostLog', '25%商品成本佣金流水', 'menu', '/cashAccount/userCommissionGoodsCostLog', NULL, 2, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511995218968578, 2016445572647911425, 'commissionDirectPushLog', '10%直推人佣金流水', 'menu', '/cashAccount/userCommissionDirectPushLog', NULL, 4, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511993197314049, 2016444412729917441, 'increaseDay', '用户附加信息', 'menu', '/customer/userIncreaseDay', NULL, 3, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511997387423746, 2016445572647911425, 'commissionUserPointLog', '30%购买人获取用户积分佣金流水', 'menu', '/cashAccount/userCommissionUserPointLog', NULL, 3, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511987023298561, 2016444412729917441, 'dailySign', '用户看广告记录', 'menu', '/customer/userDailySign', NULL, 5, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511992102600705, 2016445572647911425, 'commissionAdvertisingLog', '5%广告补贴佣金流水', 'menu', '/cashAccount/userCommissionAdvertisingLog', NULL, 6, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511994174586882, 2016445572647911425, 'commissionAgencyLog', '15%极差代理佣金流水', 'menu', '/cashAccount/userCommissionAgencyLog', NULL, 8, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511994694680577, 2016445572647911425, 'commissionCoCreatorLog', '5%联创佣金流水', 'menu', '/cashAccount/userCommissionCoCreatorLog', NULL, 9, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499535723909122, 2016446332399943682, 'givePackLog', '划拨积分记录', 'menu', '/userPackInfo/givePackLog', NULL, 1, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499535723909123, 2017499535723909122, 'givePackLog_add', '新增', 'add', '/userPackInfo/givePackLog/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499535723909124, 2017499535723909122, 'givePackLog_edit', '修改', 'edit', '/userPackInfo/givePackLog/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499535723909125, 2017499535723909122, 'givePackLog_delete', '删除', 'delete', '/api/blade-givepacklog/givePackLog/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499535723909126, 2017499535723909122, 'givePackLog_view', '查看', 'view', '/userPackInfo/givePackLog/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499534536921090, 2017499534536921089, 'prizeSpu_add', '新增', 'add', '/mall/prizeSpu/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499534536921091, 2017499534536921089, 'prizeSpu_edit', '修改', 'edit', '/mall/prizeSpu/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499534536921092, 2017499534536921089, 'prizeSpu_delete', '删除', 'delete', '/api/blade-prizespu/prizeSpu/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499534536921093, 2017499534536921089, 'prizeSpu_view', '查看', 'view', '/mall/prizeSpu/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499535132512258, 2017499535132512257, 'prizeSpuOrder_add', '新增', 'add', '/mall/prizeSpuOrder/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499535132512259, 2017499535132512257, 'prizeSpuOrder_edit', '修改', 'edit', '/mall/prizeSpuOrder/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499535132512260, 2017499535132512257, 'prizeSpuOrder_delete', '删除', 'delete', '/api/blade-prizespuorder/prizeSpuOrder/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499535132512261, 2017499535132512257, 'prizeSpuOrder_view', '查看', 'view', '/mall/prizeSpuOrder/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511987023298562, 2016511987023298561, 'dailySign_add', '新增', 'add', '/customer/userDailySign/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511987023298563, 2016511987023298561, 'dailySign_edit', '修改', 'edit', '/customer/userDailySign/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511987023298564, 2016511987023298561, 'dailySign_delete', '删除', 'delete', '/api/blade-dailysign/dailySign/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511987023298565, 2016511987023298561, 'dailySign_view', '查看', 'view', '/customer/userDailySign/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2018593495594790914, 2018593495594790913, 'banner_add', '新增', 'add', '/mall/banner/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2018593495594790915, 2018593495594790913, 'banner_edit', '修改', 'edit', '/mall/banner/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2018593495594790916, 2018593495594790913, 'banner_delete', '删除', 'delete', '/api/blade-banner/banner/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2018593495594790917, 2018593495594790913, 'banner_view', '查看', 'view', '/mall/banner/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2018593496119078914, 2018593496119078913, 'notice_add', '新增', 'add', '/customer/notice/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2018593495594790913, 2016445919294554113, 'banner', '首页轮播图', 'menu', '/mall/banner', NULL, 7, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2018593496119078913, 2016444412729917441, 'notice', '用户通知', 'menu', '/customer/notice', NULL, 8, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511978492084225, 2016444412729917441, 'levelLog', '用户等级日志', 'menu', '/customer/userLevelLog', NULL, 7, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2018593496119078915, 2018593496119078913, 'notice_edit', '修改', 'edit', '/customer/notice/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2018593496119078916, 2018593496119078913, 'notice_delete', '删除', 'delete', '/api/blade-notice/notice/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2018593496119078917, 2018593496119078913, 'notice_view', '查看', 'view', '/customer/notice/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499535132512257, 2016445919294554113, 'prizeSpuOrder', '奖池商品订单', 'menu', '/mall/prizeSpuOrder', NULL, 6, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO insert_blade_menu ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499534536921089, 2016445919294554113, 'prizeSpu', '奖池商品', 'menu', '/mall/prizeSpu', NULL, 5, 1, 0, 1, NULL, NULL, 0);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
INSERT INTO blade_oss ("id", "tenant_id", "category", "oss_code", "endpoint", "transform_endpoint", "access_key", "secret_key", "bucket_name", "app_id", "region", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017524776370114561, '000000', 3, 'alioss', 'https://oss-cn-beijing.aliyuncs.com', '', 'LTAI5tHgTPu3QbQkP3qPH8EM', 'UG1exiMCt31B6OoeSrw3BrW08izrJl', 'yicha1lu-app', '', '', '', 1123598821738675201, 1123598813738675201, '2026-01-31 17:06:05', 1123598821738675201, '2026-02-03 17:53:47.79', 2, 0);
|
||||
@@ -1,284 +0,0 @@
|
||||
INSERT INTO blade_param ("id", "param_name", "param_key", "param_value", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2016775545220931585, 'app用户注册默认角色信息', 'yichayilu:app:register:role-info', '{"avatar":"https://tse1-mm.cn.bing.net/th/id/OIP-C.BM4bF8_qipHCQu014y_8UgAAAA?w=220&h=217&c=7&r=0&o=7&pid=1.7&rm=3","deptId":"1123598813738675201","postId":"1123598817738675208","roleId":"1123598816738675202"}', 'app用户注册默认角色信息-包含角色、部门、岗位、头像', NULL, NULL, '2026-01-29 15:28:54.508', NULL, '2026-01-29 15:28:54.508', 1, 0);
|
||||
INSERT INTO blade_param ("id", "param_name", "param_key", "param_value", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017183573497827329, '商城app订单类型', 'yichayilu:app:formal:order:model_type', '[{"code":"MALL","id":1,"name":"商城"}]', '商城app订单类型', NULL, NULL, '2026-01-30 18:30:16.033', NULL, '2026-01-30 18:30:16.033', 1, 0);
|
||||
INSERT INTO blade_param ("id", "param_name", "param_key", "param_value", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017184619259478018, '商城app订单现金兑换积分比例', 'yichayilu:app:formal:mall.cash.to.point.Rate', '0.3', '商城app订单现金兑换积分比例', NULL, NULL, '2026-01-30 18:34:25.363', NULL, '2026-01-30 18:34:25.363', 1, 0);
|
||||
INSERT INTO blade_param ("id", "param_name", "param_key", "param_value", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017185330957312002, '商城app随机立减比例范围', 'yichayilu:app:formal:mall.cut.amount.rang', '{"max":0.001,"min":0.01}', '商城app随机立减比例范围', NULL, NULL, '2026-01-30 18:37:15.043', NULL, '2026-01-30 18:37:15.043', 1, 0);
|
||||
INSERT INTO blade_param ("id", "param_name", "param_key", "param_value", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017186990513410049, '商城app支付类型', 'yichayilu:app:formal:pay.type', '{1:[{"code":"ALI","id":1,"name":"支付宝"},{"code":"WEI","id":2,"name":"微信"},{"code":"OFFLINE_PAY","id":3,"name":"线下支付"}]}', '商城app支付类型', NULL, NULL, '2026-01-30 18:43:50.713', NULL, '2026-01-30 18:43:50.713', 1, 0);
|
||||
INSERT INTO blade_param ("id", "param_name", "param_key", "param_value", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017835848230760450, '积分app是否看广告', 'yichayilu:app:dailysign.is.look.ads', 'true', '积分app是否看广告', NULL, NULL, '2026-02-01 13:42:10.446', NULL, '2026-02-01 13:42:10.446', 1, 0);
|
||||
INSERT INTO blade_param ("id", "param_name", "param_key", "param_value", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017836205065338882, '积分app看广告的时间范围', 'yichayilu:app:dailysign:watch.video.time.rang', '{"endTime":"22:00","startTime":"08:00"}', '积分app看广告的时间范围', NULL, NULL, '2026-02-01 13:43:35.522', NULL, '2026-02-01 13:43:35.522', 1, 0);
|
||||
INSERT INTO blade_param ("id", "param_name", "param_key", "param_value", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2018579715242532866, '商城app用户协议', 'yichayilu:app:formal:user:agreement', '商城app用户协议', '商城app用户协议', NULL, NULL, '2026-02-03 14:58:02.165', NULL, '2026-02-03 14:58:02.165', 1, 0);
|
||||
INSERT INTO blade_param ("id", "param_name", "param_key", "param_value", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2016918730731626498, '商城app用户隐私政策', 'yichayilu:app:formal:user:privacy', '<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>成都心随云文化科技有限公司隐私政策</title>
|
||||
<link rel="stylesheet" href="./css/style.css">
|
||||
<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css" />
|
||||
<!-- 引入样式 -->
|
||||
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
||||
<!-- 引入组件库 -->
|
||||
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
|
||||
</head>
|
||||
|
||||
<style>
|
||||
.privacy_policy{
|
||||
margin-top: 50px;
|
||||
}
|
||||
.fly-text-color{
|
||||
color: #ff0000;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<!-- 头部 -->
|
||||
<header>
|
||||
<div id="menu-bar" class="el-icon-s-unfold"></div>
|
||||
<a href="#" class="logo"><span>心</span>随云飘</a>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<section class="privacy_policy" id="privacy_policy">
|
||||
|
||||
<h2 style="text-align: center;">隐私政策(用户协议)</h3>
|
||||
|
||||
<h3 style="text-align: center;">发布日期: 2024 年 11 月 11 日</h3>
|
||||
<h3 style="text-align: center;">生效日期: 2024 年 11 月 11 日</h3>
|
||||
|
||||
<p style=" margin-top: 50px"></p>
|
||||
|
||||
<span >  【心随云飘】APP是由成都心随云文化科技有限公司开发,下文所有“我们”均指该公司。
|
||||
如果您在【心随云飘】软件上或其他【心随云飘】提供的移动应用上进行访问,便视为您接受了以下隐私政策,请您仔细阅读以下内容,尤其是以下加粗字体。如果您不同意以下任何内容,请立刻停止访问/使用本app站或其他任何移动应用或软件。 “用户”以及“您”均指自愿接受本隐私政策的个体。<br></span>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >1、隐私政策的确认和接纳<br></span>
|
||||
<span >  尊重用户个人隐私是【心随云飘】的一项基本政策。【心随云飘】旅行攻略是将各旅行景区含餐饮、娱乐、洒店、出行、养生、教育、游戏信息汇集于【心随云飘】用户查阅,同时用户在浏览查阅同时即可获得平台产物。 您在使用我们的产品与 / 或服务前仔细阅读并确认您已经充分理解本隐私政策所写明的内容,并与成都心随云文化科技有限公司达成协议并接受所有的服务条款。<br></span>
|
||||
<span >  我们十分注重保护用户的个人信息及隐私安全,我们理解您通过【心随云飘】app向我们提供信息是建立在对我们信任的基础上,我们重视这种信任,也深知隐私对您的重要性,并尽最大努力全力保护您的隐私。<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >2 、信息收集<br></span>
|
||||
<span >  ( 1 )为了更好地为您提供服务,【心随云飘】将遵循 “ 合理、相关、必要 ” 原则,且以您同意为前提收集信息,不会收集法律法规禁止收集的信息。考虑到【心随云飘】会员服务的重要性,用户同意,【心随云飘】将会收集您在【心随云飘】软件上输入的或者以其他方式提供给我们的所有信息,例如:<br></span>
|
||||
  ①<span class="fly-text-color">在您注册为【心随云飘】会员时,需提供手机号码并设置密码,用以创建【心随云飘】账号。前述信息属于敏感信息,如果您拒绝提供,可能无法正常使用我们的服务。<br></span>
|
||||
  ②<span class="fly-text-color">在您实名认证时,需提供身份证信息、人脸识别活体认证、银行卡信息或第三方支付机构信息以验证您的身份。前述信息属于敏感信息,如果您拒绝提供,可能无法正常使用我们的部分服务。<br></span>
|
||||
  ③<span class="fly-text-color">在您购买产品时需要使用邮寄(发票、商品)服务时、需提供收货人的姓名、手机号、固定电话、配送地址信息,以便于您的订单能够送达。前述信息属于敏感信息,如果您拒绝提供,可能无法完成送达。<br></span>
|
||||
  ④<span class="fly-text-color">在您购买产品进行支付结算时,需提供支付宝,微信,银行卡信息。前述信息属于敏感信息,如果您拒绝提供,可能无法完成支付。<br></span>
|
||||
  ⑤<span class="fly-text-color">当您联系我们的客服以获得我们的客户服务时,您还需要提供您的会员资料来验证身份。其中可能涉及敏感信息,如果您拒绝提供,可能无法获得我们的客户服务。<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >  ( 2 )我们将在您使用【心随云飘】服务过程中,自动收集您的个人信息:<br></span>
|
||||
<span >  ①日志信息,指您使用我们的服务时,系统可能通过cookies、app beacon或其他方式自动采集的信息,包括:<br></span>
|
||||
<span >  ②设备信息或软件信息,例如您的IP地址和移动设备所用的版本和设备识别码(IDFA/IMEI)、移动设备用于接入我们服务的配置信息。这些是我们为提供服务必须收集的基础信息。<br></span>
|
||||
<span >  ③在使用我们服务时搜索或浏览的信息,例如您使用的app页或app搜索词语、访问页面,以及您在使用我们服务时浏览或提供的其他信息。<br></span>
|
||||
<span >  ④您通过我们的服务分享的内容所包含的信息,例如拍摄或上传的共享照片或评论,以及日期、时间。<br></span>
|
||||
<span >  ⑤位置信息, 指您开启设备定位功能并使用我们基于位置提供的相关服务时,收集的有关您的位置信息,例如通过GPS或WLAN方式收集您的地理位置信息,或您提供账户信息中包含的您所在地区信息,您或其他人上传的显示您当前或曾经所处地理位置的共享信息。该信息属于敏感信息,您可以通过关闭定位功能,停止对您的地理位置信息的收集,但将无法使用我们提供的部分与位置信息相关的服务。<br></span>
|
||||
<span >  ⑥传感器信息:在您使用App时,会获取方向传感器、陀螺仪设备传感器信息,用于鉴别您是否为真实用户。<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >  (3)由于我们向您提供的产品和服务是不断更新的,如果某一产品或服务未在前述内容中说明且收集了您的信息,我们不会通过页面提示、交互流程、app站公告方式另行向您说明信息收集的内容,但您可以到个人中心隐私政策查看最新条款。该信息适用本隐私政策的约定。<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >  (4)为识别您的设备并预防恶意程序及反作弊、提高服务安全性、保障运营质量及效率,我们会收集您的设备信息(设备序列号、OAID、MEID、AndroidID、IMSl、MAC、BSSID、SSID、WIFI、WIFI列表、MAC地址、收集软件列表、设备MAC地址、加速度传感器(BODY_SENSORS))、已安装APP信息(软件安装列表或软件列表)或运行中的进程信息。<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >  (5)以上列明的基本为核心业务功能,对于第三方业务功能(例如第三方提供的金融业务功能)会通过页面提示、交互流程方式另行向您说明相应的个人信息收集和使用规则,并征得您的同意。<br></span>
|
||||
<span class="fly-text-color">  获取位置信息个人信息<br></span>
|
||||
<span >  用于附近店铺显示和当地天气数据获取<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span class="fly-text-color">  获取设备ID<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >  在用户授权获取设备ID时, SDK根据不同系统分别调用不同的系统命令来获取设备ID,在 iOS 设备 中,SDK将会获取 IDFA ;在 Android 10以下版本的设备中,SDK将会获 取 IMEI 、 AndroidID ;在 Android 10以上版本的设备,SDK获取 OAID 。<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span class="fly-text-color">  获取设备GPS数据<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >  在经过用户授权后,SDK将调用您设备的GPS接口,获取您的GPS坐标数据。<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span class="fly-text-color">  获取广告相关行为数据<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >  在用户与广告进行交互时,如观看广告,点击广告链接等行为,SDK将会通过接口来获取这些数据。<br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>ADSet SDK隐私权限</h4>
|
||||
<img src="./images/table/01.jpg" alt="" srcset="">
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>第三方SDK隐私权限</h4>
|
||||
<span >  AdSet SDK会调用其他SDK ,表为其他SDK隐私内容及隐私链接。<br></span>
|
||||
|
||||
<h4>高德地图 SDK</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/09.jpg" alt="" srcset="">
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/10.jpg" alt="" srcset="">
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/11.jpg" alt="" srcset="">
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/12.jpg" alt="" srcset="">
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/13.jpg" alt="" srcset="">
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/14.jpg" alt="" srcset="">
|
||||
|
||||
|
||||
<h4>支付宝SDK(com.alipay.alipaysecuritysdk)</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/15.jpg" alt="" srcset="">
|
||||
|
||||
<h4>mPaaS</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/18.jpg" alt="" srcset="">
|
||||
|
||||
<h4>阿里乘车码</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/19.jpg" alt="" srcset="">
|
||||
|
||||
<h4>阿里芝麻信用实名认证</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/20.jpg" alt="" srcset="">
|
||||
|
||||
<h4>芝麻认证</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/21.jpg" alt="" srcset="">
|
||||
|
||||
|
||||
<h4>微信支付SDK</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >  为实现让用户在第三方应用中使用微信支付功能,<strong>我们会收集用户发起支付时第三方应用生成的微信支付订单标识并向微信APP传输,并在用户进行支付操作后向第三方应用传输本次支付是否成功的状态信息。</strong>请注意,微信支付功能由财付通支付科技有限公司(下称“财付通公司”)提供服务。<br></span>
|
||||
<span >  前述关于收集、使用个人信息的内容适用于iOS及Android系统。<br></span>
|
||||
<span >  特别说明,在Android系统中我们会验证用户设备上安装微信APP的状态,用于确认该设备是否能够实现Open SDK的相关能力,如设备上未安装微信APP,用户将无法使用微信Open SDK能力所实现的相关功能。<br></span>
|
||||
<span >  如用户使用iOS系统,为了在iOS系统设备中实现前述相关功能在不同设备下的表现适配,我们会收集用户的设备型号信息并保存在设备本地。<br></span>
|
||||
<span >  为实现SDK产品的相应功能所必需,在用户通过第三方应用使用微信Open SDK相关能力的过程中,我们会通过第三方应用申请以下权限:<br></span>
|
||||
<span >  如用户使用iOS系统,为了在iOS系统中实现前述相关功能所涉及的第三方应用与微信APP之间的信息传输,我们需调用iOS的剪切板权限,并在剪切板中写入、读取上述相关信息。<br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>阿里云金融及实人认证SDK</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<h4>1、设备信息</h4>
|
||||
<span >  当您使用增强版实人认证时,为了确认SDK服务可用性和识别虚假设备,我们会获取最终用户的,<br></span>
|
||||
<span >  <strong>(1)设备基础信息:设备制造商、设备品牌、设备型号、设备名称、设备操作系统信息、设备配置信息、设备环境信息;</strong><br></span>
|
||||
<span >  <strong>(2)设备标识信息:Android ID、OAID、Google AID(Google广告ID)net.security.device,Android_ID,BODY_SENSORS ,READ_PHONE_STATE;</strong><br></span>
|
||||
<span >  <strong>(2)设备标识信息:Android ID、OAID、Google AID(Google广告ID)net.security.device,Android_ID,BODY_SENSORS ,READ_PHONE_STATE;</strong><br></span>
|
||||
<span >  <strong>(4)设备应用信息:SDK宿主APP信息(包括:应用名称、应用版本、安装时间)</strong><br></span>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<h4>2、最终用户上传的人脸及身份证图片</h4>
|
||||
<span >  在最终用户同意开启相机/摄像头权限后,我们会在您完成指定验证动作时,<strong>获取最终用户的人脸图片进行身份验证的比对。此外,当您使用实人认证OCR功能时,我们还将通过最终用户拍照上传的身份证图片获取最终用户的身份证字段信息,以进行安全验证。</strong>您及最终用户知晓,即使最终用户已同意开启相机权限,我们也仅会在您主动点击客户端内相机图标或录制视频时通过相机获取照片信息。<br></span>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<h4>3、终端权限信息</h4>
|
||||
<span >  为保障产品功能实现与安全稳定运行目的,我们可能会申请或使用最终用户操作系统的相关权限。<br></span>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<h4>4、日志信息</h4>
|
||||
<span >  当您使用我们增强版实人认证时,我们会自动收集您对我们服务的详细使用情况,作为有关操作日志保存,<strong>包括您的操作参数、操作时间、服务响应时间、操作步骤、验证结果、错误原因。</strong><br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>安卓操作系统应用权限列表</h4>
|
||||
<img src="./images/table/16.jpg" alt="" srcset="">
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<h4>iOS 操作系统应用权限列表</h4>
|
||||
<img src="./images/table/17.jpg" alt="" srcset="">
|
||||
|
||||
<h4>讯飞SDK</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >  权限:设备号(IMEI号)、设备码(IMSI码)、IP地址、Android ID(安卓唯一设备ID)、中国移动UAID(仅限安卓设备)、OAID(仅限安卓设备)、UUID(仅限iOS设备)<br></span>
|
||||
<span >  是否不选:必选<br></span>
|
||||
<span >  申请目的:提供语音输入后的语音转文字、语音合成、语音评测服务。<br></span>
|
||||
<span >  权限:网络权限、麦克风权限<br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>3 、信息使用</h4>
|
||||
<span >  ( 1 )一般来说,【心随云飘】出于以下目的收集、使用您的个人信息:<br></span>
|
||||
  ①<span class="fly-text-color">账号管理:</span><span >您可以通过【心随云飘】APP创建账号,我们将使用您所提供的信息来管理您的账号,并为您提供一系列的实用功能,您可以使用您的账号进行多种操作,如管理订单、调整个人设置、查看历史订单信息、支付管理。<br></span>
|
||||
  ②<span class="fly-text-color">答复您的问询和请求:</span><span >我们向您提供客户服务,以便在您需要的时候提供帮助。<br></span>
|
||||
  ③<span class="fly-text-color">与您联系:</span><span >回复及处理您所提出的疑问或要求、发送与订单相关的信息、我们也可能会向您发送问卷调查或邀请您对我们的服务提供反馈。<br></span>
|
||||
  ④<span class="fly-text-color">市场调研:</span><span >我们有时会邀请您参与市场调查,以衡量您对我们的产品、服务和app站的兴趣。<br></span>
|
||||
<!--   ⑤<span class="fly-text-color">数据分析:我们可能将您的数据用于分析,从而形成用户画像,以便让我们能够了解您所在的位置、偏好和人口统计信息,或与其他来源(包括第三方)的数据相匹配,从而开发我们的产品、服务或营销计划,改进我们的服务<br></span> -->
|
||||
  ⑤<span class="fly-text-color">控制信用风险:</span><span >为了确保交易安全,【心随云飘】及关联公司、业务合作伙伴可能对用户信息进行数据分析,并对上述分析结果进行商业利用。<br></span>
|
||||
  ⑥<span class="fly-text-color">日常运营:</span><span >包括但不限于订单管理、客户验证、技术支持、app络维护、故障排除、内部行政事务及内部政策和程序、生成内部报告。<br></span>
|
||||
  ⑦<span class="fly-text-color">电话监测:</span><span >您接听和拨打我们的客服电话可能会被录音,我们可能会使用通话录音来监控我们的客服服务质量,检查您所提供的信息的准确性以防止欺诈,或为了我们内部人员培训的目的。录音在被保留一段时间后会自动删除,除非由于合规要求或合法利益需要为场景的保留<br></span>
|
||||
  ⑧<span class="fly-text-color">法律目的:</span><span >我们可能需要使用您的信息来处理和解决法律纠纷,或遵循对我们具有约束力的任何法律法规或监管机构颁发的文件规定,以配合国家部门或监管机构调查和遵从法律法规的目的。<br></span>
|
||||
<span >  此外,我们可能会出于其他目的收集、使用和披露您的个人信息,并通过修订本声明的形式告知您。<br></span>
|
||||
<span >  如要改变个人信息的处理目的,我们将以推送通知方式再次征求您的授权同意。 <br></span>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<h4>( 2 )您充分知晓,以下情形中我们使用个人信息无需征得您的授权同意:</h4>
|
||||
<span >  ①与国家安全、国防安全有关的;<br></span>
|
||||
<span >  ②与公共安全、公共卫生、重大公共利益有关的;<br></span>
|
||||
<span >  ③与犯罪侦查、起诉、审判和判决执行有关的;<br></span>
|
||||
<span >  ④出于维护个人信息主体或其他个人的生命、财产重大合法权益但又很难得到本人同意的;<br></span>
|
||||
<span >  ⑤所收集的个人信息是个人信息主体自行向社会公众公开的;<br></span>
|
||||
<span >  ⑥从合法公开披露的信息中收集的您的个人信息的,如合法的新闻报道、政府信息公开渠道;<br></span>
|
||||
<span >  ⑦用于维护所提供的产品与/或服务的安全稳定运行所必需的,例如发现、处置产品与/或服务的故障;<br></span>
|
||||
<span >  ⑧为合法的新闻报道所必需的;<br></span>
|
||||
<span >  ⑨学术研究机构基于公共利益开展统计或学术研究所必要,且对外提供学术研究或描述的结果时,对结果中所包含的个人信息进行去标识化处理的;<br></span>
|
||||
<span >  ⑩法律法规规定的其他情形。<br></span>
|
||||
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>4 、信息保存</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<h4>(1)我们仅在本政策所述目的所必需期间和法律法规及监管规定的时限内保存您的个人信息。如我们停止运营【心随云飘】APP产品或服务,我们将及时停止继续收集您个人信息的活动,将停止运营的通知以逐一送达或公告的形式通知您,对所持有的个人信息进行删除或匿名化处理。</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<h4>( 2 )您充分知晓,以下情形中我们使用个人信息无需征得您的授权同意:</h4>
|
||||
<span >  ①法律法规有明确规定;<br></span>
|
||||
<span >  ②获得您的明确授权<br></span>
|
||||
<span >  ③您通过互联app进行跨境交易个人主动行为。<br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>5 、个人敏感信息提示</h4>
|
||||
<span >  某些特殊的个人信息可能被认为是个人敏感信息,这些个人敏感信息将受到严格保护。【心随云飘】隐私政策在此提醒您,您在使用【心随云飘】为您提供的产品及服务中所上传或发布的内容和信息可能会披露泄露您的个人敏感信息。 因此,您需要在使用我们为您提供的产品或服务前谨慎考虑。您同意这些个人敏感信息将按照本隐私政策阐明的目的和方式来进行处理。;<br></span>
|
||||
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>6 、信息安全与保护</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >  (1)【心随云飘】非常重视信息安全,成立了专门的负责团队。<br></span>
|
||||
<span >  (2)我们从数据的生命周期角度出发,在数据收集、存储、显示、处理、使用、销毁各个环节建立了安全防护措施,根据信息敏感程度的级别采取不同的控制措施,包括但不限于访问控制、SSL加密传输、AES256bit或以上强度的加密算法进行加密存储。<br></span>
|
||||
<span >  (3)尽管有前述的安全措施,但同时也请您理解在app络上不存在“完善的安全措施”。我们会按现有的技术提供相应的安全措施来保护您的信息,提供合理的安全保障,我们将尽力做到使您的信息不被泄露、损毁或丢失。<br></span>
|
||||
<span >  (4)您的账户均有安全保护功能,请妥善保管您的账号及密码信息,切勿将密码告知他人,如果您发现自己的个人信息泄露,特别是您的账号和密码发生泄露,请您立即与我们的客服联系,以便我们采取相应的措施。;<br></span>
|
||||
<span >  (5)请您及时保存或备份您的文字、图片其他信息,您需理解并接受,您接入我们的服务所用的系统和通讯app络,有可能因我们可控范围外的因素而出现问题。<br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>7 、信息安全事件处置</h4>
|
||||
<span >  在不幸发生个人信息安全事件后,我们会启动应急预案,同时按照法律法规的要求向您告知:安全事件的基本情况和可能的影响、我们已采取或将要采取的处置措施、您可自主防范和降低风险的建议、对您的补救措施。事件相关情况我们将以推送通知方式告知您,难以逐一告知个人信息主体时,我们会采取合理、有效的方式发布公告。同时,我们还将按照监管部门要求,上报个人信息安全事件的处置情况。<br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>8 、用户个人信息管理</h4>
|
||||
<span >  (1)您可以随时登录【心随云飘】旅行攻略,查询、更正、删除自己的账户信息;修改个人资料、隐私设置、安全设置;修改地址、常用联系人信息使用【心随云飘】服务时您提供的个人信息。操作过程中如有问题,可以联系【心随云飘】客服。<br></span>
|
||||
<span >  (2)您可以通过删除您的个人信息、关闭设备功能、修改个人设置方式改变您授权我们继续收集个人信息的范围或撤回您的授权。<br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>9、从中国大陆地区以外访问我们的 app 站</h4>
|
||||
<span >  如果您是中国大陆以外地区的公民,或者从中国大陆以外地区访问我们的 app 站,请您注意,您的信息可能被传送至、存储于中国大陆,并且在中国大陆进行处理。中国大陆的数据保护法和其他法律可能与您所在国家 / 地区的法律不同,您继续使用我们的服务,意味着放弃适用您所在国家 / 地区的法律。选择使用我们的服务的同时,您了解并同意您的信息可能被传送至我们的 app 站,并如本隐私政策所述的与我们共享信息的第三方。<br></span>
|
||||
|
||||
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>10 、隐私政策的适用范围</h4>
|
||||
<span >  除某些特定服务外,我们所有的服务均适用本隐私政策。特定服务将适用特定的隐私政策。该特定服务的隐私政策构成本隐私政策的一部分。如任何特定服务的隐私政策与本隐私政策有不一致之处,则适用特定服务的隐私政策。请您注意,本隐私政策不适用于以下情况:通过我们的服务而接入的第三方服务(包括任何第三方app站)收集的信息;通过在我们服务中进行广告服务的其他公司和机构所收集的信息。<br></span>
|
||||
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>11 、隐私政策的修改</h4>
|
||||
<span >  【心随云飘】会在必要时修改隐私政策,请您理解,我们可能会适时修订本隐私政策,我们将标注本隐私政策最近更新的日期。未经您明确同意,【心随云飘】不会减少您按照本隐私权政策所应享有的权利。对于重大变更,请您经常回访本隐私政策,以阅读最新版本。<br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>12 、如何联系我们</h4>
|
||||
<span >  如您有任何与个人信息保护或隐私保护相关的问题、意见或建议,以及相关的投诉、举报,您可以通过访问在线客服系统,或拨打【心随云飘】主页公示的客服电话与我们联系。一般情况下,我们将在核验您的身份无误后三十日内回复(联系方式:028-85109076)。<br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>13 、法律管辖</h4>
|
||||
<span >  本隐私政策之效力、解释、变更、执行与争议解决均适用中华人民共和国法律。因本协议产生的争议,均应依照中华人民共和国法律予以处理,并由被告住所地人民法院管辖。<br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>14、用户账号注销</h4>
|
||||
<span >  本平台用户可在APP“我的”页面点击头像进入“个人信息”页面,注销个人账号。<br></span>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
', '商城app用户隐私政策', NULL, NULL, '2026-01-30 00:57:52.597', NULL, '2026-01-30 00:57:52.597', 1, 0);
|
||||
@@ -1,5 +0,0 @@
|
||||
INSERT INTO level_info ("id", "name", "child_qty", "performance", "performance_benefit", "next_level_id", "is_lowest", "is_highest", "bonus_cash_day", "bonus_cash_all", "bonus_benefit", "version", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (1, '社区经销商', 10, '10000.0000', '100000.0000', 2, 0, 0, '0.0500', '0.0000', '0.0800', 1, 1123598821738675201, 1123598813738675201, '2026-01-30 22:54:56.006', 1123598821738675201, '2026-01-30 22:54:56.006', 1, 0);
|
||||
INSERT INTO level_info ("id", "name", "child_qty", "performance", "performance_benefit", "next_level_id", "is_lowest", "is_highest", "bonus_cash_day", "bonus_cash_all", "bonus_benefit", "version", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (0, '普通用户', 0, '0.0000', '0.0000', 1, 1, 0, '0.0000', '0.0000', '0.0000', 1, 1123598821738675201, 1123598813738675201, '2026-01-30 22:54:56.006', 1123598821738675201, '2026-01-30 22:54:56.006', 1, 0);
|
||||
INSERT INTO level_info ("id", "name", "child_qty", "performance", "performance_benefit", "next_level_id", "is_lowest", "is_highest", "bonus_cash_day", "bonus_cash_all", "bonus_benefit", "version", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2, '社区经销商', 20, '1000000.0000', '1000000.0000', 3, 0, 0, '0.0500', '0.0000', '0.0600', 1, 1123598821738675201, 1123598813738675201, '2026-01-30 22:54:56.006', 1123598821738675201, '2026-01-30 22:54:56.006', 1, 0);
|
||||
INSERT INTO level_info ("id", "name", "child_qty", "performance", "performance_benefit", "next_level_id", "is_lowest", "is_highest", "bonus_cash_day", "bonus_cash_all", "bonus_benefit", "version", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (3, '社区经销商', 30, '5000000.0000', '5000000.0000', 4, 0, 0, '0.0500', '0.0000', '0.0400', 1, 1123598821738675201, 1123598813738675201, '2026-01-30 22:54:56.006', 1123598821738675201, '2026-01-30 22:54:56.006', 1, 0);
|
||||
INSERT INTO level_info ("id", "name", "child_qty", "performance", "performance_benefit", "next_level_id", "is_lowest", "is_highest", "bonus_cash_day", "bonus_cash_all", "bonus_benefit", "version", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (4, '社区经销商', 40, '20000000.0000', '20000000.0000', NULL, 0, 1, '0.0000', '0.0500', '0.0200', 1, 1123598821738675201, 1123598813738675201, '2026-01-30 22:54:56.006', 1123598821738675201, '2026-01-30 22:54:56.006', 1, 0);
|
||||
@@ -1,4 +0,0 @@
|
||||
INSERT INTO package_info ("id", "name", "buy_qty", "day_total", "amount_total", "give_amount", "bonus", "user_benefit", "user_cash", "is_need_benefit", "is_need_cash", "max_exchange_qty", "exchanged_qty", "version", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017484367073824770, '100积分包', 10, 360, '300.00', '100.00', '0.00', '100.0000', '20.0000', 1, 1, 2000000, 0, 1, 1123598821738675201, 1123598813738675201, '2026-01-31 14:25:30.812', 1123598821738675201, '2026-01-31 14:25:30.812', 1, 0);
|
||||
INSERT INTO package_info ("id", "name", "buy_qty", "day_total", "amount_total", "give_amount", "bonus", "user_benefit", "user_cash", "is_need_benefit", "is_need_cash", "max_exchange_qty", "exchanged_qty", "version", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017487266873004034, '5000积分包', 2, 360, '15000.00', '5000.00', '0.00', '5000.0000', '1500.0000', 1, 1, 50000, 0, 1, 1123598821738675201, 1123598813738675201, '2026-01-31 14:37:02.18', 1123598821738675201, '2026-01-31 14:37:02.18', 1, 0);
|
||||
INSERT INTO package_info ("id", "name", "buy_qty", "day_total", "amount_total", "give_amount", "bonus", "user_benefit", "user_cash", "is_need_benefit", "is_need_cash", "max_exchange_qty", "exchanged_qty", "version", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017487214255460354, '1000积分包', 4, 360, '3000.00', '1000.00', '0.00', '1000.0000', '300.0000', 1, 1, 1000000, 0, 1, 1123598821738675201, 1123598813738675201, '2026-01-31 14:36:49.643', 1123598821738675201, '2026-01-31 14:36:49.643', 1, 0);
|
||||
INSERT INTO package_info ("id", "name", "buy_qty", "day_total", "amount_total", "give_amount", "bonus", "user_benefit", "user_cash", "is_need_benefit", "is_need_cash", "max_exchange_qty", "exchanged_qty", "version", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017487362494746625, '10000积分包', 1, 360, '40000.00', '10000.00', '0.00', '10000.0000', '4000.0000', 1, 1, 20000, 0, 1, 1123598821738675201, 1123598813738675201, '2026-01-31 14:37:24.979', 1123598821738675201, '2026-01-31 14:37:24.979', 1, 0);
|
||||
@@ -1,8 +0,0 @@
|
||||
INSERT INTO user_commission_account ("id", "account_name", "account_number", "account_code", "amount", "version", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017485441885196290, '商品成本账户', 'COMMISSION_GOODS_COST', '', '0.0000', 1, 1123598821738675201, 1123598813738675201, '2026-01-31 14:29:47', 1123598821738675201, '2026-01-31 14:30:16.04', 1, 0);
|
||||
INSERT INTO user_commission_account ("id", "account_name", "account_number", "account_code", "amount", "version", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017485893100032002, '分发商城积分账户', 'COMMISSION_USER_POINT_LOG', NULL, '0.0000', 1, 1123598821738675201, 1123598813738675201, '2026-01-31 14:31:34.663', 1123598821738675201, '2026-01-31 14:31:34.663', 1, 0);
|
||||
INSERT INTO user_commission_account ("id", "account_name", "account_number", "account_code", "amount", "version", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017486037128237058, '分发直推人佣金账户', 'COMMISSION_DIRECT_PUSH', NULL, '0.0000', 1, 1123598821738675201, 1123598813738675201, '2026-01-31 14:32:08.998', 1123598821738675201, '2026-01-31 14:32:08.998', 1, 0);
|
||||
INSERT INTO user_commission_account ("id", "account_name", "account_number", "account_code", "amount", "version", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017486179294171138, '运营账户', 'COMMISSION_OPERATION', NULL, '0.0000', 1, 1123598821738675201, 1123598813738675201, '2026-01-31 14:32:42.889', 1123598821738675201, '2026-01-31 14:32:42.889', 1, 0);
|
||||
INSERT INTO user_commission_account ("id", "account_name", "account_number", "account_code", "amount", "version", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017486299502923778, '分发广告补贴账户', 'COMMISSION_ADVERTISING', NULL, '0.0000', 1, 1123598821738675201, 1123598813738675201, '2026-01-31 14:33:11.552', 1123598821738675201, '2026-01-31 14:33:11.552', 1, 0);
|
||||
INSERT INTO user_commission_account ("id", "account_name", "account_number", "account_code", "amount", "version", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017486437340336130, '分发服务商佣金账户', 'COMMISSION_SERVICE_PROVIDER', NULL, '0.0000', 1, 1123598821738675201, 1123598813738675201, '2026-01-31 14:33:44.407', 1123598821738675201, '2026-01-31 14:33:44.407', 1, 0);
|
||||
INSERT INTO user_commission_account ("id", "account_name", "account_number", "account_code", "amount", "version", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017486568441696258, '分发极差代理佣金账户', 'COMMISSION_AGENCY', NULL, '0.0000', 1, 1123598821738675201, 1123598813738675201, '2026-01-31 14:34:15.663', 1123598821738675201, '2026-01-31 14:34:15.663', 1, 0);
|
||||
INSERT INTO user_commission_account ("id", "account_name", "account_number", "account_code", "amount", "version", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017486664117964802, '联创佣金账户', 'COMMISSION_CO_CREATOR', NULL, '0.0000', 1, 1123598821738675201, 1123598813738675201, '2026-01-31 14:34:38.479', 1123598821738675201, '2026-01-31 14:34:38.479', 1, 0);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,75 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.cache;
|
||||
|
||||
import org.springblade.core.tool.utils.StringPool;
|
||||
|
||||
/**
|
||||
* 缓存名
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface CacheNames {
|
||||
|
||||
/**
|
||||
* 返回拼接后的key
|
||||
*
|
||||
* @param cacheKey 缓存key
|
||||
* @param cacheKeyValue 缓存key值
|
||||
* @return tenantKey
|
||||
*/
|
||||
static String cacheKey(String cacheKey, String cacheKeyValue) {
|
||||
return cacheKey.concat(cacheKeyValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回租户格式的key
|
||||
*
|
||||
* @param tenantId 租户编号
|
||||
* @param cacheKey 缓存key
|
||||
* @param cacheKeyValue 缓存key值
|
||||
* @return tenantKey
|
||||
*/
|
||||
static String tenantKey(String tenantId, String cacheKey, String cacheKeyValue) {
|
||||
return tenantId.concat(StringPool.COLON).concat(cacheKey).concat(cacheKeyValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证码key
|
||||
*/
|
||||
String CAPTCHA_KEY = "blade:auth::blade:captcha:";
|
||||
|
||||
/**
|
||||
* 账号失败key
|
||||
*/
|
||||
String ACCOUNT_FAIL_KEY = "blade:lock::account:fail:";
|
||||
|
||||
/**
|
||||
* IP失败key
|
||||
*/
|
||||
String IP_FAIL_KEY = "blade:lock::ip:fail:";
|
||||
|
||||
}
|
||||
@@ -1,125 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.cache;
|
||||
|
||||
import org.springblade.common.enums.DictBizEnum;
|
||||
import org.springblade.core.cache.utils.CacheUtil;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.utils.SpringUtil;
|
||||
import org.springblade.core.tool.utils.StringPool;
|
||||
import org.springblade.modules.system.pojo.entity.DictBiz;
|
||||
import org.springblade.modules.system.service.IDictBizService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.springblade.core.cache.constant.CacheConstant.DICT_CACHE;
|
||||
|
||||
/**
|
||||
* 业务字典缓存工具类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class DictBizCache {
|
||||
|
||||
private static final String DICT_ID = "dictBiz:id";
|
||||
private static final String DICT_VALUE = "dictBiz:value";
|
||||
private static final String DICT_LIST = "dictBiz:list";
|
||||
|
||||
private static final IDictBizService dictService;
|
||||
|
||||
static {
|
||||
dictService = SpringUtil.getBean(IDictBizService.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典实体
|
||||
*
|
||||
* @param id 主键
|
||||
* @return DictBiz
|
||||
*/
|
||||
public static DictBiz getById(Long id) {
|
||||
String keyPrefix = DICT_ID.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON);
|
||||
return CacheUtil.get(DICT_CACHE, keyPrefix, id, () -> dictService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典值
|
||||
*
|
||||
* @param code 字典编号枚举
|
||||
* @param dictKey Integer型字典键
|
||||
* @return String
|
||||
*/
|
||||
public static String getValue(DictBizEnum code, Integer dictKey) {
|
||||
return getValue(code.getName(), dictKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典值
|
||||
*
|
||||
* @param code 字典编号
|
||||
* @param dictKey Integer型字典键
|
||||
* @return String
|
||||
*/
|
||||
public static String getValue(String code, Integer dictKey) {
|
||||
String keyPrefix = DICT_VALUE.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON);
|
||||
return CacheUtil.get(DICT_CACHE, keyPrefix + code + StringPool.COLON, String.valueOf(dictKey), () -> dictService.getValue(code, String.valueOf(dictKey)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典值
|
||||
*
|
||||
* @param code 字典编号枚举
|
||||
* @param dictKey String型字典键
|
||||
* @return String
|
||||
*/
|
||||
public static String getValue(DictBizEnum code, String dictKey) {
|
||||
return getValue(code.getName(), dictKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典值
|
||||
*
|
||||
* @param code 字典编号
|
||||
* @param dictKey String型字典键
|
||||
* @return String
|
||||
*/
|
||||
public static String getValue(String code, String dictKey) {
|
||||
String keyPrefix = DICT_VALUE.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON);
|
||||
return CacheUtil.get(DICT_CACHE, keyPrefix + code + StringPool.COLON, dictKey, () -> dictService.getValue(code, dictKey));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典集合
|
||||
*
|
||||
* @param code 字典编号
|
||||
* @return List<DictBiz>
|
||||
*/
|
||||
public static List<DictBiz> getList(String code) {
|
||||
String keyPrefix = DICT_LIST.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON);
|
||||
return CacheUtil.get(DICT_CACHE, keyPrefix, code, () -> dictService.getList(code));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,152 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.cache;
|
||||
|
||||
import org.springblade.common.enums.DictEnum;
|
||||
import org.springblade.core.cache.utils.CacheUtil;
|
||||
import org.springblade.core.tool.utils.SpringUtil;
|
||||
import org.springblade.core.tool.utils.StringPool;
|
||||
import org.springblade.modules.system.pojo.entity.Dict;
|
||||
import org.springblade.modules.system.service.IDictService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import static org.springblade.core.cache.constant.CacheConstant.DICT_CACHE;
|
||||
|
||||
/**
|
||||
* 字典缓存工具类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class DictCache {
|
||||
|
||||
private static final String DICT_ID = "dict:id:";
|
||||
private static final String DICT_KEY = "dict:key:";
|
||||
private static final String DICT_VALUE = "dict:value:";
|
||||
private static final String DICT_LIST = "dict:list:";
|
||||
|
||||
private static final Boolean TENANT_MODE = Boolean.FALSE;
|
||||
|
||||
private static final IDictService dictService;
|
||||
|
||||
static {
|
||||
dictService = SpringUtil.getBean(IDictService.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典实体
|
||||
*
|
||||
* @param id 主键
|
||||
* @return Dict
|
||||
*/
|
||||
public static Dict getById(Long id) {
|
||||
return CacheUtil.get(DICT_CACHE, DICT_ID, id, () -> dictService.getById(id), TENANT_MODE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典值
|
||||
*
|
||||
* @param code 字典编号枚举
|
||||
* @param dictValue 字典值
|
||||
* @return String
|
||||
*/
|
||||
public static String getKey(DictEnum code, String dictValue) {
|
||||
return getKey(code.getName(), dictValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典键
|
||||
*
|
||||
* @param code 字典编号
|
||||
* @param dictValue 字典值
|
||||
* @return String
|
||||
*/
|
||||
public static String getKey(String code, String dictValue) {
|
||||
return CacheUtil.get(DICT_CACHE, DICT_KEY + code + StringPool.COLON, dictValue, () -> {
|
||||
List<Dict> list = getList(code);
|
||||
Optional<String> key = list.stream().filter(
|
||||
dict -> dict.getDictValue().equalsIgnoreCase(dictValue)
|
||||
).map(Dict::getDictKey).findFirst();
|
||||
return key.orElse(StringPool.EMPTY);
|
||||
}, TENANT_MODE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典值
|
||||
*
|
||||
* @param code 字典编号枚举
|
||||
* @param dictKey Integer型字典键
|
||||
* @return String
|
||||
*/
|
||||
public static String getValue(DictEnum code, Integer dictKey) {
|
||||
return getValue(code.getName(), dictKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典值
|
||||
*
|
||||
* @param code 字典编号
|
||||
* @param dictKey Integer型字典键
|
||||
* @return String
|
||||
*/
|
||||
public static String getValue(String code, Integer dictKey) {
|
||||
return CacheUtil.get(DICT_CACHE, DICT_VALUE + code + StringPool.COLON, String.valueOf(dictKey), () -> dictService.getValue(code, String.valueOf(dictKey)), TENANT_MODE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典值
|
||||
*
|
||||
* @param code 字典编号枚举
|
||||
* @param dictKey String型字典键
|
||||
* @return String
|
||||
*/
|
||||
public static String getValue(DictEnum code, String dictKey) {
|
||||
return getValue(code.getName(), dictKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典值
|
||||
*
|
||||
* @param code 字典编号
|
||||
* @param dictKey String型字典键
|
||||
* @return String
|
||||
*/
|
||||
public static String getValue(String code, String dictKey) {
|
||||
return CacheUtil.get(DICT_CACHE, DICT_VALUE + code + StringPool.COLON, dictKey, () -> dictService.getValue(code, dictKey), TENANT_MODE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典集合
|
||||
*
|
||||
* @param code 字典编号
|
||||
* @return List<Dict>
|
||||
*/
|
||||
public static List<Dict> getList(String code) {
|
||||
return CacheUtil.get(DICT_CACHE, DICT_LIST, code, () -> dictService.getList(code), TENANT_MODE);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.cache;
|
||||
|
||||
import org.springblade.core.cache.utils.CacheUtil;
|
||||
import org.springblade.core.tool.utils.SpringUtil;
|
||||
import org.springblade.modules.system.pojo.entity.Param;
|
||||
import org.springblade.modules.system.service.IParamService;
|
||||
|
||||
import static org.springblade.core.cache.constant.CacheConstant.PARAM_CACHE;
|
||||
|
||||
/**
|
||||
* 参数缓存工具类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class ParamCache {
|
||||
|
||||
private static final String PARAM_ID = "param:id:";
|
||||
private static final String PARAM_VALUE = "param:value:";
|
||||
|
||||
private static final IParamService paramService;
|
||||
|
||||
static {
|
||||
paramService = SpringUtil.getBean(IParamService.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取参数实体
|
||||
*
|
||||
* @param id 主键
|
||||
* @return Param
|
||||
*/
|
||||
public static Param getById(Long id) {
|
||||
return CacheUtil.get(PARAM_CACHE, PARAM_ID, id, () -> paramService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取参数配置
|
||||
*
|
||||
* @param paramKey 参数值
|
||||
* @return String
|
||||
*/
|
||||
public static String getValue(String paramKey) {
|
||||
return CacheUtil.get(PARAM_CACHE, PARAM_VALUE, paramKey, () -> paramService.getValue(paramKey));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.cache;
|
||||
|
||||
import org.springblade.core.cache.utils.CacheUtil;
|
||||
import org.springblade.core.tool.utils.SpringUtil;
|
||||
import org.springblade.modules.system.pojo.entity.Region;
|
||||
import org.springblade.modules.system.service.IRegionService;
|
||||
|
||||
import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
|
||||
|
||||
/**
|
||||
* 行政区划缓存工具类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class RegionCache {
|
||||
public static final String MAIN_CODE = "00";
|
||||
public static final int PROVINCE_LEVEL = 1;
|
||||
public static final int CITY_LEVEL = 2;
|
||||
public static final int DISTRICT_LEVEL = 3;
|
||||
public static final int TOWN_LEVEL = 4;
|
||||
public static final int VILLAGE_LEVEL = 5;
|
||||
|
||||
private static final String REGION_CODE = "region:code:";
|
||||
|
||||
private static final IRegionService regionService;
|
||||
|
||||
static {
|
||||
regionService = SpringUtil.getBean(IRegionService.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取行政区划实体
|
||||
*
|
||||
* @param code 区划编号
|
||||
* @return Param
|
||||
*/
|
||||
public static Region getByCode(String code) {
|
||||
return CacheUtil.get(SYS_CACHE, REGION_CODE, code, () -> regionService.getById(code));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,334 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.cache;
|
||||
|
||||
import org.springblade.core.cache.utils.CacheUtil;
|
||||
import org.springblade.core.mp.enums.StatusType;
|
||||
import org.springblade.core.tool.utils.SpringUtil;
|
||||
import org.springblade.core.tool.utils.StringPool;
|
||||
import org.springblade.modules.system.pojo.entity.*;
|
||||
import org.springblade.modules.system.service.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
|
||||
|
||||
/**
|
||||
* 系统缓存
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class SysCache {
|
||||
private static final String MENU_ID = "menu:id:";
|
||||
private static final String DEPT_ID = "dept:id:";
|
||||
private static final String DEPT_NAME = "dept:name:";
|
||||
private static final String DEPT_NAME_FUZZY = "dept:nameFuzzy:";
|
||||
private static final String DEPT_NAME_ID = "deptName:id:";
|
||||
private static final String DEPT_NAMES_ID = "deptNames:id:";
|
||||
private static final String DEPT_CHILD_ID = "deptChild:id:";
|
||||
private static final String DEPT_CHILDIDS_ID = "deptChildIds:id:";
|
||||
private static final String POST_ID = "post:id:";
|
||||
private static final String POST_NAME = "post:name:";
|
||||
private static final String POST_NAME_FUZZY = "post:nameFuzzy:";
|
||||
private static final String POST_NAME_ID = "postName:id:";
|
||||
private static final String POST_NAMES_ID = "postNames:id:";
|
||||
private static final String ROLE_ID = "role:id:";
|
||||
private static final String ROLE_NAME = "role:name:";
|
||||
private static final String ROLE_NAME_ID = "roleName:id:";
|
||||
private static final String ROLE_NAMES_ID = "roleNames:id:";
|
||||
private static final String ROLE_ALIAS_ID = "roleAlias:id:";
|
||||
private static final String ROLE_ALIASES_ID = "roleAliases:id:";
|
||||
public static final String TENANT_ID = "tenant:id:";
|
||||
public static final String TENANT_TENANT_ID = "tenant:tenantId:";
|
||||
public static final String TENANT_PACKAGE_ID = "tenant:packageId:";
|
||||
|
||||
private static final IMenuService menuService;
|
||||
private static final IDeptService deptService;
|
||||
private static final IPostService postService;
|
||||
private static final IRoleService roleService;
|
||||
private static final ITenantService tenantService;
|
||||
private static final ITenantPackageService tenantPackageService;
|
||||
|
||||
static {
|
||||
menuService = SpringUtil.getBean(IMenuService.class);
|
||||
deptService = SpringUtil.getBean(IDeptService.class);
|
||||
postService = SpringUtil.getBean(IPostService.class);
|
||||
roleService = SpringUtil.getBean(IRoleService.class);
|
||||
tenantService = SpringUtil.getBean(ITenantService.class);
|
||||
tenantPackageService = SpringUtil.getBean(ITenantPackageService.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取菜单
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 菜单
|
||||
*/
|
||||
public static Menu getMenu(Long id) {
|
||||
return CacheUtil.get(SYS_CACHE, MENU_ID, id, () -> menuService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 部门
|
||||
*/
|
||||
public static Dept getDept(Long id) {
|
||||
return CacheUtil.get(SYS_CACHE, DEPT_ID, id, () -> deptService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门id
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @param deptNames 部门名
|
||||
* @return 部门id
|
||||
*/
|
||||
public static String getDeptIds(String tenantId, String deptNames) {
|
||||
return CacheUtil.get(SYS_CACHE, DEPT_NAME, tenantId + StringPool.DASH + deptNames, () -> deptService.getDeptIds(tenantId, deptNames));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门id
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @param deptNames 部门名模糊查询
|
||||
* @return 部门id
|
||||
*/
|
||||
public static String getDeptIdsByFuzzy(String tenantId, String deptNames) {
|
||||
return CacheUtil.get(SYS_CACHE, DEPT_NAME_FUZZY, tenantId + StringPool.DASH + deptNames, () -> deptService.getDeptIdsByFuzzy(tenantId, deptNames));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门名
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 部门名
|
||||
*/
|
||||
public static String getDeptName(Long id) {
|
||||
return CacheUtil.get(SYS_CACHE, DEPT_NAME_ID, id, () -> deptService.getById(id).getDeptName());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取部门名集合
|
||||
*
|
||||
* @param deptIds 主键集合
|
||||
* @return 部门名
|
||||
*/
|
||||
public static List<String> getDeptNames(String deptIds) {
|
||||
return CacheUtil.get(SYS_CACHE, DEPT_NAMES_ID, deptIds, () -> deptService.getDeptNames(deptIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取子部门集合
|
||||
*
|
||||
* @param deptId 主键
|
||||
* @return 子部门
|
||||
*/
|
||||
public static List<Dept> getDeptChild(Long deptId) {
|
||||
return CacheUtil.get(SYS_CACHE, DEPT_CHILD_ID, deptId, () -> deptService.getDeptChild(deptId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取子部门ID集合
|
||||
*
|
||||
* @param deptId 主键
|
||||
* @return 子部门ID
|
||||
*/
|
||||
public static List<Long> getDeptChildIds(Long deptId) {
|
||||
if (deptId == null) {
|
||||
return null;
|
||||
}
|
||||
List<Long> deptIdList = CacheUtil.get(SYS_CACHE, DEPT_CHILDIDS_ID, deptId, List.class);
|
||||
if (deptIdList == null) {
|
||||
deptIdList = new ArrayList<>();
|
||||
List<Dept> deptChild = getDeptChild(deptId);
|
||||
if (deptChild != null) {
|
||||
List<Long> collect = deptChild.stream().map(Dept::getId).collect(Collectors.toList());
|
||||
deptIdList.addAll(collect);
|
||||
}
|
||||
deptIdList.add(deptId);
|
||||
CacheUtil.put(SYS_CACHE, DEPT_CHILDIDS_ID, deptId, deptIdList);
|
||||
}
|
||||
return deptIdList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取岗位
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
public static Post getPost(Long id) {
|
||||
return CacheUtil.get(SYS_CACHE, POST_ID, id, () -> postService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取岗位id
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @param postNames 岗位名
|
||||
* @return
|
||||
*/
|
||||
public static String getPostIds(String tenantId, String postNames) {
|
||||
return CacheUtil.get(SYS_CACHE, POST_NAME, tenantId + StringPool.DASH + postNames, () -> postService.getPostIds(tenantId, postNames));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取岗位id
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @param postNames 岗位名模糊查询
|
||||
* @return
|
||||
*/
|
||||
public static String getPostIdsByFuzzy(String tenantId, String postNames) {
|
||||
return CacheUtil.get(SYS_CACHE, POST_NAME_FUZZY, tenantId + StringPool.DASH + postNames, () -> postService.getPostIdsByFuzzy(tenantId, postNames));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取岗位名
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 岗位名
|
||||
*/
|
||||
public static String getPostName(Long id) {
|
||||
return CacheUtil.get(SYS_CACHE, POST_NAME_ID, id, () -> postService.getById(id).getPostName());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取岗位名集合
|
||||
*
|
||||
* @param postIds 主键集合
|
||||
* @return 岗位名
|
||||
*/
|
||||
public static List<String> getPostNames(String postIds) {
|
||||
return CacheUtil.get(SYS_CACHE, POST_NAMES_ID, postIds, () -> postService.getPostNames(postIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色
|
||||
*
|
||||
* @param id 主键
|
||||
* @return Role
|
||||
*/
|
||||
public static Role getRole(Long id) {
|
||||
return CacheUtil.get(SYS_CACHE, ROLE_ID, id, () -> roleService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色id
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @param roleNames 角色名
|
||||
* @return
|
||||
*/
|
||||
public static String getRoleIds(String tenantId, String roleNames) {
|
||||
return CacheUtil.get(SYS_CACHE, ROLE_NAME, tenantId + StringPool.DASH + roleNames, () -> roleService.getRoleIds(tenantId, roleNames));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色名
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 角色名
|
||||
*/
|
||||
public static String getRoleName(Long id) {
|
||||
return CacheUtil.get(SYS_CACHE, ROLE_NAME_ID, id, () -> roleService.getById(id).getRoleName());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色名集合
|
||||
*
|
||||
* @param roleIds 主键集合
|
||||
* @return 角色名
|
||||
*/
|
||||
public static List<String> getRoleNames(String roleIds) {
|
||||
return CacheUtil.get(SYS_CACHE, ROLE_NAMES_ID, roleIds, () -> roleService.getRoleNames(roleIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色别名
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 角色别名
|
||||
*/
|
||||
public static String getRoleAlias(Long id) {
|
||||
return CacheUtil.get(SYS_CACHE, ROLE_ALIAS_ID, id, () -> roleService.getById(id).getRoleAlias());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色别名集合
|
||||
*
|
||||
* @param roleIds 主键集合
|
||||
* @return 角色别名
|
||||
*/
|
||||
public static List<String> getRoleAliases(String roleIds) {
|
||||
return CacheUtil.get(SYS_CACHE, ROLE_ALIASES_ID, roleIds, () -> roleService.getRoleAliases(roleIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取租户
|
||||
*
|
||||
* @param id 主键
|
||||
* @return Tenant
|
||||
*/
|
||||
public static Tenant getTenant(Long id) {
|
||||
return CacheUtil.get(SYS_CACHE, TENANT_ID, id, () -> Optional.ofNullable(tenantService.getById(id))
|
||||
.filter(tenant -> tenant.getStatus() != null)
|
||||
.filter(tenant -> tenant.getStatus() == StatusType.ACTIVE.getType())
|
||||
.orElse(null), Boolean.FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取租户
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @return Tenant
|
||||
*/
|
||||
public static Tenant getTenant(String tenantId) {
|
||||
return CacheUtil.get(SYS_CACHE, TENANT_TENANT_ID, tenantId, () -> Optional.ofNullable(tenantService.getByTenantId(tenantId))
|
||||
.filter(tenant -> tenant.getStatus() != null)
|
||||
.filter(tenant -> tenant.getStatus() == StatusType.ACTIVE.getType())
|
||||
.orElse(null), Boolean.FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取租户产品包
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @return Tenant
|
||||
*/
|
||||
public static TenantPackage getTenantPackage(String tenantId) {
|
||||
Tenant tenant = getTenant(tenantId);
|
||||
return CacheUtil.get(SYS_CACHE, TENANT_PACKAGE_ID, tenantId, () -> tenantPackageService.getById(tenant.getPackageId()), Boolean.FALSE);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.cache;
|
||||
|
||||
import org.springblade.core.cache.utils.CacheUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.core.tool.utils.SpringUtil;
|
||||
import org.springblade.core.tool.utils.StringPool;
|
||||
import org.springblade.core.tool.utils.StringUtil;
|
||||
import org.springblade.modules.system.pojo.entity.User;
|
||||
import org.springblade.modules.system.service.IUserService;
|
||||
|
||||
import static org.springblade.core.cache.constant.CacheConstant.USER_CACHE;
|
||||
import static org.springblade.core.launch.constant.FlowConstant.TASK_USR_PREFIX;
|
||||
|
||||
/**
|
||||
* 系统缓存
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class UserCache {
|
||||
private static final String USER_CACHE_ID = "user:id:";
|
||||
private static final String USER_CACHE_ACCOUNT = "user:account:";
|
||||
|
||||
private static final IUserService userService;
|
||||
|
||||
static {
|
||||
userService = SpringUtil.getBean(IUserService.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据任务用户id获取用户信息
|
||||
*
|
||||
* @param taskUserId 任务用户id
|
||||
* @return
|
||||
*/
|
||||
public static User getUserByTaskUser(String taskUserId) {
|
||||
Long userId = Func.toLong(StringUtil.removePrefix(taskUserId, TASK_USR_PREFIX));
|
||||
return getUser(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @return
|
||||
*/
|
||||
public static User getUser(Long userId) {
|
||||
return CacheUtil.get(USER_CACHE, USER_CACHE_ID, userId, () -> userService.getById(userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @param account 账号名
|
||||
* @return
|
||||
*/
|
||||
public static User getUser(String tenantId, String account) {
|
||||
return CacheUtil.get(USER_CACHE, USER_CACHE_ACCOUNT, tenantId + StringPool.DASH + account, () -> userService.userByAccount(tenantId, account));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.config;
|
||||
|
||||
|
||||
import org.springblade.core.launch.constant.AppConstant;
|
||||
import org.springblade.core.oauth2.endpoint.OAuth2SocialEndpoint;
|
||||
import org.springblade.core.oauth2.endpoint.OAuth2TokenEndPoint;
|
||||
import org.springblade.core.secure.provider.HttpMethod;
|
||||
import org.springblade.core.secure.registry.SecureRegistry;
|
||||
import org.springblade.core.tool.utils.StringPool;
|
||||
import org.springblade.modules.auth.endpoint.Oauth2SmsEndpoint;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
/**
|
||||
* Blade配置
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class BladeConfiguration implements WebMvcConfigurer {
|
||||
|
||||
/**
|
||||
* 安全框架配置
|
||||
*/
|
||||
@Bean
|
||||
public SecureRegistry secureRegistry() {
|
||||
return new SecureRegistry()
|
||||
// 开启认证配置
|
||||
.enabled()
|
||||
// 令牌严格模式配置
|
||||
.strictTokenEnabled()
|
||||
// 请求头严格模式配置
|
||||
.strictHeaderEnabled()
|
||||
// 认证放行配置
|
||||
.skipUrls(
|
||||
"/blade-auth/**",
|
||||
"/blade-system/tenant/info",
|
||||
"/blade-flow/process/resource-view",
|
||||
"/blade-flow/process/diagram-view",
|
||||
"/blade-flow/manager/check-upload",
|
||||
"/blade-resource/sms/endpoint/send-validate",
|
||||
"/doc.html",
|
||||
"/swagger-ui.html",
|
||||
"/static/**",
|
||||
"/webjars/**",
|
||||
"/swagger-resources/**",
|
||||
"/druid/**"
|
||||
)
|
||||
// 认证鉴权配置
|
||||
.authEnabled()
|
||||
.addAuthPattern(HttpMethod.ALL, "/blade-chat/message/**", "hasAuth()")
|
||||
.addAuthPattern(HttpMethod.POST, "/blade-desk/dashboard/upload", "hasTimeAuth(9, 17)")
|
||||
.addAuthPattern(HttpMethod.POST, "/blade-desk/dashboard/submit", "hasAnyRole('administrator', 'admin', 'user')")
|
||||
// 基础认证配置
|
||||
.basicEnabled()
|
||||
.addBasicPattern(HttpMethod.POST, "/blade-desk/dashboard/info", "blade", "blade")
|
||||
// 签名认证配置
|
||||
.signDisabled()
|
||||
.addSignPattern(HttpMethod.POST, "/blade-desk/dashboard/sign", "sha1");
|
||||
}
|
||||
|
||||
/**
|
||||
* 跨域配置
|
||||
*/
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/cors/**")
|
||||
.allowedOriginPatterns("*")
|
||||
.allowedHeaders("*")
|
||||
.allowedMethods("*")
|
||||
.maxAge(3600)
|
||||
.allowCredentials(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 给OAuth2服务端添加前缀
|
||||
*/
|
||||
@Override
|
||||
public void configurePathMatch(PathMatchConfigurer configurer) {
|
||||
configurer.addPathPrefix(StringPool.SLASH + AppConstant.APPLICATION_AUTH_NAME,
|
||||
c -> c.isAnnotationPresent(RestController.class) && (
|
||||
OAuth2TokenEndPoint.class.equals(c) || OAuth2SocialEndpoint.class.equals(c) || Oauth2SmsEndpoint.class.equals(c))
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
|
||||
package org.springblade.common.config;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.common.handler.BladePermissionHandler;
|
||||
import org.springblade.common.handler.BladeRecordHandler;
|
||||
import org.springblade.common.handler.BladeScopeModelHandler;
|
||||
import org.springblade.core.datarecord.processor.DataRecordHandler;
|
||||
import org.springblade.core.datascope.handler.ScopeModelHandler;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
|
||||
/**
|
||||
* Blade处理器自动配置
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@AllArgsConstructor
|
||||
public class BladeHandlerConfiguration {
|
||||
|
||||
private final JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Bean
|
||||
public DataRecordHandler dataRecordHandler() {
|
||||
return new BladeRecordHandler(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ScopeModelHandler scopeModelHandler() {
|
||||
return new BladeScopeModelHandler(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public BladePermissionHandler permissionHandler() {
|
||||
return new BladePermissionHandler(jdbcTemplate);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
|
||||
package org.springblade.common.config;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.common.event.ApiLogListener;
|
||||
import org.springblade.common.event.ErrorLogListener;
|
||||
import org.springblade.common.event.UsualLogListener;
|
||||
import org.springblade.core.launch.props.BladeProperties;
|
||||
import org.springblade.core.launch.server.ServerInfo;
|
||||
import org.springblade.modules.system.service.ILogService;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* 日志工具自动配置
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@AllArgsConstructor
|
||||
public class BladeLogConfiguration {
|
||||
|
||||
private final ILogService logService;
|
||||
private final ServerInfo serverInfo;
|
||||
private final BladeProperties bladeProperties;
|
||||
|
||||
@Bean(name = "apiLogListener")
|
||||
public ApiLogListener apiLogListener() {
|
||||
return new ApiLogListener(logService, serverInfo, bladeProperties);
|
||||
}
|
||||
|
||||
@Bean(name = "errorEventListener")
|
||||
public ErrorLogListener errorEventListener() {
|
||||
return new ErrorLogListener(logService, serverInfo, bladeProperties);
|
||||
}
|
||||
|
||||
@Bean(name = "usualEventListener")
|
||||
public UsualLogListener usualEventListener() {
|
||||
return new UsualLogListener(logService, serverInfo, bladeProperties);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.config;
|
||||
|
||||
import org.springblade.core.report.datasource.ReportDataSource;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
/**
|
||||
* 报表配置类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(value = "report.enabled", havingValue = "true", matchIfMissing = true)
|
||||
public class BladeReportConfiguration {
|
||||
|
||||
/**
|
||||
* 自定义报表可选数据源
|
||||
*/
|
||||
@Bean
|
||||
public ReportDataSource reportDataSource(DataSource dataSource) {
|
||||
return new ReportDataSource(dataSource);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.config;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.launch.constant.AppConstant;
|
||||
import org.springdoc.core.models.GroupedOpenApi;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* Swagger配置类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@AllArgsConstructor
|
||||
@ConditionalOnProperty(value = "swagger.enabled", havingValue = "true", matchIfMissing = true)
|
||||
public class SwaggerConfiguration {
|
||||
|
||||
@Bean
|
||||
public GroupedOpenApi authApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("授权模块")
|
||||
.packagesToScan(AppConstant.BASE_PACKAGES + ".core.oauth2", AppConstant.BASE_PACKAGES + ".modules.auth")
|
||||
.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public GroupedOpenApi sysApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("系统模块")
|
||||
.packagesToScan(AppConstant.BASE_PACKAGES + ".modules.system", AppConstant.BASE_PACKAGES + ".modules.resource")
|
||||
.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public GroupedOpenApi flowApi() {
|
||||
// 创建并返回GroupedOpenApi对象
|
||||
return GroupedOpenApi.builder()
|
||||
.group("工作流模块")
|
||||
.packagesToScan(AppConstant.BASE_PACKAGES + ".flow")
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.constant;
|
||||
|
||||
import org.springblade.core.launch.constant.AppConstant;
|
||||
|
||||
/**
|
||||
* 通用常量
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface CommonConstant {
|
||||
|
||||
/**
|
||||
* app name
|
||||
*/
|
||||
String APPLICATION_NAME = AppConstant.APPLICATION_NAME_PREFIX + "api";
|
||||
|
||||
/**
|
||||
* sword 系统名
|
||||
*/
|
||||
String SWORD_NAME = "sword";
|
||||
|
||||
/**
|
||||
* saber 系统名
|
||||
*/
|
||||
String SABER_NAME = "saber";
|
||||
|
||||
/**
|
||||
* 顶级父节点id
|
||||
*/
|
||||
Long TOP_PARENT_ID = 0L;
|
||||
|
||||
/**
|
||||
* 顶级父节点名称
|
||||
*/
|
||||
String TOP_PARENT_NAME = "顶级";
|
||||
|
||||
/**
|
||||
* 未封存状态值
|
||||
*/
|
||||
Integer NOT_SEALED_ID = 0;
|
||||
|
||||
/**
|
||||
* 默认密码
|
||||
*/
|
||||
String DEFAULT_PASSWORD = "123456";
|
||||
|
||||
/**
|
||||
* 默认密码参数值
|
||||
*/
|
||||
String DEFAULT_PARAM_PASSWORD = "account.initPassword";
|
||||
|
||||
/**
|
||||
* 默认排序字段
|
||||
*/
|
||||
String SORT_FIELD = "sort";
|
||||
|
||||
/**
|
||||
* 数据权限类型
|
||||
*/
|
||||
Integer DATA_SCOPE_CATEGORY = 1;
|
||||
|
||||
/**
|
||||
* 接口权限类型
|
||||
*/
|
||||
Integer API_SCOPE_CATEGORY = 2;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.constant;
|
||||
|
||||
/**
|
||||
* 字典常量.
|
||||
*
|
||||
* @author zhuangqian
|
||||
*/
|
||||
public interface DictConstant {
|
||||
|
||||
String SEX_CODE = "sex";
|
||||
|
||||
String NOTICE_CODE = "notice";
|
||||
|
||||
String MENU_CATEGORY_CODE = "menu_category";
|
||||
|
||||
String BUTTON_FUNC_CODE = "button_func";
|
||||
|
||||
String YES_NO_CODE = "yes_no";
|
||||
|
||||
String FLOW_CATEGORY_CODE = "flow_category";
|
||||
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.constant;
|
||||
|
||||
import org.springblade.core.launch.constant.AppConstant;
|
||||
|
||||
/**
|
||||
* 启动常量
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface LauncherConstant {
|
||||
|
||||
/**
|
||||
* sentinel dev 地址
|
||||
*/
|
||||
String SENTINEL_DEV_ADDR = "127.0.0.1:8858";
|
||||
|
||||
/**
|
||||
* sentinel prod 地址
|
||||
*/
|
||||
String SENTINEL_PROD_ADDR = "10.211.55.5:8858";
|
||||
|
||||
/**
|
||||
* sentinel test 地址
|
||||
*/
|
||||
String SENTINEL_TEST_ADDR = "172.30.0.58:8858";
|
||||
|
||||
/**
|
||||
* elk dev 地址
|
||||
*/
|
||||
String ELK_DEV_ADDR = "127.0.0.1:9000";
|
||||
|
||||
/**
|
||||
* elk prod 地址
|
||||
*/
|
||||
String ELK_PROD_ADDR = "172.30.0.58:9000";
|
||||
|
||||
/**
|
||||
* elk test 地址
|
||||
*/
|
||||
String ELK_TEST_ADDR = "172.30.0.58:9000";
|
||||
|
||||
/**
|
||||
* 动态获取sentinel地址
|
||||
*
|
||||
* @param profile 环境变量
|
||||
* @return addr
|
||||
*/
|
||||
static String sentinelAddr(String profile) {
|
||||
return switch (profile) {
|
||||
case (AppConstant.PROD_CODE) -> SENTINEL_PROD_ADDR;
|
||||
case (AppConstant.TEST_CODE) -> SENTINEL_TEST_ADDR;
|
||||
default -> SENTINEL_DEV_ADDR;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 动态获取elk地址
|
||||
*
|
||||
* @param profile 环境变量
|
||||
* @return addr
|
||||
*/
|
||||
static String elkAddr(String profile) {
|
||||
return switch (profile) {
|
||||
case (AppConstant.PROD_CODE) -> ELK_PROD_ADDR;
|
||||
case (AppConstant.TEST_CODE) -> ELK_TEST_ADDR;
|
||||
default -> ELK_DEV_ADDR;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.constant;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 租户常量
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface TenantConstant {
|
||||
|
||||
/**
|
||||
* 租户默认密码KEY
|
||||
*/
|
||||
String PASSWORD_KEY = "tenant.default.password";
|
||||
|
||||
/**
|
||||
* 租户默认账号额度KEY
|
||||
*/
|
||||
String ACCOUNT_NUMBER_KEY = "tenant.default.accountNumber";
|
||||
|
||||
/**
|
||||
* 租户默认菜单集合KEY
|
||||
*/
|
||||
String ACCOUNT_MENU_CODE_KEY = "tenant.default.menuCode";
|
||||
|
||||
/**
|
||||
* 租户默认密码
|
||||
*/
|
||||
String DEFAULT_PASSWORD = "123456";
|
||||
|
||||
/**
|
||||
* 租户授权码默认16位密钥
|
||||
*/
|
||||
String DES_KEY = "0000000000000000";
|
||||
|
||||
/**
|
||||
* 租户默认账号额度
|
||||
*/
|
||||
Integer DEFAULT_ACCOUNT_NUMBER = -1;
|
||||
|
||||
/**
|
||||
* 租户默认菜单集合
|
||||
*/
|
||||
List<String> MENU_CODES = Arrays.asList(
|
||||
"desk", "flow", "work", "monitor", "resource", "role", "user", "dept", "dictbiz", "topmenu"
|
||||
);
|
||||
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 业务字典枚举类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum DictBizEnum {
|
||||
|
||||
/**
|
||||
* 测试
|
||||
*/
|
||||
TEST("test"),
|
||||
;
|
||||
|
||||
final String name;
|
||||
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 系统字典枚举类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum DictEnum {
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
SEX("sex"),
|
||||
/**
|
||||
* 通知类型
|
||||
*/
|
||||
NOTICE("notice"),
|
||||
/**
|
||||
* 菜单类型
|
||||
*/
|
||||
MENU_CATEGORY("menu_category"),
|
||||
/**
|
||||
* 按钮功能
|
||||
*/
|
||||
BUTTON_FUNC("button_func"),
|
||||
/**
|
||||
* 是否
|
||||
*/
|
||||
YES_NO("yes_no"),
|
||||
/**
|
||||
* 流程类型
|
||||
*/
|
||||
FLOW("flow"),
|
||||
/**
|
||||
* 机构类型
|
||||
*/
|
||||
ORG_CATEGORY("org_category"),
|
||||
/**
|
||||
* 数据权限
|
||||
*/
|
||||
DATA_SCOPE_TYPE("data_scope_type"),
|
||||
/**
|
||||
* 接口权限
|
||||
*/
|
||||
API_SCOPE_TYPE("api_scope_type"),
|
||||
/**
|
||||
* 权限类型
|
||||
*/
|
||||
SCOPE_CATEGORY("scope_category"),
|
||||
/**
|
||||
* 对象存储类型
|
||||
*/
|
||||
OSS("oss"),
|
||||
/**
|
||||
* 短信服务类型
|
||||
*/
|
||||
SMS("sms"),
|
||||
/**
|
||||
* 岗位类型
|
||||
*/
|
||||
POST_CATEGORY("post_category"),
|
||||
/**
|
||||
* 行政区划
|
||||
*/
|
||||
REGION("region"),
|
||||
/**
|
||||
* 用户平台
|
||||
*/
|
||||
USER_TYPE("user_type"),
|
||||
;
|
||||
|
||||
final String name;
|
||||
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
|
||||
package org.springblade.common.event;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springblade.core.launch.props.BladeProperties;
|
||||
import org.springblade.core.launch.server.ServerInfo;
|
||||
import org.springblade.core.log.constant.EventConstant;
|
||||
import org.springblade.core.log.event.ApiLogEvent;
|
||||
import org.springblade.core.log.model.LogApi;
|
||||
import org.springblade.core.log.utils.LogAbstractUtil;
|
||||
import org.springblade.modules.system.service.ILogService;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 异步监听日志事件
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class ApiLogListener {
|
||||
|
||||
private final ILogService logService;
|
||||
private final ServerInfo serverInfo;
|
||||
private final BladeProperties bladeProperties;
|
||||
|
||||
|
||||
@Async
|
||||
@Order
|
||||
@EventListener(ApiLogEvent.class)
|
||||
public void saveApiLog(ApiLogEvent event) {
|
||||
Map<String, Object> source = (Map<String, Object>) event.getSource();
|
||||
LogApi logApi = (LogApi) source.get(EventConstant.EVENT_LOG);
|
||||
LogAbstractUtil.addOtherInfoToLog(logApi, bladeProperties, serverInfo);
|
||||
logService.saveApiLog(logApi);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.event;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springblade.core.launch.props.BladeProperties;
|
||||
import org.springblade.core.launch.server.ServerInfo;
|
||||
import org.springblade.core.log.constant.EventConstant;
|
||||
import org.springblade.core.log.event.ErrorLogEvent;
|
||||
import org.springblade.core.log.model.LogError;
|
||||
import org.springblade.core.log.utils.LogAbstractUtil;
|
||||
import org.springblade.modules.system.service.ILogService;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 异步监听错误日志事件
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class ErrorLogListener {
|
||||
|
||||
private final ILogService logService;
|
||||
private final ServerInfo serverInfo;
|
||||
private final BladeProperties bladeProperties;
|
||||
|
||||
@Async
|
||||
@Order
|
||||
@EventListener(ErrorLogEvent.class)
|
||||
public void saveErrorLog(ErrorLogEvent event) {
|
||||
try {
|
||||
Map<String, Object> source = (Map<String, Object>) event.getSource();
|
||||
LogError logError = (LogError) source.get(EventConstant.EVENT_LOG);
|
||||
LogAbstractUtil.addOtherInfoToLog(logError, bladeProperties, serverInfo);
|
||||
logService.saveErrorLog(logError);
|
||||
} catch (Exception e) {
|
||||
// 可以根据需要进行更多的异常处理,例如发送警报等
|
||||
log.error("保存错误日志时发生异常", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.event;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springblade.core.launch.props.BladeProperties;
|
||||
import org.springblade.core.launch.server.ServerInfo;
|
||||
import org.springblade.core.log.constant.EventConstant;
|
||||
import org.springblade.core.log.event.UsualLogEvent;
|
||||
import org.springblade.core.log.model.LogUsual;
|
||||
import org.springblade.core.log.utils.LogAbstractUtil;
|
||||
import org.springblade.modules.system.service.ILogService;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 异步监听日志事件
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class UsualLogListener {
|
||||
|
||||
private final ILogService logService;
|
||||
private final ServerInfo serverInfo;
|
||||
private final BladeProperties bladeProperties;
|
||||
|
||||
@Async
|
||||
@Order
|
||||
@EventListener(UsualLogEvent.class)
|
||||
public void saveUsualLog(UsualLogEvent event) {
|
||||
Map<String, Object> source = (Map<String, Object>) event.getSource();
|
||||
LogUsual logUsual = (LogUsual) source.get(EventConstant.EVENT_LOG);
|
||||
LogAbstractUtil.addOtherInfoToLog(logUsual, bladeProperties, serverInfo);
|
||||
logService.saveUsualLog(logUsual);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,170 +0,0 @@
|
||||
package org.springblade.common.handler;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.cache.utils.CacheUtil;
|
||||
import org.springblade.core.secure.BladeUser;
|
||||
import org.springblade.core.secure.handler.IPermissionHandler;
|
||||
import org.springblade.core.secure.provider.PermissionMenu;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.core.tool.utils.StringPool;
|
||||
import org.springblade.core.tool.utils.WebUtil;
|
||||
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
|
||||
import static org.springblade.core.secure.constant.PermissionConstant.*;
|
||||
|
||||
/**
|
||||
* 默认授权校验类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
//若开启动态数据源功能,则加上@Master注解指定权限数据库为主库
|
||||
//@Master
|
||||
@AllArgsConstructor
|
||||
public class BladePermissionHandler implements IPermissionHandler {
|
||||
|
||||
private static final String SCOPE_CACHE_ROLE = "apiScope:role:";
|
||||
|
||||
private static final String SCOPE_CACHE_CODE = "apiScope:code:";
|
||||
|
||||
private static final String SCOPE_CACHE_MENU = "apiScope:menu:";
|
||||
|
||||
private static final String SCOPE_CACHE_ALL_MENU = "apiScope:allMenu:permission";
|
||||
|
||||
private final JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public boolean permissionAll() {
|
||||
HttpServletRequest request = WebUtil.getRequest();
|
||||
BladeUser user = AuthUtil.getUser();
|
||||
if (request == null || user == null) {
|
||||
return false;
|
||||
}
|
||||
String uri = request.getRequestURI();
|
||||
List<String> paths = permissionPath(user.getRoleId());
|
||||
if (paths.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
return paths.stream().anyMatch(uri::contains);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(String permission) {
|
||||
HttpServletRequest request = WebUtil.getRequest();
|
||||
BladeUser user = AuthUtil.getUser();
|
||||
if (request == null || user == null) {
|
||||
return false;
|
||||
}
|
||||
List<String> codes = permissionCode(permission, user.getRoleId());
|
||||
return !codes.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasMenu(String permission) {
|
||||
HttpServletRequest request = WebUtil.getRequest();
|
||||
BladeUser user = AuthUtil.getUser();
|
||||
if (request == null || user == null) {
|
||||
return false;
|
||||
}
|
||||
if (AuthUtil.isAdministrator()) {
|
||||
return true;
|
||||
}
|
||||
List<String> codes = permissionMenu(permission, user.getRoleId());
|
||||
return !codes.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取接口权限地址
|
||||
*
|
||||
* @param roleId 角色id
|
||||
* @return permissions
|
||||
*/
|
||||
private List<String> permissionPath(String roleId) {
|
||||
List<String> permissions = CacheUtil.get(SYS_CACHE, SCOPE_CACHE_ROLE, roleId, List.class, Boolean.FALSE);
|
||||
if (permissions == null) {
|
||||
List<Long> roleIds = Func.toLongList(roleId);
|
||||
permissions = jdbcTemplate.queryForList(permissionAllStatement(roleIds.size()), String.class, roleIds.toArray());
|
||||
CacheUtil.put(SYS_CACHE, SCOPE_CACHE_ROLE, roleId, permissions, Boolean.FALSE);
|
||||
}
|
||||
return permissions;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取接口权限信息
|
||||
*
|
||||
* @param permission 权限编号
|
||||
* @param roleId 角色id
|
||||
* @return permissions
|
||||
*/
|
||||
private List<String> permissionCode(String permission, String roleId) {
|
||||
List<String> permissions = CacheUtil.get(SYS_CACHE, SCOPE_CACHE_CODE, permission + StringPool.COLON + roleId, List.class, Boolean.FALSE);
|
||||
if (permissions == null) {
|
||||
List<Object> args = new ArrayList<>(Collections.singletonList(permission));
|
||||
List<Long> roleIds = Func.toLongList(roleId);
|
||||
args.addAll(roleIds);
|
||||
permissions = jdbcTemplate.queryForList(permissionCodeStatement(roleIds.size()), String.class, args.toArray());
|
||||
CacheUtil.put(SYS_CACHE, SCOPE_CACHE_CODE, permission + StringPool.COLON + roleId, permissions, Boolean.FALSE);
|
||||
}
|
||||
return permissions;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取菜单权限信息
|
||||
*
|
||||
* @param permission 菜单编号
|
||||
* @param roleId 角色id
|
||||
* @return permissions
|
||||
*/
|
||||
private List<String> permissionMenu(String permission, String roleId) {
|
||||
List<String> permissions = CacheUtil.get(SYS_CACHE, SCOPE_CACHE_MENU, permission + StringPool.COLON + roleId, List.class, Boolean.FALSE);
|
||||
if (permissions == null) {
|
||||
// 获取所有菜单
|
||||
List<PermissionMenu> allMenus = permissionAllMenu();
|
||||
// 获取角色菜单
|
||||
List<Long> roleIds = Func.toLongList(roleId);
|
||||
List<PermissionMenu> roleIdMenus = jdbcTemplate.query(permissionMenuStatement(roleIds.size()), new BeanPropertyRowMapper<>(PermissionMenu.class), roleIds.toArray());
|
||||
// 反向递归角色菜单所有父级
|
||||
List<PermissionMenu> routes = new LinkedList<>(roleIdMenus);
|
||||
roleIdMenus.forEach(roleMenu -> recursion(allMenus, routes, roleMenu));
|
||||
// 获取匹配的菜单权限值
|
||||
permissions = routes.stream().map(PermissionMenu::getCode).filter(code -> Func.equals(code, permission)).collect(Collectors.toList());
|
||||
// 写入缓存值
|
||||
CacheUtil.put(SYS_CACHE, SCOPE_CACHE_MENU, permission + StringPool.COLON + roleId, permissions, Boolean.FALSE);
|
||||
}
|
||||
return permissions;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有菜单权限信息
|
||||
*/
|
||||
private List<PermissionMenu> permissionAllMenu() {
|
||||
List<PermissionMenu> permissions = CacheUtil.get(SYS_CACHE, SCOPE_CACHE_ALL_MENU, StringPool.EMPTY, List.class, Boolean.FALSE);
|
||||
if (permissions == null) {
|
||||
permissions = jdbcTemplate.query(permissionAllMenuStatement(), new BeanPropertyRowMapper<>(PermissionMenu.class));
|
||||
CacheUtil.put(SYS_CACHE, SCOPE_CACHE_ALL_MENU, StringPool.EMPTY, permissions, Boolean.FALSE);
|
||||
}
|
||||
return permissions;
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归获取菜单父级
|
||||
*
|
||||
* @param allMenus 所有菜单合集
|
||||
* @param routes 角色分配的菜单合集
|
||||
* @param roleMenu 当前菜单
|
||||
*/
|
||||
private void recursion(List<PermissionMenu> allMenus, List<PermissionMenu> routes, PermissionMenu roleMenu) {
|
||||
Optional<PermissionMenu> menu = allMenus.stream().filter(x -> Func.equals(x.getId(), roleMenu.getParentId())).findFirst();
|
||||
if (menu.isPresent() && !routes.contains(menu.get())) {
|
||||
routes.add(menu.get());
|
||||
recursion(allMenus, routes, menu.get());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,178 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.handler;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springblade.core.datarecord.annotation.DataRecord;
|
||||
import org.springblade.core.datarecord.annotation.DataRecordLevel;
|
||||
import org.springblade.core.datarecord.model.DataRecordInfo;
|
||||
import org.springblade.core.datarecord.processor.DataRecordHandler;
|
||||
import org.springblade.core.tool.constant.BladeConstant;
|
||||
import org.springblade.core.tool.jackson.JsonUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
|
||||
import static org.springblade.core.datarecord.constant.DataRecordConstant.RECORD_INSERT_SQL;
|
||||
|
||||
/**
|
||||
* 日志数据审计处理器
|
||||
* <p>
|
||||
* 将数据审计输出到日志
|
||||
*
|
||||
* @author BladeX
|
||||
*/
|
||||
//若开启动态数据源功能,则加上@Master注解指定权限数据库为主库
|
||||
//@Master
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class BladeRecordHandler implements DataRecordHandler {
|
||||
|
||||
private final JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public void handle(DataRecordInfo recordInfo, DataRecord dataRecord) {
|
||||
// 获取格式化的记录信息
|
||||
String recordMessage = formatRecordInfo(recordInfo);
|
||||
// 获取数据审计级别
|
||||
DataRecordLevel level = dataRecord.level();
|
||||
|
||||
// 数据审计入库处理
|
||||
int affectedRows = saveRecordData(recordInfo, level.name(), recordMessage);
|
||||
if (affectedRows > 0) {
|
||||
// 根据配置的日志级别输出
|
||||
switch (level) {
|
||||
case DEBUG:
|
||||
log.debug("数据审计[{}]: {}", recordInfo.getModule(), recordMessage);
|
||||
break;
|
||||
case INFO:
|
||||
log.info("数据审计[{}]: {}", recordInfo.getModule(), recordMessage);
|
||||
break;
|
||||
case WARN:
|
||||
log.warn("数据审计[{}]: {}", recordInfo.getModule(), recordMessage);
|
||||
break;
|
||||
case ERROR:
|
||||
log.error("数据审计[{}]: {}", recordInfo.getModule(), recordMessage);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// 如果入库失败,记录错误日志
|
||||
log.error("数据审计[{}] 保存入库失败", recordInfo.getTableName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化记录信息
|
||||
*
|
||||
* @param recordInfo 记录信息
|
||||
* @return 格式化后的字符串
|
||||
*/
|
||||
private String formatRecordInfo(DataRecordInfo recordInfo) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
// 添加模块信息
|
||||
sb.append("\n").append("[表名]: ").append(recordInfo.getTableName()).append("\n");
|
||||
sb.append("[操作]: ").append(recordInfo.getOperation()).append("\n");
|
||||
if (recordInfo.getPrimaryKeyValue() != null) {
|
||||
sb.append("[主键]: ").append(recordInfo.getPrimaryKeyValue()).append("\n");
|
||||
}
|
||||
// 添加用户信息
|
||||
if (recordInfo.getUserName() != null) {
|
||||
sb.append("[用户]: ").append(recordInfo.getUserName()).append("\n");
|
||||
}
|
||||
// 添加IP信息
|
||||
if (recordInfo.getRemoteIp() != null) {
|
||||
sb.append("[IP]: ").append(recordInfo.getRemoteIp()).append("\n");
|
||||
}
|
||||
// 添加请求URI
|
||||
if (recordInfo.getRequestUri() != null) {
|
||||
sb.append("[URI]: ").append(recordInfo.getRequestUri()).append("\n");
|
||||
}
|
||||
if (recordInfo.getChangedFields() != null && !recordInfo.getChangedFields().isEmpty()) {
|
||||
sb.append("[变更]: ").append(recordInfo.getChangedFields()).append("\n");
|
||||
}
|
||||
if (recordInfo.getCost() != null) {
|
||||
sb.append("[耗时]: ").append(recordInfo.getCost()).append("ms").append("\n");
|
||||
}
|
||||
// 如果需要详细信息,添加变更详情
|
||||
if (recordInfo.getChangeData() != null && !recordInfo.getChangeData().isEmpty()) {
|
||||
sb.append("[详情]: {");
|
||||
recordInfo.getChangeData().forEach((field, change) -> sb.append(change.getChangeDescription()).append(", "));
|
||||
if (sb.toString().endsWith(", ")) {
|
||||
sb.setLength(sb.length() - 2);
|
||||
}
|
||||
sb.append("}");
|
||||
}
|
||||
return sb.append("\n").toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用 JdbcTemplate 保存数据审计记录
|
||||
*
|
||||
* @param recordInfo 记录信息
|
||||
* @param recordLevel 记录级别
|
||||
* @param recordMessage 记录消息
|
||||
* @return 影响的行数
|
||||
*/
|
||||
private int saveRecordData(DataRecordInfo recordInfo, String recordLevel, String recordMessage) {
|
||||
return jdbcTemplate.update(RECORD_INSERT_SQL,
|
||||
// 主键
|
||||
recordInfo.getRecordId(),
|
||||
// 基础服务信息
|
||||
recordInfo.getServiceId(),
|
||||
recordInfo.getServerHost(),
|
||||
recordInfo.getServerIp(),
|
||||
recordInfo.getEnv(),
|
||||
// 审计级别
|
||||
recordLevel,
|
||||
// 请求信息
|
||||
recordInfo.getMethod(),
|
||||
recordInfo.getRequestUri(),
|
||||
recordInfo.getUserAgent(),
|
||||
recordInfo.getRemoteIp(),
|
||||
// 操作信息
|
||||
recordInfo.getOperation(),
|
||||
recordInfo.getTableName(),
|
||||
// 数据转换:将 Map 转换为 JSON 字符串
|
||||
JsonUtil.toJson(recordInfo.getOldData()),
|
||||
JsonUtil.toJson(recordInfo.getNewData()),
|
||||
// 审计消息
|
||||
recordMessage,
|
||||
// 审计结果
|
||||
recordInfo.getRecordResult(),
|
||||
// 记录耗时
|
||||
Func.toStr(recordInfo.getCost()),
|
||||
// 记录时间
|
||||
recordInfo.getRecordTime(),
|
||||
// 记录人
|
||||
Func.toLong(recordInfo.getUserId()),
|
||||
// 业务状态:默认为正常状态
|
||||
BladeConstant.DB_STATUS_NORMAL,
|
||||
// 逻辑删除状态:默认为未删除状态
|
||||
BladeConstant.DB_NOT_DELETED
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,130 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.handler;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springblade.core.cache.utils.CacheUtil;
|
||||
import org.springblade.core.datascope.constant.DataScopeConstant;
|
||||
import org.springblade.core.datascope.handler.ScopeModelHandler;
|
||||
import org.springblade.core.datascope.model.DataScopeModel;
|
||||
import org.springblade.core.tool.utils.CollectionUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.core.tool.utils.StringPool;
|
||||
import org.springblade.core.tool.utils.StringUtil;
|
||||
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
|
||||
|
||||
/**
|
||||
* BladeScopeModelHandler
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
//若开启动态数据源功能,则加上@Master注解指定权限数据库为主库
|
||||
//@Master
|
||||
@RequiredArgsConstructor
|
||||
public class BladeScopeModelHandler implements ScopeModelHandler {
|
||||
|
||||
private static final String SCOPE_CACHE_CODE = "dataScope:code:";
|
||||
private static final String SCOPE_CACHE_CLASS = "dataScope:class:";
|
||||
private static final String DEPT_CACHE_ANCESTORS = "dept:ancestors:";
|
||||
private static final DataScopeModel SEARCHED_DATA_SCOPE_MODEL = new DataScopeModel(Boolean.TRUE);
|
||||
|
||||
private final JdbcTemplate jdbcTemplate;
|
||||
|
||||
/**
|
||||
* 获取数据权限
|
||||
*
|
||||
* @param mapperId 数据权限mapperId
|
||||
* @param roleId 用户角色集合
|
||||
* @return DataScopeModel
|
||||
*/
|
||||
@Override
|
||||
public DataScopeModel getDataScopeByMapper(String mapperId, String roleId) {
|
||||
List<Object> args = new ArrayList<>(Collections.singletonList(mapperId));
|
||||
List<Long> roleIds = Func.toLongList(roleId);
|
||||
args.addAll(roleIds);
|
||||
// 增加searched字段防止未配置的参数重复读库导致缓存击穿
|
||||
// 后续若有新增配置则会清空缓存重新加载
|
||||
DataScopeModel dataScope = CacheUtil.get(SYS_CACHE, SCOPE_CACHE_CLASS, mapperId + StringPool.COLON + roleId, DataScopeModel.class, Boolean.FALSE);
|
||||
if (dataScope == null || !dataScope.getSearched()) {
|
||||
List<DataScopeModel> list = jdbcTemplate.query(DataScopeConstant.dataByMapper(roleIds.size()), new BeanPropertyRowMapper<>(DataScopeModel.class), args.toArray());
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
dataScope = list.iterator().next();
|
||||
dataScope.setSearched(Boolean.TRUE);
|
||||
} else {
|
||||
dataScope = SEARCHED_DATA_SCOPE_MODEL;
|
||||
}
|
||||
CacheUtil.put(SYS_CACHE, SCOPE_CACHE_CLASS, mapperId + StringPool.COLON + roleId, dataScope, Boolean.FALSE);
|
||||
}
|
||||
return StringUtil.isNotBlank(dataScope.getResourceCode()) ? dataScope : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据权限
|
||||
*
|
||||
* @param code 数据权限资源编号
|
||||
* @return DataScopeModel
|
||||
*/
|
||||
@Override
|
||||
public DataScopeModel getDataScopeByCode(String code) {
|
||||
DataScopeModel dataScope = CacheUtil.get(SYS_CACHE, SCOPE_CACHE_CODE, code, DataScopeModel.class, Boolean.FALSE);
|
||||
// 增加searched字段防止未配置的参数重复读库导致缓存击穿
|
||||
// 后续若有新增配置则会清空缓存重新加载
|
||||
if (dataScope == null || !dataScope.getSearched()) {
|
||||
List<DataScopeModel> list = jdbcTemplate.query(DataScopeConstant.DATA_BY_CODE, new BeanPropertyRowMapper<>(DataScopeModel.class), code);
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
dataScope = list.iterator().next();
|
||||
dataScope.setSearched(Boolean.TRUE);
|
||||
} else {
|
||||
dataScope = SEARCHED_DATA_SCOPE_MODEL;
|
||||
}
|
||||
CacheUtil.put(SYS_CACHE, SCOPE_CACHE_CODE, code, dataScope, Boolean.FALSE);
|
||||
}
|
||||
return StringUtil.isNotBlank(dataScope.getResourceCode()) ? dataScope : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门子级
|
||||
*
|
||||
* @param deptId 部门id
|
||||
* @return deptIds
|
||||
*/
|
||||
@Override
|
||||
public List<Long> getDeptAncestors(Long deptId) {
|
||||
List ancestors = CacheUtil.get(SYS_CACHE, DEPT_CACHE_ANCESTORS, deptId, List.class);
|
||||
if (CollectionUtil.isEmpty(ancestors)) {
|
||||
ancestors = jdbcTemplate.queryForList(DataScopeConstant.DATA_BY_DEPT, Long.class, deptId);
|
||||
CacheUtil.put(SYS_CACHE, DEPT_CACHE_ANCESTORS, deptId, ancestors);
|
||||
}
|
||||
return ancestors;
|
||||
}
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
package org.springblade.common.handler;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.type.BaseTypeHandler;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
|
||||
import java.sql.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@Slf4j
|
||||
public class PostgresLongArrayTypeHandler extends BaseTypeHandler<List<Long>> {
|
||||
|
||||
@Override
|
||||
public void setNonNullParameter(PreparedStatement ps, int i, List<Long> parameter, JdbcType jdbcType) throws SQLException {
|
||||
java.sql.Array array = ps.getConnection().createArrayOf("bigint", parameter.toArray());
|
||||
ps.setArray(i, array);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> getNullableResult(ResultSet rs, String columnName) throws SQLException {
|
||||
Object obj = rs.getObject(columnName);
|
||||
return convertObjectToList(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
|
||||
Object obj = rs.getObject(columnIndex);
|
||||
return convertObjectToList(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
|
||||
Object obj = cs.getObject(columnIndex);
|
||||
return convertObjectToList(obj);
|
||||
}
|
||||
|
||||
private List<Long> convertObjectToList(Object obj) {
|
||||
if (obj == null) {
|
||||
return new ArrayList<>(); // 修改:返回空列表而不是null
|
||||
}
|
||||
|
||||
// 处理 List 类型
|
||||
if (obj instanceof List<?> rawList) {
|
||||
return rawList.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.map(this::convertToLong)
|
||||
.collect(java.util.stream.Collectors.toList());
|
||||
}
|
||||
|
||||
// 处理数组类型
|
||||
if (obj.getClass().isArray()) {
|
||||
Object[] array = (Object[]) obj;
|
||||
return Arrays.stream(array)
|
||||
.filter(Objects::nonNull)
|
||||
.map(this::convertToLong)
|
||||
.collect(java.util.stream.Collectors.toList());
|
||||
}
|
||||
|
||||
// 处理 SQL Array 类型
|
||||
if (obj instanceof Array sqlArray) {
|
||||
try {
|
||||
Object[] array = (Object[]) sqlArray.getArray();
|
||||
return Arrays.stream(array)
|
||||
.filter(Objects::nonNull)
|
||||
.map(this::convertToLong)
|
||||
.collect(java.util.stream.Collectors.toList());
|
||||
} catch (SQLException e) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
// 处理 PostgreSQL 数组字符串格式
|
||||
if (obj instanceof String) {
|
||||
return parsePostgreSQLArrayString((String) obj);
|
||||
}
|
||||
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
private List<Long> parsePostgreSQLArrayString(String arrayStr) {
|
||||
if (arrayStr == null || !arrayStr.startsWith("{") || !arrayStr.endsWith("}")) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
String content = arrayStr.substring(1, arrayStr.length() - 1);
|
||||
if (content.trim().isEmpty()) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
String[] elements = content.split(",");
|
||||
return Arrays.stream(elements)
|
||||
.map(String::trim)
|
||||
.filter(s -> !s.isEmpty() && !"null".equalsIgnoreCase(s))
|
||||
.map(this::convertToLong)
|
||||
.collect(java.util.stream.Collectors.toList());
|
||||
}
|
||||
|
||||
private Long convertToLong(Object obj) {
|
||||
if (obj instanceof Long) {
|
||||
return (Long) obj;
|
||||
} else if (obj instanceof Number) {
|
||||
return ((Number) obj).longValue();
|
||||
} else if (obj instanceof String) {
|
||||
try {
|
||||
return Long.valueOf(((String) obj));
|
||||
} catch (NumberFormatException e) {
|
||||
return 0L;
|
||||
}
|
||||
} else {
|
||||
return Long.valueOf(obj.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.launch;
|
||||
|
||||
import org.springblade.common.constant.LauncherConstant;
|
||||
import org.springblade.core.auto.service.AutoService;
|
||||
import org.springblade.core.launch.service.LauncherService;
|
||||
import org.springblade.core.launch.utils.PropsUtil;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* 启动参数拓展
|
||||
*
|
||||
* @author smallchil
|
||||
*/
|
||||
@AutoService(LauncherService.class)
|
||||
public class LauncherServiceImpl implements LauncherService {
|
||||
|
||||
@Override
|
||||
public void launcher(SpringApplicationBuilder builder, String appName, String profile, boolean isLocalDev) {
|
||||
Properties props = System.getProperties();
|
||||
PropsUtil.setProperty(props, "spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile));
|
||||
PropsUtil.setProperty(props, "spring.datasource.dynamic.enabled", "false");
|
||||
// 开启elk日志
|
||||
//PropsUtil.setProperty(props, "blade.log.elk.destination", LauncherConstant.elkAddr(profile));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.preview;
|
||||
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* 演示配置类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableConfigurationProperties(BladePreviewProperties.class)
|
||||
@ConditionalOnProperty(value = "blade.preview.enabled", havingValue = "true")
|
||||
public class BladePreviewConfiguration {
|
||||
|
||||
/**
|
||||
* 演示模式配置
|
||||
*/
|
||||
@Bean
|
||||
public BladePreviewFilter previewFilter() {
|
||||
return new BladePreviewFilter();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.preview;
|
||||
|
||||
import jakarta.servlet.*;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 演示过滤器
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class BladePreviewFilter implements Filter {
|
||||
|
||||
private static final List<String> SKIP_KEYS = new ArrayList<>();
|
||||
|
||||
static {
|
||||
SKIP_KEYS.add("notice");
|
||||
SKIP_KEYS.add("flow");
|
||||
SKIP_KEYS.add("oauth");
|
||||
SKIP_KEYS.add("blade-auth");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void init(FilterConfig filterConfig) {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
|
||||
|
||||
HttpServletRequest httpServletRequest = (HttpServletRequest) servletRequest;
|
||||
String path = httpServletRequest.getServletPath();
|
||||
String method = httpServletRequest.getMethod();
|
||||
|
||||
String get = "GET";
|
||||
if (method.equals(get) || SKIP_KEYS.stream().anyMatch(path::contains)) {
|
||||
filterChain.doFilter(servletRequest, servletResponse);
|
||||
} else {
|
||||
throw new ServiceException("演示环境暂时无法操作,请联系官方获取可操作账号!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.common.preview;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
/**
|
||||
* 演示模式 配置
|
||||
*
|
||||
* @author BladeX
|
||||
*/
|
||||
@Data
|
||||
@ConfigurationProperties(prefix = "blade.preview")
|
||||
public class BladePreviewProperties {
|
||||
|
||||
/**
|
||||
* 开启演示模式
|
||||
*/
|
||||
private boolean enabled;
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package org.springblade.common.utils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Random;
|
||||
|
||||
public class RandomAmountGenerator {
|
||||
|
||||
/**
|
||||
* 生成指定范围内的随机金额
|
||||
*
|
||||
* @param min 最小值
|
||||
* @param max 最大值
|
||||
* @return 随机金额
|
||||
*/
|
||||
public static BigDecimal generateRandomAmount(BigDecimal min, BigDecimal max) {
|
||||
Random random = new Random();
|
||||
double range = max.subtract(min).doubleValue();
|
||||
double randomValue = random.nextDouble() * range + min.doubleValue();
|
||||
return BigDecimal.valueOf(randomValue).setScale(2, RoundingMode.HALF_UP);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,438 +0,0 @@
|
||||
package org.springblade.common.utils.date;
|
||||
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.*;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
|
||||
@Slf4j
|
||||
public class DateUtil {
|
||||
|
||||
private static final ThreadLocal<SimpleDateFormat> SIMPLE_DAY = ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyy-MM-dd"));
|
||||
private static final ThreadLocal<SimpleDateFormat> SIMPLE_DATE_FORMAT = ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
|
||||
public static final ThreadLocal<DateTimeFormatter> THREAD_LOCAL_FORMAT = ThreadLocal.withInitial(() -> DateTimeFormatter.ofPattern("yyyy-MM-dd", Locale.CHINA));
|
||||
|
||||
public static final String yyyyMMddHHmmss = "yyyyMMddHHmmss";
|
||||
public static final String yyyyMMdd = "yyyyMMdd";
|
||||
|
||||
|
||||
/**
|
||||
* 计算天数
|
||||
*
|
||||
* @param beginDate 开始时间
|
||||
* @param endDate 结束时间
|
||||
*/
|
||||
public static Integer getDaySub(Date beginDate, Date endDate) {
|
||||
try {
|
||||
SimpleDateFormat sdf = SIMPLE_DAY.get();
|
||||
Date start = sdf.parse(sdf.format(beginDate));
|
||||
Date end = sdf.parse(sdf.format(endDate));
|
||||
return Math.toIntExact((end.getTime() - start.getTime()) / (24 * 60 * 60 * 1000));
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static Date geFirstDayOfThisMonth() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取本月最后一天
|
||||
*/
|
||||
public static Date geLastDayOfThisMonth() {
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(new Date());
|
||||
cal.roll(Calendar.DAY_OF_MONTH, -1);
|
||||
return cal.getTime();
|
||||
}
|
||||
|
||||
public static Date getThirtyMinuteLate() {
|
||||
Calendar now = Calendar.getInstance();
|
||||
now.add(Calendar.MINUTE, 30);
|
||||
return now.getTime();
|
||||
}
|
||||
|
||||
public static Date getSecondsLate(Date date, int seconds) {
|
||||
Calendar result = Calendar.getInstance();
|
||||
result.setTime(date);
|
||||
result.add(Calendar.SECOND, seconds);
|
||||
return result.getTime();
|
||||
}
|
||||
|
||||
public static Date getMinutesLate(Date date, int minutes) {
|
||||
Calendar result = Calendar.getInstance();
|
||||
result.setTime(date);
|
||||
result.add(Calendar.MINUTE, minutes);
|
||||
return result.getTime();
|
||||
}
|
||||
|
||||
public static Date getHoursLate(Date date, int hours) {
|
||||
Calendar result = Calendar.getInstance();
|
||||
result.setTime(date);
|
||||
result.add(Calendar.HOUR, hours);
|
||||
return result.getTime();
|
||||
}
|
||||
|
||||
public static Date getDaysLate(Date date, int days) {
|
||||
Calendar result = Calendar.getInstance();
|
||||
result.setTime(date);
|
||||
result.add(Calendar.DAY_OF_MONTH, days);
|
||||
return result.getTime();
|
||||
}
|
||||
|
||||
public static Date getMonthsLate(Date date, int months) {
|
||||
Calendar result = Calendar.getInstance();
|
||||
result.setTime(date);
|
||||
result.add(Calendar.MONTH, months);
|
||||
return result.getTime();
|
||||
}
|
||||
|
||||
public static Date getZeroTime(Date date) {
|
||||
Calendar result = Calendar.getInstance();
|
||||
result.setTime(date);
|
||||
result.set(Calendar.HOUR_OF_DAY, 0);
|
||||
result.set(Calendar.MINUTE, 0);
|
||||
result.set(Calendar.SECOND, 0);
|
||||
result.set(Calendar.MILLISECOND, 0);
|
||||
return result.getTime();
|
||||
}
|
||||
|
||||
public static boolean isExpireDays(Date date, int i) {
|
||||
Calendar createDate = Calendar.getInstance();
|
||||
createDate.setTime(date);
|
||||
createDate.add(Calendar.DATE, i);
|
||||
return createDate.before(new Date());
|
||||
}
|
||||
|
||||
|
||||
public static Integer getPersonAgeFromIdCard(String pensonnelIdCard) {
|
||||
|
||||
//截取身份证中出行人出生日期中的年、月、日
|
||||
Integer personYear = Integer.parseInt(pensonnelIdCard.substring(6, 10));
|
||||
Integer personMonth = Integer.parseInt(pensonnelIdCard.substring(10, 12));
|
||||
Integer personDay = Integer.parseInt(pensonnelIdCard.substring(12, 14));
|
||||
|
||||
Calendar cal = Calendar.getInstance();
|
||||
// 得到当前时间的年、月、日
|
||||
Integer yearNow = cal.get(Calendar.YEAR);
|
||||
Integer monthNow = cal.get(Calendar.MONTH) + 1;
|
||||
Integer dayNow = cal.get(Calendar.DATE);
|
||||
|
||||
// 用当前年月日减去生日年月日
|
||||
Integer yearMinus = yearNow - personYear;
|
||||
Integer monthMinus = monthNow - personMonth;
|
||||
Integer dayMinus = dayNow - personDay;
|
||||
|
||||
Integer age = yearMinus; //先大致赋值
|
||||
|
||||
if (yearMinus == 0) { //出生年份为当前年份
|
||||
age = 0;
|
||||
} else { //出生年份大于当前年份
|
||||
if (monthMinus < 0) {//出生月份小于当前月份时,还没满周岁
|
||||
age = age - 1;
|
||||
}
|
||||
if (monthMinus == 0) {//当前月份为出生月份时,判断日期
|
||||
if (dayMinus < 0) {//出生日期小于当前月份时,没满周岁
|
||||
age = age - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return age;
|
||||
}
|
||||
|
||||
public static Date getToday() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
public static Integer getYear() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
return calendar.get(Calendar.YEAR);
|
||||
}
|
||||
|
||||
public static Integer getMonth() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
return calendar.get(Calendar.MONTH) + 1;
|
||||
}
|
||||
|
||||
public static Integer getDay() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
return calendar.get(Calendar.DATE);
|
||||
}
|
||||
|
||||
public static Date getYesterday() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.add(Calendar.DATE, -1);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
public static Date getBeForeYesterday() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.add(Calendar.DATE, -2);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
public static Date setDayToNum(int day) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.add(Calendar.DATE, day);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
public static Date getLastWeek() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.add(Calendar.DATE, -7);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
public static Date getSixDaysAgo() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.add(Calendar.DATE, -6);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
public static Date getTomorrow() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.add(Calendar.DATE, 1);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
|
||||
public static Integer getTimeHour() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
return calendar.get(Calendar.HOUR_OF_DAY);
|
||||
}
|
||||
|
||||
public static Date getTodayHour(String end) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, Integer.parseInt(end));
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
public static Integer getTimeStampSec() {
|
||||
return Integer.valueOf(String.valueOf(Instant.now().getEpochSecond()));
|
||||
}
|
||||
|
||||
public static Date getDayOfMonth(Integer month) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.set(Calendar.DAY_OF_MONTH, month);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* "starttime": "11:00",
|
||||
* "endtime": "20:00",
|
||||
*
|
||||
* @param startTime
|
||||
* @param endTime
|
||||
* @return
|
||||
*/
|
||||
public static int verificationPeriod(String startTime, String endTime) {
|
||||
int status = 0;
|
||||
SimpleDateFormat sdf = SIMPLE_DAY.get();
|
||||
SimpleDateFormat sdtf = SIMPLE_DATE_FORMAT.get();
|
||||
if (StringUtils.hasLength(startTime) && StringUtils.hasLength(endTime) && startTime.length() == 5 && endTime.length() == 5) {
|
||||
String currentDay = sdf.format(new Date());
|
||||
Long current = System.currentTimeMillis();
|
||||
//日期补全
|
||||
String startStr = new StringBuilder(currentDay).append(" ").append(startTime).append(":00").toString();
|
||||
String endStr = new StringBuilder(currentDay).append(" ").append(endTime).append(":00").toString();
|
||||
synchronized (DateUtil.class) {
|
||||
try {
|
||||
Long start = sdtf.parse(startStr).getTime();
|
||||
Long end = sdtf.parse(endStr).getTime();
|
||||
//判断是否跨天
|
||||
if (start > end) {
|
||||
status = current - end >= 0 && current - start <= 0 ? 1 : 0;
|
||||
} else {
|
||||
status = start.equals(end) ? 0 : current - start >= 0 && current - end <= 0 ? 0 : 1;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("错误的日期格式 开始时间 {} 结束时间{}", startTime, endTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
return status;
|
||||
|
||||
}
|
||||
|
||||
public static Date convertFromString(String dateString, String format) {
|
||||
SimpleDateFormat ft = new SimpleDateFormat(format);
|
||||
try {
|
||||
return ft.parse(dateString);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public static String convertFromDate(Date date, String format) {
|
||||
SimpleDateFormat ft = new SimpleDateFormat(format);
|
||||
return ft.format(date);
|
||||
}
|
||||
|
||||
public static Date convertLocalDateTimeToDate(LocalDateTime localDateTime) {
|
||||
ZoneId zoneId = ZoneId.systemDefault();
|
||||
ZonedDateTime zdt = localDateTime.atZone(zoneId);
|
||||
return Date.from(zdt.toInstant());
|
||||
}
|
||||
|
||||
public static Integer getDays(Integer number, Integer type) {
|
||||
int days = 0;
|
||||
//计算包对应时长
|
||||
switch (type) {
|
||||
case 1: // 天
|
||||
days = number;
|
||||
break;
|
||||
case 2: // 月
|
||||
days = number * 30;
|
||||
break;
|
||||
case 3: //年
|
||||
days = number * 365;
|
||||
break;
|
||||
default:
|
||||
Assert.isTrue(false, "时间类型错误");
|
||||
}
|
||||
return days;
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定日期后x天的日期
|
||||
*
|
||||
* @param start 日期
|
||||
* @param day 天数
|
||||
* @return
|
||||
*/
|
||||
public static Date getSpecifyDay(Date start, int day) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(start);
|
||||
calendar.add(Calendar.DATE, day);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
public static Date getBegin(Date date) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(date);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
public static Date getEnd(Date date) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(date);
|
||||
calendar.set(Calendar.SECOND, 59);
|
||||
calendar.set(Calendar.MINUTE, 59);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 23);
|
||||
calendar.set(Calendar.MILLISECOND, 999);
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
public static Date getMonthBegin(Date date) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(date);
|
||||
calendar.add(Calendar.MONTH, 0);
|
||||
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
public static Date getMonthEnd(Date date) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(date);
|
||||
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||
calendar.set(Calendar.SECOND, 59);
|
||||
calendar.set(Calendar.MINUTE, 59);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 23);
|
||||
calendar.set(Calendar.MILLISECOND, 999);
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
public static Long getExpireSecondWithTimestamp(int seconds) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.add(Calendar.SECOND, seconds);
|
||||
return calendar.getTime().getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* 日期是否为周六/周日
|
||||
*
|
||||
* @param day
|
||||
* @return
|
||||
*/
|
||||
public static Boolean dayOfWeek(String day) {
|
||||
DateTimeFormatter formatter = THREAD_LOCAL_FORMAT.get();
|
||||
LocalDate date = LocalDate.parse(day, formatter);
|
||||
switch (date.getDayOfWeek()) {
|
||||
case SATURDAY:
|
||||
case SUNDAY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
package org.springblade.common.utils.jsonSerialize;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.JsonDeserializer;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ArrayToStringDeserializer extends JsonDeserializer<String> {
|
||||
|
||||
@Override
|
||||
public String deserialize(JsonParser p, DeserializationContext ctxt)
|
||||
throws IOException, JsonProcessingException {
|
||||
JsonNode node = p.getCodec().readTree(p);
|
||||
|
||||
if (node.isArray()) {
|
||||
List<String> values = new ArrayList<>();
|
||||
for (JsonNode element : node) {
|
||||
values.add(element.asText());
|
||||
}
|
||||
// 将数组元素用逗号连接成字符串
|
||||
return String.join(",", values);
|
||||
} else if (node.isTextual()) {
|
||||
return node.asText();
|
||||
} else {
|
||||
return node.toString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
package org.springblade.common.utils.string;
|
||||
|
||||
/**
|
||||
* 静态 String 池
|
||||
*
|
||||
* @author L.cm
|
||||
*/
|
||||
public interface StringPool {
|
||||
|
||||
String AMPERSAND = "&";
|
||||
String AND = "and";
|
||||
String AT = "@";
|
||||
String ASTERISK = "*";
|
||||
String STAR = ASTERISK;
|
||||
String SLASH = "/";
|
||||
String BACK_SLASH = "\\";
|
||||
String DOUBLE_SLASH = "#//";
|
||||
String COLON = ":";
|
||||
String COMMA = ",";
|
||||
String DASH = "-";
|
||||
String DOLLAR = "$";
|
||||
String DOT = ".";
|
||||
String EMPTY = "";
|
||||
String EMPTY_JSON = "{}";
|
||||
String EQUALS = "=";
|
||||
String FALSE = "false";
|
||||
String HASH = "#";
|
||||
String HAT = "^";
|
||||
String LEFT_BRACE = "{";
|
||||
String LEFT_BRACKET = "(";
|
||||
String LEFT_CHEV = "<";
|
||||
|
||||
String NEWLINE = "\n";
|
||||
String N = "n";
|
||||
String NO = "no";
|
||||
String NULL = "null";
|
||||
String OFF = "off";
|
||||
String ON = "on";
|
||||
String PERCENT = "%";
|
||||
String PIPE = "|";
|
||||
String PLUS = "+";
|
||||
String QUESTION_MARK = "?";
|
||||
String EXCLAMATION_MARK = "!";
|
||||
String QUOTE = "\"";
|
||||
String RETURN = "\r";
|
||||
String TAB = "\t";
|
||||
String RIGHT_BRACE = "}";
|
||||
String RIGHT_BRACKET = ")";
|
||||
String RIGHT_CHEV = ">";
|
||||
String SEMICOLON = ";";
|
||||
String SINGLE_QUOTE = "'";
|
||||
String BACKTICK = "`";
|
||||
String SPACE = " ";
|
||||
String TILDA = "~";
|
||||
String LEFT_SQ_BRACKET = "[";
|
||||
String RIGHT_SQ_BRACKET = "]";
|
||||
String TRUE = "true";
|
||||
String UNDERSCORE = "_";
|
||||
String UTF_8 = "UTF-8";
|
||||
String GBK = "GBK";
|
||||
String ISO_8859_1 = "ISO-8859-1";
|
||||
String Y = "y";
|
||||
String YES = "yes";
|
||||
String ONE = "1";
|
||||
String ZERO = "0";
|
||||
String MINUS_ONE = "-1";
|
||||
String DOLLAR_LEFT_BRACE = "${";
|
||||
String UNKNOWN = "unknown";
|
||||
String GET = "GET";
|
||||
String POST = "POST";
|
||||
|
||||
}
|
||||
@@ -1,155 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.business.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.flowable.engine.TaskService;
|
||||
import org.springblade.core.launch.constant.AppConstant;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.flow.business.service.FlowBusinessService;
|
||||
import org.springblade.flow.core.entity.BladeFlow;
|
||||
import org.springblade.flow.core.utils.TaskUtil;
|
||||
import org.springblade.flow.engine.entity.FlowProcess;
|
||||
import org.springblade.flow.engine.service.FlowEngineService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 流程事务通用接口
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping(AppConstant.APPLICATION_FLOW_NAME + "/work")
|
||||
@Tag(name = "流程事务通用接口", description = "流程事务通用接口")
|
||||
public class WorkController {
|
||||
|
||||
private final TaskService taskService;
|
||||
private final FlowEngineService flowEngineService;
|
||||
private final FlowBusinessService flowBusinessService;
|
||||
|
||||
/**
|
||||
* 发起事务列表页
|
||||
*/
|
||||
@GetMapping("start-list")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "发起事务列表页", description = "传入流程类型")
|
||||
public R<IPage<FlowProcess>> startList(@Parameter(description = "流程类型") String category, Query query, @RequestParam(required = false, defaultValue = "1") Integer mode) {
|
||||
IPage<FlowProcess> pages = flowEngineService.selectProcessPage(Condition.getPage(query), category, mode);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 待签事务列表页
|
||||
*/
|
||||
@GetMapping("claim-list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "待签事务列表页", description = "传入流程信息")
|
||||
public R<IPage<BladeFlow>> claimList(@Parameter(description = "流程信息") BladeFlow bladeFlow, Query query) {
|
||||
IPage<BladeFlow> pages = flowBusinessService.selectClaimPage(Condition.getPage(query), bladeFlow);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 待办事务列表页
|
||||
*/
|
||||
@GetMapping("todo-list")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "待办事务列表页", description = "传入流程信息")
|
||||
public R<IPage<BladeFlow>> todoList(@Parameter(description = "流程信息") BladeFlow bladeFlow, Query query) {
|
||||
IPage<BladeFlow> pages = flowBusinessService.selectTodoPage(Condition.getPage(query), bladeFlow);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 已发事务列表页
|
||||
*/
|
||||
@GetMapping("send-list")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "已发事务列表页", description = "传入流程信息")
|
||||
public R<IPage<BladeFlow>> sendList(@Parameter(description = "流程信息") BladeFlow bladeFlow, Query query) {
|
||||
IPage<BladeFlow> pages = flowBusinessService.selectSendPage(Condition.getPage(query), bladeFlow);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 办结事务列表页
|
||||
*/
|
||||
@GetMapping("done-list")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "办结事务列表页", description = "传入流程信息")
|
||||
public R<IPage<BladeFlow>> doneList(@Parameter(description = "流程信息") BladeFlow bladeFlow, Query query) {
|
||||
IPage<BladeFlow> pages = flowBusinessService.selectDonePage(Condition.getPage(query), bladeFlow);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 签收事务
|
||||
*
|
||||
* @param taskId 任务id
|
||||
*/
|
||||
@PostMapping("claim-task")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "签收事务", description = "传入流程信息")
|
||||
public R claimTask(@Parameter(description = "任务id") String taskId) {
|
||||
taskService.claim(taskId, TaskUtil.getTaskUser());
|
||||
return R.success("签收事务成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 完成任务
|
||||
*
|
||||
* @param flow 请假信息
|
||||
*/
|
||||
@PostMapping("complete-task")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "完成任务", description = "传入流程信息")
|
||||
public R completeTask(@Parameter(description = "任务信息") @RequestBody BladeFlow flow) {
|
||||
return R.status(flowBusinessService.completeTask(flow));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除任务
|
||||
*
|
||||
* @param taskId 任务id
|
||||
* @param reason 删除原因
|
||||
*/
|
||||
@PostMapping("delete-task")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "删除任务", description = "传入流程信息")
|
||||
public R deleteTask(@Parameter(description = "任务id") String taskId, @Parameter(description = "删除原因") String reason) {
|
||||
taskService.deleteTask(taskId, reason);
|
||||
return R.success("删除任务成功");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.business.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.flow.core.entity.BladeFlow;
|
||||
|
||||
/**
|
||||
* 流程业务类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface FlowBusinessService {
|
||||
|
||||
/**
|
||||
* 流程待签列表
|
||||
*
|
||||
* @param page 分页工具
|
||||
* @param bladeFlow 流程类
|
||||
* @return
|
||||
*/
|
||||
IPage<BladeFlow> selectClaimPage(IPage<BladeFlow> page, BladeFlow bladeFlow);
|
||||
|
||||
/**
|
||||
* 流程待办列表
|
||||
*
|
||||
* @param page 分页工具
|
||||
* @param bladeFlow 流程类
|
||||
* @return
|
||||
*/
|
||||
IPage<BladeFlow> selectTodoPage(IPage<BladeFlow> page, BladeFlow bladeFlow);
|
||||
|
||||
/**
|
||||
* 流程已发列表
|
||||
*
|
||||
* @param page 分页工具
|
||||
* @param bladeFlow 流程类
|
||||
* @return
|
||||
*/
|
||||
IPage<BladeFlow> selectSendPage(IPage<BladeFlow> page, BladeFlow bladeFlow);
|
||||
|
||||
/**
|
||||
* 流程办结列表
|
||||
*
|
||||
* @param page 分页工具
|
||||
* @param bladeFlow 流程类
|
||||
* @return
|
||||
*/
|
||||
IPage<BladeFlow> selectDonePage(IPage<BladeFlow> page, BladeFlow bladeFlow);
|
||||
|
||||
/**
|
||||
* 完成任务
|
||||
*
|
||||
* @param leave 请假信息
|
||||
* @return boolean
|
||||
*/
|
||||
boolean completeTask(BladeFlow leave);
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.business.service;
|
||||
|
||||
import org.springblade.flow.core.entity.BladeFlow;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 工作流调用接口.
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface IFlowService {
|
||||
|
||||
/**
|
||||
* 开启流程
|
||||
*
|
||||
* @param processDefinitionId 流程id
|
||||
* @param businessKey 业务key
|
||||
* @param variables 参数
|
||||
* @return BladeFlow
|
||||
*/
|
||||
BladeFlow startProcessInstanceById(String processDefinitionId, String businessKey, Map<String, Object> variables);
|
||||
|
||||
/**
|
||||
* 开启流程
|
||||
*
|
||||
* @param processDefinitionKey 流程标识
|
||||
* @param businessKey 业务key
|
||||
* @param variables 参数
|
||||
* @return BladeFlow
|
||||
*/
|
||||
BladeFlow startProcessInstanceByKey(String processDefinitionKey, String businessKey, Map<String, Object> variables);
|
||||
|
||||
/**
|
||||
* 完成任务
|
||||
*
|
||||
* @param taskId 任务id
|
||||
* @param processInstanceId 流程实例id
|
||||
* @param comment 评论
|
||||
* @param variables 参数
|
||||
* @return R
|
||||
*/
|
||||
boolean completeTask(String taskId, String processInstanceId, String comment, Map<String, Object> variables);
|
||||
|
||||
/**
|
||||
* 获取流程变量
|
||||
*
|
||||
* @param taskId 任务id
|
||||
* @param variableName 变量名
|
||||
* @return R
|
||||
*/
|
||||
Object taskVariable(String taskId, String variableName);
|
||||
|
||||
/**
|
||||
* 获取流程变量集合
|
||||
*
|
||||
* @param taskId 任务id
|
||||
* @return R
|
||||
*/
|
||||
Map<String, Object> taskVariables(String taskId);
|
||||
}
|
||||
@@ -1,342 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.business.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.flowable.engine.HistoryService;
|
||||
import org.flowable.engine.TaskService;
|
||||
import org.flowable.engine.history.HistoricProcessInstance;
|
||||
import org.flowable.engine.history.HistoricProcessInstanceQuery;
|
||||
import org.flowable.task.api.TaskQuery;
|
||||
import org.flowable.task.api.history.HistoricTaskInstance;
|
||||
import org.flowable.task.api.history.HistoricTaskInstanceQuery;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.support.Kv;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.core.tool.utils.StringPool;
|
||||
import org.springblade.core.tool.utils.StringUtil;
|
||||
import org.springblade.flow.business.service.FlowBusinessService;
|
||||
import org.springblade.flow.core.constant.ProcessConstant;
|
||||
import org.springblade.flow.core.entity.BladeFlow;
|
||||
import org.springblade.flow.core.utils.TaskUtil;
|
||||
import org.springblade.flow.engine.constant.FlowEngineConstant;
|
||||
import org.springblade.flow.engine.entity.FlowProcess;
|
||||
import org.springblade.flow.engine.utils.FlowCache;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 流程业务实现类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class FlowBusinessServiceImpl implements FlowBusinessService {
|
||||
|
||||
private final TaskService taskService;
|
||||
private final HistoryService historyService;
|
||||
|
||||
@Override
|
||||
public IPage<BladeFlow> selectClaimPage(IPage<BladeFlow> page, BladeFlow bladeFlow) {
|
||||
String taskUser = TaskUtil.getTaskUser();
|
||||
String taskGroup = TaskUtil.getCandidateGroup();
|
||||
List<BladeFlow> flowList = new LinkedList<>();
|
||||
|
||||
// 个人等待签收的任务
|
||||
TaskQuery claimUserQuery = taskService.createTaskQuery().taskCandidateUser(taskUser)
|
||||
.includeProcessVariables().active().orderByTaskCreateTime().desc();
|
||||
// 定制流程等待签收的任务
|
||||
TaskQuery claimRoleWithTenantIdQuery = taskService.createTaskQuery().taskTenantId(AuthUtil.getTenantId()).taskCandidateGroupIn(Func.toStrList(taskGroup))
|
||||
.includeProcessVariables().active().orderByTaskCreateTime().desc();
|
||||
// 通用流程等待签收的任务
|
||||
TaskQuery claimRoleWithoutTenantIdQuery = taskService.createTaskQuery().taskWithoutTenantId().taskCandidateGroupIn(Func.toStrList(taskGroup))
|
||||
.includeProcessVariables().active().orderByTaskCreateTime().desc();
|
||||
|
||||
// 构建列表数据
|
||||
buildFlowTaskList(bladeFlow, flowList, claimUserQuery, FlowEngineConstant.STATUS_CLAIM);
|
||||
buildFlowTaskList(bladeFlow, flowList, claimRoleWithTenantIdQuery, FlowEngineConstant.STATUS_CLAIM);
|
||||
buildFlowTaskList(bladeFlow, flowList, claimRoleWithoutTenantIdQuery, FlowEngineConstant.STATUS_CLAIM);
|
||||
|
||||
// 计算总数
|
||||
long count = claimUserQuery.count() + claimRoleWithTenantIdQuery.count() + claimRoleWithoutTenantIdQuery.count();
|
||||
// 设置页数
|
||||
page.setSize(count);
|
||||
// 设置总数
|
||||
page.setTotal(count);
|
||||
// 设置数据
|
||||
page.setRecords(flowList);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<BladeFlow> selectTodoPage(IPage<BladeFlow> page, BladeFlow bladeFlow) {
|
||||
String taskUser = TaskUtil.getTaskUser();
|
||||
List<BladeFlow> flowList = new LinkedList<>();
|
||||
|
||||
// 已签收的任务
|
||||
TaskQuery todoQuery = taskService.createTaskQuery().taskAssignee(taskUser).active()
|
||||
.includeProcessVariables().orderByTaskCreateTime().desc();
|
||||
|
||||
// 构建列表数据
|
||||
buildFlowTaskList(bladeFlow, flowList, todoQuery, FlowEngineConstant.STATUS_TODO);
|
||||
|
||||
// 计算总数
|
||||
long count = todoQuery.count();
|
||||
// 设置页数
|
||||
page.setSize(count);
|
||||
// 设置总数
|
||||
page.setTotal(count);
|
||||
// 设置数据
|
||||
page.setRecords(flowList);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<BladeFlow> selectSendPage(IPage<BladeFlow> page, BladeFlow bladeFlow) {
|
||||
String taskUser = TaskUtil.getTaskUser();
|
||||
List<BladeFlow> flowList = new LinkedList<>();
|
||||
|
||||
HistoricProcessInstanceQuery historyQuery = historyService.createHistoricProcessInstanceQuery().startedBy(taskUser).orderByProcessInstanceStartTime().desc();
|
||||
|
||||
if (bladeFlow.getCategory() != null) {
|
||||
historyQuery.processDefinitionCategory(bladeFlow.getCategory());
|
||||
}
|
||||
if (bladeFlow.getProcessDefinitionName() != null) {
|
||||
historyQuery.processDefinitionName(bladeFlow.getProcessDefinitionName());
|
||||
}
|
||||
if (bladeFlow.getBeginDate() != null) {
|
||||
historyQuery.startedAfter(bladeFlow.getBeginDate());
|
||||
}
|
||||
if (bladeFlow.getEndDate() != null) {
|
||||
historyQuery.startedBefore(bladeFlow.getEndDate());
|
||||
}
|
||||
|
||||
// 查询列表
|
||||
List<HistoricProcessInstance> historyList = historyQuery.listPage(Func.toInt((page.getCurrent() - 1) * page.getSize()), Func.toInt(page.getSize()));
|
||||
|
||||
historyList.forEach(historicProcessInstance -> {
|
||||
BladeFlow flow = new BladeFlow();
|
||||
// historicProcessInstance
|
||||
flow.setCreateTime(historicProcessInstance.getStartTime());
|
||||
flow.setEndTime(historicProcessInstance.getEndTime());
|
||||
flow.setVariables(historicProcessInstance.getProcessVariables());
|
||||
String[] businessKey = Func.toStrArray(StringPool.COLON, historicProcessInstance.getBusinessKey());
|
||||
if (businessKey.length > 1) {
|
||||
flow.setBusinessTable(businessKey[0]);
|
||||
flow.setBusinessId(businessKey[1]);
|
||||
}
|
||||
flow.setHistoryActivityName(historicProcessInstance.getName());
|
||||
flow.setProcessInstanceId(historicProcessInstance.getId());
|
||||
flow.setHistoryProcessInstanceId(historicProcessInstance.getId());
|
||||
// ProcessDefinition
|
||||
FlowProcess processDefinition = FlowCache.getProcessDefinition(historicProcessInstance.getProcessDefinitionId());
|
||||
flow.setProcessDefinitionId(processDefinition.getId());
|
||||
flow.setProcessDefinitionName(processDefinition.getName());
|
||||
flow.setProcessDefinitionVersion(processDefinition.getVersion());
|
||||
flow.setProcessDefinitionKey(processDefinition.getKey());
|
||||
flow.setCategory(processDefinition.getCategory());
|
||||
flow.setCategoryName(FlowCache.getCategoryName(processDefinition.getCategory()));
|
||||
flow.setProcessInstanceId(historicProcessInstance.getId());
|
||||
// HistoricTaskInstance
|
||||
List<HistoricTaskInstance> historyTasks = historyService.createHistoricTaskInstanceQuery().processInstanceId(historicProcessInstance.getId()).orderByHistoricTaskInstanceEndTime().desc().list();
|
||||
if (Func.isNotEmpty(historyTasks)) {
|
||||
HistoricTaskInstance historyTask = historyTasks.iterator().next();
|
||||
flow.setTaskId(historyTask.getId());
|
||||
flow.setTaskName(historyTask.getName());
|
||||
flow.setTaskDefinitionKey(historyTask.getTaskDefinitionKey());
|
||||
}
|
||||
// Status
|
||||
if (historicProcessInstance.getEndActivityId() != null) {
|
||||
flow.setProcessIsFinished(FlowEngineConstant.STATUS_FINISHED);
|
||||
} else {
|
||||
flow.setProcessIsFinished(FlowEngineConstant.STATUS_UNFINISHED);
|
||||
}
|
||||
flow.setStatus(FlowEngineConstant.STATUS_FINISH);
|
||||
flowList.add(flow);
|
||||
});
|
||||
|
||||
// 计算总数
|
||||
long count = historyQuery.count();
|
||||
// 设置总数
|
||||
page.setTotal(count);
|
||||
page.setRecords(flowList);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<BladeFlow> selectDonePage(IPage<BladeFlow> page, BladeFlow bladeFlow) {
|
||||
String taskUser = TaskUtil.getTaskUser();
|
||||
List<BladeFlow> flowList = new LinkedList<>();
|
||||
|
||||
HistoricTaskInstanceQuery doneQuery = historyService.createHistoricTaskInstanceQuery().taskAssignee(taskUser).finished()
|
||||
.includeProcessVariables().orderByHistoricTaskInstanceEndTime().desc();
|
||||
|
||||
if (bladeFlow.getCategory() != null) {
|
||||
doneQuery.processCategoryIn(Func.toStrList(bladeFlow.getCategory()));
|
||||
}
|
||||
if (bladeFlow.getProcessDefinitionName() != null) {
|
||||
doneQuery.processDefinitionName(bladeFlow.getProcessDefinitionName());
|
||||
}
|
||||
if (bladeFlow.getBeginDate() != null) {
|
||||
doneQuery.taskCompletedAfter(bladeFlow.getBeginDate());
|
||||
}
|
||||
if (bladeFlow.getEndDate() != null) {
|
||||
doneQuery.taskCompletedBefore(bladeFlow.getEndDate());
|
||||
}
|
||||
|
||||
// 查询列表
|
||||
List<HistoricTaskInstance> doneList = doneQuery.listPage(Func.toInt((page.getCurrent() - 1) * page.getSize()), Func.toInt(page.getSize()));
|
||||
doneList.forEach(historicTaskInstance -> {
|
||||
BladeFlow flow = new BladeFlow();
|
||||
flow.setTaskId(historicTaskInstance.getId());
|
||||
flow.setTaskDefinitionKey(historicTaskInstance.getTaskDefinitionKey());
|
||||
flow.setTaskName(historicTaskInstance.getName());
|
||||
flow.setAssignee(historicTaskInstance.getAssignee());
|
||||
flow.setCreateTime(historicTaskInstance.getCreateTime());
|
||||
flow.setExecutionId(historicTaskInstance.getExecutionId());
|
||||
flow.setHistoryTaskEndTime(historicTaskInstance.getEndTime());
|
||||
flow.setVariables(historicTaskInstance.getProcessVariables());
|
||||
|
||||
FlowProcess processDefinition = FlowCache.getProcessDefinition(historicTaskInstance.getProcessDefinitionId());
|
||||
flow.setProcessDefinitionId(processDefinition.getId());
|
||||
flow.setProcessDefinitionName(processDefinition.getName());
|
||||
flow.setProcessDefinitionKey(processDefinition.getKey());
|
||||
flow.setProcessDefinitionVersion(processDefinition.getVersion());
|
||||
flow.setCategory(processDefinition.getCategory());
|
||||
flow.setCategoryName(FlowCache.getCategoryName(processDefinition.getCategory()));
|
||||
|
||||
flow.setProcessInstanceId(historicTaskInstance.getProcessInstanceId());
|
||||
flow.setHistoryProcessInstanceId(historicTaskInstance.getProcessInstanceId());
|
||||
HistoricProcessInstance historicProcessInstance = getHistoricProcessInstance((historicTaskInstance.getProcessInstanceId()));
|
||||
if (Func.isNotEmpty(historicProcessInstance)) {
|
||||
String[] businessKey = Func.toStrArray(StringPool.COLON, historicProcessInstance.getBusinessKey());
|
||||
flow.setBusinessTable(businessKey[0]);
|
||||
flow.setBusinessId(businessKey[1]);
|
||||
if (historicProcessInstance.getEndActivityId() != null) {
|
||||
flow.setProcessIsFinished(FlowEngineConstant.STATUS_FINISHED);
|
||||
} else {
|
||||
flow.setProcessIsFinished(FlowEngineConstant.STATUS_UNFINISHED);
|
||||
}
|
||||
}
|
||||
flow.setStatus(FlowEngineConstant.STATUS_FINISH);
|
||||
flowList.add(flow);
|
||||
});
|
||||
// 计算总数
|
||||
long count = doneQuery.count();
|
||||
// 设置总数
|
||||
page.setTotal(count);
|
||||
page.setRecords(flowList);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean completeTask(BladeFlow flow) {
|
||||
String taskId = flow.getTaskId();
|
||||
String processInstanceId = flow.getProcessInstanceId();
|
||||
String comment = Func.toStr(flow.getComment(), ProcessConstant.PASS_COMMENT);
|
||||
// 增加评论
|
||||
if (StringUtil.isNoneBlank(processInstanceId, comment)) {
|
||||
taskService.addComment(taskId, processInstanceId, comment);
|
||||
}
|
||||
// 创建变量
|
||||
Map<String, Object> variables = flow.getVariables();
|
||||
if (variables == null) {
|
||||
variables = Kv.create();
|
||||
}
|
||||
variables.put(ProcessConstant.PASS_KEY, flow.isPass());
|
||||
// 完成任务
|
||||
taskService.complete(taskId, variables);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建流程
|
||||
*
|
||||
* @param bladeFlow 流程通用类
|
||||
* @param flowList 流程列表
|
||||
* @param taskQuery 任务查询类
|
||||
* @param status 状态
|
||||
*/
|
||||
private void buildFlowTaskList(BladeFlow bladeFlow, List<BladeFlow> flowList, TaskQuery taskQuery, String status) {
|
||||
if (bladeFlow.getCategory() != null) {
|
||||
taskQuery.processCategoryIn(Func.toStrList(bladeFlow.getCategory()));
|
||||
}
|
||||
if (bladeFlow.getProcessDefinitionName() != null) {
|
||||
taskQuery.processDefinitionName(bladeFlow.getProcessDefinitionName());
|
||||
}
|
||||
if (bladeFlow.getBeginDate() != null) {
|
||||
taskQuery.taskCreatedAfter(bladeFlow.getBeginDate());
|
||||
}
|
||||
if (bladeFlow.getEndDate() != null) {
|
||||
taskQuery.taskCreatedBefore(bladeFlow.getEndDate());
|
||||
}
|
||||
taskQuery.list().forEach(task -> {
|
||||
BladeFlow flow = new BladeFlow();
|
||||
flow.setTaskId(task.getId());
|
||||
flow.setTaskDefinitionKey(task.getTaskDefinitionKey());
|
||||
flow.setTaskName(task.getName());
|
||||
flow.setAssignee(task.getAssignee());
|
||||
flow.setCreateTime(task.getCreateTime());
|
||||
flow.setClaimTime(task.getClaimTime());
|
||||
flow.setExecutionId(task.getExecutionId());
|
||||
flow.setVariables(task.getProcessVariables());
|
||||
|
||||
HistoricProcessInstance historicProcessInstance = getHistoricProcessInstance(task.getProcessInstanceId());
|
||||
if (Func.isNotEmpty(historicProcessInstance)) {
|
||||
String[] businessKey = Func.toStrArray(StringPool.COLON, historicProcessInstance.getBusinessKey());
|
||||
flow.setBusinessTable(businessKey[0]);
|
||||
flow.setBusinessId(businessKey[1]);
|
||||
}
|
||||
|
||||
FlowProcess processDefinition = FlowCache.getProcessDefinition(task.getProcessDefinitionId());
|
||||
flow.setCategory(processDefinition.getCategory());
|
||||
flow.setCategoryName(FlowCache.getCategoryName(processDefinition.getCategory()));
|
||||
flow.setProcessDefinitionId(processDefinition.getId());
|
||||
flow.setProcessDefinitionName(processDefinition.getName());
|
||||
flow.setProcessDefinitionKey(processDefinition.getKey());
|
||||
flow.setProcessDefinitionVersion(processDefinition.getVersion());
|
||||
flow.setProcessInstanceId(task.getProcessInstanceId());
|
||||
flow.setStatus(status);
|
||||
flowList.add(flow);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取历史流程
|
||||
*
|
||||
* @param processInstanceId 流程实例id
|
||||
* @return HistoricProcessInstance
|
||||
*/
|
||||
private HistoricProcessInstance getHistoricProcessInstance(String processInstanceId) {
|
||||
return historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.business.service.impl;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.flowable.engine.IdentityService;
|
||||
import org.flowable.engine.RuntimeService;
|
||||
import org.flowable.engine.TaskService;
|
||||
import org.flowable.engine.runtime.ProcessInstance;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.support.Kv;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.core.tool.utils.StringUtil;
|
||||
import org.springblade.flow.business.service.IFlowService;
|
||||
import org.springblade.flow.core.entity.BladeFlow;
|
||||
import org.springblade.flow.core.utils.TaskUtil;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 流程实现类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class FlowServiceImpl implements IFlowService {
|
||||
|
||||
private final RuntimeService runtimeService;
|
||||
private final IdentityService identityService;
|
||||
private final TaskService taskService;
|
||||
|
||||
@Override
|
||||
public BladeFlow startProcessInstanceById(String processDefinitionId, String businessKey, Map<String, Object> variables) {
|
||||
// 设置流程启动用户
|
||||
identityService.setAuthenticatedUserId(TaskUtil.getTaskUser());
|
||||
// 开启流程
|
||||
ProcessInstance processInstance = runtimeService.startProcessInstanceById(processDefinitionId, businessKey, variables);
|
||||
// 组装流程通用类
|
||||
BladeFlow flow = new BladeFlow();
|
||||
flow.setProcessInstanceId(processInstance.getId());
|
||||
return flow;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BladeFlow startProcessInstanceByKey(String processDefinitionKey, String businessKey, Map<String, Object> variables) {
|
||||
// 设置流程启动用户
|
||||
identityService.setAuthenticatedUserId(TaskUtil.getTaskUser());
|
||||
// 开启流程
|
||||
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processDefinitionKey, businessKey, variables);
|
||||
// 组装流程通用类
|
||||
BladeFlow flow = new BladeFlow();
|
||||
flow.setProcessInstanceId(processInstance.getId());
|
||||
return flow;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean completeTask(String taskId, String processInstanceId, String comment, Map<String, Object> variables) {
|
||||
// 增加评论
|
||||
if (StringUtil.isNoneBlank(processInstanceId, comment)) {
|
||||
taskService.addComment(taskId, processInstanceId, comment);
|
||||
}
|
||||
// 非空判断
|
||||
if (Func.isEmpty(variables)) {
|
||||
variables = Kv.create();
|
||||
}
|
||||
// 完成任务
|
||||
taskService.complete(taskId, variables);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object taskVariable(String taskId, String variableName) {
|
||||
return R.data(taskService.getVariable(taskId, variableName));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> taskVariables(String taskId) {
|
||||
return taskService.getVariables(taskId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.core.constant;
|
||||
|
||||
/**
|
||||
* 流程常量.
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface ProcessConstant {
|
||||
|
||||
/**
|
||||
* 请假流程标识
|
||||
*/
|
||||
String LEAVE_KEY = "Leave";
|
||||
|
||||
/**
|
||||
* 报销流程标识
|
||||
*/
|
||||
String EXPENSE_KEY = "Expense";
|
||||
|
||||
/**
|
||||
* 同意标识
|
||||
*/
|
||||
String PASS_KEY = "pass";
|
||||
|
||||
/**
|
||||
* 同意代号
|
||||
*/
|
||||
String PASS_ALIAS = "ok";
|
||||
|
||||
/**
|
||||
* 同意默认批复
|
||||
*/
|
||||
String PASS_COMMENT = "同意";
|
||||
|
||||
/**
|
||||
* 驳回默认批复
|
||||
*/
|
||||
String NOT_PASS_COMMENT = "驳回";
|
||||
|
||||
/**
|
||||
* 创建人变量名
|
||||
*/
|
||||
String TASK_VARIABLE_CREATE_USER = "createUser";
|
||||
|
||||
}
|
||||
@@ -1,190 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.core.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springblade.flow.core.constant.ProcessConstant;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 工作流通用实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
public class BladeFlow implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 任务编号
|
||||
*/
|
||||
private String taskId;
|
||||
/**
|
||||
* 任务名称
|
||||
*/
|
||||
private String taskName;
|
||||
/**
|
||||
* 任务定义Key
|
||||
*/
|
||||
private String taskDefinitionKey;
|
||||
/**
|
||||
* 任务执行人编号
|
||||
*/
|
||||
private String assignee;
|
||||
/**
|
||||
* 任务执行人名称
|
||||
*/
|
||||
private String assigneeName;
|
||||
/**
|
||||
* 流程分类
|
||||
*/
|
||||
private String category;
|
||||
/**
|
||||
* 流程分类名
|
||||
*/
|
||||
private String categoryName;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
/**
|
||||
* 签收时间
|
||||
*/
|
||||
private Date claimTime;
|
||||
/**
|
||||
* 历史任务结束时间
|
||||
*/
|
||||
private Date historyTaskEndTime;
|
||||
/**
|
||||
* 执行ID
|
||||
*/
|
||||
private String executionId;
|
||||
/**
|
||||
* 流程实例ID
|
||||
*/
|
||||
private String processInstanceId;
|
||||
/**
|
||||
* 流程ID
|
||||
*/
|
||||
private String processDefinitionId;
|
||||
/**
|
||||
* 流程标识
|
||||
*/
|
||||
private String processDefinitionKey;
|
||||
/**
|
||||
* 流程名
|
||||
*/
|
||||
private String processDefinitionName;
|
||||
/**
|
||||
* 流程版本
|
||||
*/
|
||||
private int processDefinitionVersion;
|
||||
/**
|
||||
* 流程说明
|
||||
*/
|
||||
private String processDefinitionDesc;
|
||||
/**
|
||||
* 流程简图名
|
||||
*/
|
||||
private String processDefinitionDiagramResName;
|
||||
/**
|
||||
* 流程重命名
|
||||
*/
|
||||
private String processDefinitionResName;
|
||||
/**
|
||||
* 历史任务流程实例ID 查看流程图会用到
|
||||
*/
|
||||
private String historyProcessInstanceId;
|
||||
/**
|
||||
* 流程实例是否结束
|
||||
*/
|
||||
private String processIsFinished;
|
||||
/**
|
||||
* 历史活动ID
|
||||
*/
|
||||
private String historyActivityId;
|
||||
/**
|
||||
* 历史活动流程
|
||||
*/
|
||||
private String historyActivityName;
|
||||
/**
|
||||
* 历史活动耗时
|
||||
*/
|
||||
private String historyActivityDurationTime;
|
||||
/**
|
||||
* 业务绑定Table
|
||||
*/
|
||||
private String businessTable;
|
||||
/**
|
||||
* 业务绑定ID
|
||||
*/
|
||||
private String businessId;
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 任务意见
|
||||
*/
|
||||
private String comment;
|
||||
/**
|
||||
* 是否通过
|
||||
*/
|
||||
private boolean isPass;
|
||||
/**
|
||||
* 是否通过代号
|
||||
*/
|
||||
private String flag;
|
||||
/**
|
||||
* 开始查询日期
|
||||
*/
|
||||
private Date beginDate;
|
||||
/**
|
||||
* 结束查询日期
|
||||
*/
|
||||
private Date endDate;
|
||||
/**
|
||||
* 流程参数
|
||||
*/
|
||||
private Map<String, Object> variables;
|
||||
|
||||
/**
|
||||
* 获取是否通过
|
||||
*/
|
||||
public boolean isPass() {
|
||||
return ProcessConstant.PASS_ALIAS.equals(flag) || ProcessConstant.PASS_COMMENT.equals(comment);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.core.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
|
||||
/**
|
||||
* FlowEntity
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class FlowEntity extends BaseEntity {
|
||||
|
||||
@TableField(exist = false)
|
||||
private BladeFlow flow;
|
||||
|
||||
public BladeFlow getFlow() {
|
||||
if (flow == null) {
|
||||
flow = new BladeFlow();
|
||||
}
|
||||
return flow;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.core.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 流程类型枚举
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum FlowModeEnum {
|
||||
|
||||
/**
|
||||
* 通用流程
|
||||
*/
|
||||
COMMON("common", 1),
|
||||
|
||||
/**
|
||||
* 定制流程
|
||||
*/
|
||||
CUSTOM("custom", 2),
|
||||
;
|
||||
|
||||
final String name;
|
||||
final int mode;
|
||||
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.core.utils;
|
||||
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.core.tool.utils.StringPool;
|
||||
import org.springblade.core.tool.utils.StringUtil;
|
||||
import org.springblade.flow.core.constant.ProcessConstant;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 工作流工具类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class FlowUtil {
|
||||
|
||||
/**
|
||||
* 定义流程key对应的表名
|
||||
*/
|
||||
private final static Map<String, String> BUSINESS_TABLE = new HashMap<>();
|
||||
|
||||
static {
|
||||
BUSINESS_TABLE.put(ProcessConstant.LEAVE_KEY, "blade_process_leave");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过流程key获取业务表名
|
||||
*
|
||||
* @param key 流程key
|
||||
*/
|
||||
public static String getBusinessTable(String key) {
|
||||
String businessTable = BUSINESS_TABLE.get(key);
|
||||
if (Func.isEmpty(businessTable)) {
|
||||
return StringPool.EMPTY;
|
||||
}
|
||||
return businessTable;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取业务标识
|
||||
*
|
||||
* @param businessTable 业务表
|
||||
* @param businessId 业务表主键
|
||||
* @return businessKey
|
||||
*/
|
||||
public static String getBusinessKey(String businessTable, String businessId) {
|
||||
return StringUtil.format("{}:{}", businessTable, businessId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.core.utils;
|
||||
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.core.tool.utils.StringUtil;
|
||||
|
||||
import static org.springblade.core.launch.constant.FlowConstant.TASK_USR_PREFIX;
|
||||
|
||||
/**
|
||||
* 工作流任务工具类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class TaskUtil {
|
||||
|
||||
/**
|
||||
* 获取任务用户格式
|
||||
*
|
||||
* @return taskUser
|
||||
*/
|
||||
public static String getTaskUser() {
|
||||
return StringUtil.format("{}{}", TASK_USR_PREFIX, AuthUtil.getUserId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取任务用户格式
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @return taskUser
|
||||
*/
|
||||
public static String getTaskUser(String userId) {
|
||||
return StringUtil.format("{}{}", TASK_USR_PREFIX, userId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户主键
|
||||
*
|
||||
* @param taskUser 任务用户
|
||||
* @return userId
|
||||
*/
|
||||
public static Long getUserId(String taskUser) {
|
||||
return Func.toLong(StringUtil.removePrefix(taskUser, TASK_USR_PREFIX));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户组格式
|
||||
*
|
||||
* @return candidateGroup
|
||||
*/
|
||||
public static String getCandidateGroup() {
|
||||
return AuthUtil.getUserRole();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.demo.leave.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.common.cache.UserCache;
|
||||
import org.springblade.core.launch.constant.AppConstant;
|
||||
import org.springblade.core.tenant.annotation.NonDS;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.flow.demo.leave.entity.ProcessLeave;
|
||||
import org.springblade.flow.demo.leave.service.ILeaveService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 控制器
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@NonDS
|
||||
@Hidden
|
||||
@RestController
|
||||
@RequestMapping(AppConstant.APPLICATION_DESK_NAME + "/process/leave")
|
||||
@AllArgsConstructor
|
||||
public class LeaveController {
|
||||
|
||||
private final ILeaveService leaveService;
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*
|
||||
* @param businessId 主键
|
||||
*/
|
||||
@GetMapping("detail")
|
||||
public R<ProcessLeave> detail(Long businessId) {
|
||||
ProcessLeave detail = leaveService.getById(businessId);
|
||||
detail.getFlow().setAssigneeName(UserCache.getUser(detail.getCreateUser()).getName());
|
||||
return R.data(detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增或修改
|
||||
*
|
||||
* @param leave 请假信息
|
||||
*/
|
||||
@PostMapping("start-process")
|
||||
public R startProcess(@RequestBody ProcessLeave leave) {
|
||||
return R.status(leaveService.startProcess(leave));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.demo.leave.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.flow.core.entity.FlowEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 请假流程实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_process_leave")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ProcessLeave extends FlowEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 流程定义id
|
||||
*/
|
||||
private String processDefinitionId;
|
||||
/**
|
||||
* 流程实例id
|
||||
*/
|
||||
private String processInstanceId;
|
||||
/**
|
||||
* 请假开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
/**
|
||||
* 请假结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
/**
|
||||
* 请假理由
|
||||
*/
|
||||
private String reason;
|
||||
/**
|
||||
* 审批人
|
||||
*/
|
||||
private String taskUser;
|
||||
/**
|
||||
* 流程申请时间
|
||||
*/
|
||||
private Date applyTime;
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.demo.leave.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springblade.flow.demo.leave.entity.ProcessLeave;
|
||||
|
||||
/**
|
||||
* Mapper 接口
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface LeaveMapper extends BaseMapper<ProcessLeave> {
|
||||
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.springblade.flow.demo.leave.mapper.LeaveMapper">
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,46 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.demo.leave.service;
|
||||
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
import org.springblade.flow.demo.leave.entity.ProcessLeave;
|
||||
|
||||
/**
|
||||
* 服务类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface ILeaveService extends BaseService<ProcessLeave> {
|
||||
|
||||
/**
|
||||
* 开启流程
|
||||
*
|
||||
* @param leave 请假实体
|
||||
* @return boolean
|
||||
*/
|
||||
boolean startProcess(ProcessLeave leave);
|
||||
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.demo.leave.service.impl;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.support.Kv;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.flow.business.service.IFlowService;
|
||||
import org.springblade.flow.core.constant.ProcessConstant;
|
||||
import org.springblade.flow.core.entity.BladeFlow;
|
||||
import org.springblade.flow.core.utils.FlowUtil;
|
||||
import org.springblade.flow.core.utils.TaskUtil;
|
||||
import org.springblade.flow.demo.leave.entity.ProcessLeave;
|
||||
import org.springblade.flow.demo.leave.mapper.LeaveMapper;
|
||||
import org.springblade.flow.demo.leave.service.ILeaveService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 服务实现类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class LeaveServiceImpl extends BaseServiceImpl<LeaveMapper, ProcessLeave> implements ILeaveService {
|
||||
|
||||
private final IFlowService flowService;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean startProcess(ProcessLeave leave) {
|
||||
String businessTable = FlowUtil.getBusinessTable(ProcessConstant.LEAVE_KEY);
|
||||
if (Func.isEmpty(businessTable)) {
|
||||
throw new ServiceException("流程启动失败,未找到相关业务表");
|
||||
}
|
||||
if (Func.isEmpty(leave.getId())) {
|
||||
// 保存leave
|
||||
leave.setApplyTime(DateUtil.now());
|
||||
save(leave);
|
||||
// 启动流程
|
||||
Kv variables = Kv.create()
|
||||
.set(ProcessConstant.TASK_VARIABLE_CREATE_USER, AuthUtil.getUserName())
|
||||
.set("taskUser", TaskUtil.getTaskUser(leave.getTaskUser()))
|
||||
.set("days", DateUtil.between(leave.getStartTime(), leave.getEndTime()).toDays());
|
||||
BladeFlow flow = flowService.startProcessInstanceById(leave.getProcessDefinitionId(), FlowUtil.getBusinessKey(businessTable, String.valueOf(leave.getId())), variables);
|
||||
if (Func.isNotEmpty(flow)) {
|
||||
log.debug("流程已启动,流程ID:" + flow.getProcessInstanceId());
|
||||
// 返回流程id写入leave
|
||||
leave.setProcessInstanceId(flow.getProcessInstanceId());
|
||||
updateById(leave);
|
||||
} else {
|
||||
throw new ServiceException("开启流程失败");
|
||||
}
|
||||
} else {
|
||||
|
||||
updateById(leave);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
/**
|
||||
* Created by Blade.
|
||||
*
|
||||
* @author zhuangqian
|
||||
*/
|
||||
package org.springblade.flow.demo;
|
||||
@@ -1,53 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.engine.config;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.flowable.spring.SpringProcessEngineConfiguration;
|
||||
import org.flowable.spring.boot.EngineConfigurationConfigurer;
|
||||
import org.flowable.spring.boot.FlowableProperties;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* Flowable配置类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@AllArgsConstructor
|
||||
@EnableConfigurationProperties(FlowableProperties.class)
|
||||
public class FlowableConfiguration implements EngineConfigurationConfigurer<SpringProcessEngineConfiguration> {
|
||||
private final FlowableProperties flowableProperties;
|
||||
|
||||
@Override
|
||||
public void configure(SpringProcessEngineConfiguration engineConfiguration) {
|
||||
engineConfiguration.setActivityFontName(flowableProperties.getActivityFontName());
|
||||
engineConfiguration.setLabelFontName(flowableProperties.getLabelFontName());
|
||||
engineConfiguration.setAnnotationFontName(flowableProperties.getAnnotationFontName());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.engine.constant;
|
||||
|
||||
/**
|
||||
* 流程常量.
|
||||
*
|
||||
* @author zhuangqian
|
||||
*/
|
||||
public interface FlowEngineConstant {
|
||||
|
||||
String FLOWABLE_BASE_PACKAGES = "org.flowable.ui";
|
||||
|
||||
String SUFFIX = ".bpmn20.xml";
|
||||
|
||||
String ACTIVE = "active";
|
||||
|
||||
String SUSPEND = "suspend";
|
||||
|
||||
String STATUS_TODO = "todo";
|
||||
|
||||
String STATUS_CLAIM = "claim";
|
||||
|
||||
String STATUS_SEND = "send";
|
||||
|
||||
String STATUS_DONE = "done";
|
||||
|
||||
String STATUS_FINISHED = "finished";
|
||||
|
||||
String STATUS_UNFINISHED = "unfinished";
|
||||
|
||||
String STATUS_FINISH = "finish";
|
||||
|
||||
String START_EVENT = "startEvent";
|
||||
|
||||
String END_EVENT = "endEvent";
|
||||
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.engine.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.launch.constant.AppConstant;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.secure.annotation.IsAdministrator;
|
||||
import org.springblade.core.tenant.annotation.NonDS;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.flow.engine.entity.FlowExecution;
|
||||
import org.springblade.flow.engine.service.FlowEngineService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 流程状态控制器
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Hidden
|
||||
@NonDS
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@IsAdministrator
|
||||
@RequestMapping(AppConstant.APPLICATION_FLOW_NAME + "/follow")
|
||||
@Tag(name = "流程状态接口", description = "流程状态接口")
|
||||
public class FlowFollowController {
|
||||
|
||||
private final FlowEngineService flowEngineService;
|
||||
|
||||
/**
|
||||
* 流程状态列表
|
||||
*/
|
||||
@GetMapping("list")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "分页", description = "传入notice")
|
||||
public R<IPage<FlowExecution>> list(Query query, @Parameter(description = "流程实例id") String processInstanceId, @Parameter(description = "流程key") String processDefinitionKey) {
|
||||
IPage<FlowExecution> pages = flowEngineService.selectFollowPage(Condition.getPage(query), processInstanceId, processDefinitionKey);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除流程实例
|
||||
*/
|
||||
@PostMapping("delete-process-instance")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "删除", description = "传入主键集合")
|
||||
public R deleteProcessInstance(@Parameter(description = "流程实例id") @RequestParam String processInstanceId, @Parameter(description = "删除原因") @RequestParam String deleteReason) {
|
||||
boolean temp = flowEngineService.deleteProcessInstance(processInstanceId, deleteReason);
|
||||
return R.status(temp);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,133 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.engine.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.launch.constant.AppConstant;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.secure.annotation.IsAdministrator;
|
||||
import org.springblade.core.tenant.annotation.NonDS;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.support.Kv;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.flow.engine.constant.FlowEngineConstant;
|
||||
import org.springblade.flow.engine.entity.FlowProcess;
|
||||
import org.springblade.flow.engine.service.FlowEngineService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 流程管理接口
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Hidden
|
||||
@NonDS
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@IsAdministrator
|
||||
@RequestMapping(AppConstant.APPLICATION_FLOW_NAME + "/manager")
|
||||
@Tag(name = "流程管理接口", description = "流程管理接口")
|
||||
public class FlowManagerController {
|
||||
|
||||
private final FlowEngineService flowEngineService;
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
@GetMapping("list")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "分页", description = "传入流程类型")
|
||||
public R<IPage<FlowProcess>> list(@Parameter(description = "流程类型") String category, Query query, @RequestParam(required = false, defaultValue = "1") Integer mode) {
|
||||
IPage<FlowProcess> pages = flowEngineService.selectProcessPage(Condition.getPage(query), category, mode);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 变更流程状态
|
||||
*
|
||||
* @param state 状态
|
||||
* @param processId 流程id
|
||||
*/
|
||||
@PostMapping("change-state")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "变更流程状态", description = "传入state,processId")
|
||||
public R changeState(@RequestParam String state, @RequestParam String processId) {
|
||||
String msg = flowEngineService.changeState(state, processId);
|
||||
return R.success(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除部署流程
|
||||
*
|
||||
* @param deploymentIds 部署流程id集合
|
||||
*/
|
||||
@PostMapping("delete-deployment")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "删除部署流程", description = "部署流程id集合")
|
||||
public R deleteDeployment(String deploymentIds) {
|
||||
return R.status(flowEngineService.deleteDeployment(deploymentIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查流程文件格式
|
||||
*
|
||||
* @param file 流程文件
|
||||
*/
|
||||
@PostMapping("check-upload")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "上传部署流程文件", description = "传入文件")
|
||||
public R checkUpload(@RequestParam MultipartFile file) {
|
||||
boolean temp = Objects.requireNonNull(file.getOriginalFilename()).endsWith(FlowEngineConstant.SUFFIX);
|
||||
return R.data(Kv.create().set("name", file.getOriginalFilename()).set("success", temp));
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传部署流程文件
|
||||
*
|
||||
* @param files 流程文件
|
||||
* @param category 类型
|
||||
*/
|
||||
@PostMapping("deploy-upload")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "上传部署流程文件", description = "传入文件")
|
||||
public R deployUpload(@RequestParam List<MultipartFile> files,
|
||||
@RequestParam String category,
|
||||
@RequestParam(required = false, defaultValue = "") String tenantIds) {
|
||||
return R.status(flowEngineService.deployUpload(files, category, Func.toStrList(tenantIds)));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.engine.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.launch.constant.AppConstant;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.secure.annotation.IsAdministrator;
|
||||
import org.springblade.core.tenant.annotation.NonDS;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.core.xss.annotation.XssIgnore;
|
||||
import org.springblade.flow.engine.entity.FlowModel;
|
||||
import org.springblade.flow.engine.service.FlowEngineService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 流程模型控制器
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Hidden
|
||||
@NonDS
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@IsAdministrator
|
||||
@RequestMapping(AppConstant.APPLICATION_FLOW_NAME + "/model")
|
||||
@Tag(name = "流程模型管理接口", description = "流程模型管理接口")
|
||||
public class FlowModelController {
|
||||
|
||||
private final FlowEngineService flowEngineService;
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@Parameters({
|
||||
@Parameter(name = "modelKey", description = "模型标识", in = ParameterIn.QUERY, schema = @Schema(type = "string")),
|
||||
@Parameter(name = "name", description = "模型名称", in = ParameterIn.QUERY, schema = @Schema(type = "string"))
|
||||
})
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "分页", description = "传入notice")
|
||||
public R<IPage<FlowModel>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> flow, Query query) {
|
||||
IPage<FlowModel> pages = flowEngineService.page(Condition.getPage(query), Condition.getQueryWrapper(flow, FlowModel.class)
|
||||
.select("id,model_key modelKey,name,description,version,created,last_updated lastUpdated")
|
||||
.orderByDesc("last_updated"));
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "删除", description = "传入主键集合")
|
||||
public R remove(@Parameter(description = "主键集合") @RequestParam String ids) {
|
||||
boolean temp = flowEngineService.removeByIds(Func.toStrList(ids));
|
||||
return R.status(temp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 部署
|
||||
*/
|
||||
@PostMapping("/deploy")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "部署", description = "传入模型id和分类")
|
||||
public R deploy(@Parameter(description = "模型id") @RequestParam String modelId,
|
||||
@Parameter(description = "工作流分类") @RequestParam String category,
|
||||
@Parameter(description = "租户ID") @RequestParam(required = false, defaultValue = "") String tenantIds) {
|
||||
boolean temp = flowEngineService.deployModel(modelId, category, Func.toStrList(tenantIds));
|
||||
return R.status(temp);
|
||||
}
|
||||
|
||||
@XssIgnore
|
||||
@PostMapping("submit")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "保存/编辑")
|
||||
@Parameters({
|
||||
@Parameter(name = "id", description = "模型id"),
|
||||
@Parameter(name = "name", description = "模型名称", required = true),
|
||||
@Parameter(name = "modelKey", description = "模型key", required = true),
|
||||
@Parameter(name = "description", description = "模型描述"),
|
||||
@Parameter(name = "xml", description = "模型xml", required = true),
|
||||
})
|
||||
public R<FlowModel> submit(@RequestBody @Parameter(hidden = true) FlowModel model) {
|
||||
return R.data(flowEngineService.submitModel(model));
|
||||
}
|
||||
|
||||
@GetMapping("detail")
|
||||
@Operation(summary = "详情")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Parameters({
|
||||
@Parameter(name = "id", description = "模型id", required = true),
|
||||
})
|
||||
public R<FlowModel> detail(String id) {
|
||||
return R.data(flowEngineService.getById(id));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.engine.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springblade.core.launch.constant.AppConstant;
|
||||
import org.springblade.core.tenant.annotation.NonDS;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.flow.core.entity.BladeFlow;
|
||||
import org.springblade.flow.engine.service.FlowEngineService;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 流程通用控制器
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Hidden
|
||||
@NonDS
|
||||
@Slf4j
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping(AppConstant.APPLICATION_FLOW_NAME + "/process")
|
||||
@Tag(name = "流程通用接口", description = "流程通用接口")
|
||||
public class FlowProcessController {
|
||||
|
||||
private static final String IMAGE_NAME = "image";
|
||||
private final FlowEngineService flowEngineService;
|
||||
|
||||
/**
|
||||
* 获取流转历史列表
|
||||
*
|
||||
* @param processInstanceId 流程实例id
|
||||
* @param startActivityId 开始节点id
|
||||
* @param endActivityId 结束节点id
|
||||
*/
|
||||
@GetMapping(value = "history-flow-list")
|
||||
public R<List<BladeFlow>> historyFlowList(@RequestParam String processInstanceId, String startActivityId, String endActivityId) {
|
||||
return R.data(flowEngineService.historyFlowList(processInstanceId, startActivityId, endActivityId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程节点进程图
|
||||
*
|
||||
* @param processDefinitionId 流程id
|
||||
* @param processInstanceId 流程实例id
|
||||
*/
|
||||
@GetMapping(value = "model-view")
|
||||
public R modelView(String processDefinitionId, String processInstanceId) {
|
||||
return R.data(flowEngineService.modelView(processDefinitionId, processInstanceId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程节点进程图
|
||||
*
|
||||
* @param processInstanceId 流程实例id
|
||||
* @param httpServletResponse http响应
|
||||
*/
|
||||
@GetMapping(value = "diagram-view")
|
||||
public void diagramView(String processInstanceId, HttpServletResponse httpServletResponse) {
|
||||
flowEngineService.diagramView(processInstanceId, httpServletResponse);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程图展示
|
||||
*
|
||||
* @param processDefinitionId 流程id
|
||||
* @param processInstanceId 实例id
|
||||
* @param resourceType 资源类型
|
||||
* @param response 响应
|
||||
*/
|
||||
@GetMapping("resource-view")
|
||||
public void resourceView(@RequestParam String processDefinitionId, String processInstanceId, @RequestParam(defaultValue = IMAGE_NAME) String resourceType, HttpServletResponse response) {
|
||||
flowEngineService.resourceView(processDefinitionId, processInstanceId, resourceType, response);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.engine.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 运行实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
public class FlowExecution implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id;
|
||||
private String name;
|
||||
private String startUserId;
|
||||
private String startUser;
|
||||
private Date startTime;
|
||||
private String taskDefinitionId;
|
||||
private String taskDefinitionKey;
|
||||
private String category;
|
||||
private String categoryName;
|
||||
private String processInstanceId;
|
||||
private String processDefinitionId;
|
||||
private String processDefinitionKey;
|
||||
private String activityId;
|
||||
private int suspensionState;
|
||||
private String executionId;
|
||||
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.flow.engine.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 流程模型
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@TableName("ACT_DE_MODEL")
|
||||
public class FlowModel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final int MODEL_TYPE_BPMN = 0;
|
||||
public static final int MODEL_TYPE_FORM = 2;
|
||||
public static final int MODEL_TYPE_APP = 3;
|
||||
public static final int MODEL_TYPE_DECISION_TABLE = 4;
|
||||
public static final int MODEL_TYPE_CMMN = 5;
|
||||
|
||||
private String id;
|
||||
private String name;
|
||||
private String modelKey;
|
||||
private String description;
|
||||
private Date created;
|
||||
private Date lastUpdated;
|
||||
private String createdBy;
|
||||
private String lastUpdatedBy;
|
||||
private Integer version;
|
||||
private String modelEditorJson;
|
||||
private String modelComment;
|
||||
private Integer modelType;
|
||||
private String tenantId;
|
||||
private byte[] thumbnail;
|
||||
private String modelEditorXml;
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user