Compare commits
2 Commits
main
...
reviewCode
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d4beedb1d | ||
|
|
225b8cabee |
6
doc/script/docker/app/.env
Normal file
6
doc/script/docker/app/.env
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
BLADE_PROFILES_ACTIVE=test
|
||||||
|
BLADE_OAUTH2_PUBLIC_KEY=国密公钥需自行填写
|
||||||
|
BLADE_OAUTH2_PRIVATE_KEY=国密私钥需自行填写
|
||||||
|
BLADE_TOKEN_SIGN_KEY=令牌密钥需自行填写
|
||||||
|
HOST_IP=宿主机IP需自行填写
|
||||||
|
MYSQL_ROOT_PASSWORD=MYSQL的ROOT密码需自行填写
|
||||||
6
doc/script/docker/app/README.md
Normal file
6
doc/script/docker/app/README.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
## 一键部署流程
|
||||||
|
1. 将开发完毕的数据库脚本放入`database`目录下,重命名为`init.sql`, 提前修改好`admin`的密码。
|
||||||
|
2. 将`.env`文件内所需的内容填充完整,注意`publicKey`需要与前端配置保持一致。
|
||||||
|
3. 将前端工程配置好`publicKey`后打包,将打包后的文件放入`nginx/html`目录下。
|
||||||
|
4. 生产环境需采用`prod`模式启动,将会强制校验弱密码,未修改`admin`密码将会无法登陆。
|
||||||
|
5. 执行`docker compose up -d`命令启动容器即可。
|
||||||
3635
doc/script/docker/app/database/init.sql
Normal file
3635
doc/script/docker/app/database/init.sql
Normal file
File diff suppressed because one or more lines are too long
114
doc/script/docker/app/docker-compose.yaml
Normal file
114
doc/script/docker/app/docker-compose.yaml
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
# 定义网络配置
|
||||||
|
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
|
||||||
46
doc/script/docker/app/nginx/html/index.html
Normal file
46
doc/script/docker/app/nginx/html/index.html
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<!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>
|
||||||
77
doc/script/docker/app/nginx/nginx.conf
Normal file
77
doc/script/docker/app/nginx/nginx.conf
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
|
||||||
|
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/;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
27
doc/script/docker/elk/README.md
Normal file
27
doc/script/docker/elk/README.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
## 一、调整内存: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
|
||||||
88
doc/script/docker/elk/deploy.sh
Normal file
88
doc/script/docker/elk/deploy.sh
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
#./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
|
||||||
115
doc/script/docker/elk/docker-compose.yml
Normal file
115
doc/script/docker/elk/docker-compose.yml
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
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
|
||||||
28
doc/script/docker/elk/es-master.yml
Normal file
28
doc/script/docker/elk/es-master.yml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# 集群名称
|
||||||
|
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"
|
||||||
28
doc/script/docker/elk/es-slave1.yml
Normal file
28
doc/script/docker/elk/es-slave1.yml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# 集群名称
|
||||||
|
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"
|
||||||
28
doc/script/docker/elk/es-slave2.yml
Normal file
28
doc/script/docker/elk/es-slave2.yml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# 集群名称
|
||||||
|
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"
|
||||||
37
doc/script/docker/elk/filebeat.yml
Normal file
37
doc/script/docker/elk/filebeat.yml
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
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: ~
|
||||||
8
doc/script/docker/elk/kibana.yml
Normal file
8
doc/script/docker/elk/kibana.yml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# 服务端口
|
||||||
|
server.port: 5601
|
||||||
|
# 服务IP
|
||||||
|
server.host: "0.0.0.0"
|
||||||
|
# ES
|
||||||
|
elasticsearch.hosts: ["http://es-master:9200"]
|
||||||
|
# 汉化
|
||||||
|
i18n.locale: "zh-CN"
|
||||||
23
doc/script/docker/elk/logstash-filebeat.conf
Normal file
23
doc/script/docker/elk/logstash-filebeat.conf
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
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}"
|
||||||
|
}
|
||||||
|
}
|
||||||
8
doc/script/docker/elk/logstash.yml
Normal file
8
doc/script/docker/elk/logstash.yml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# 服务IP
|
||||||
|
http.host: "0.0.0.0"
|
||||||
|
# ES
|
||||||
|
xpack.monitoring.elasticsearch.hosts: [ "http://es-master:9200" ]
|
||||||
|
|
||||||
|
xpack.monitoring.enabled: true
|
||||||
|
|
||||||
|
xpack.management.enabled: false
|
||||||
16
doc/script/docker/elk/undeploy.sh
Normal file
16
doc/script/docker/elk/undeploy.sh
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#./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,165 +0,0 @@
|
|||||||
create table user_market_genealogy
|
|
||||||
(
|
|
||||||
id int8 not null primary key, -- user_id
|
|
||||||
level int4 default 1, --当前层数
|
|
||||||
pid int8,
|
|
||||||
root_id int8, --遍历当前树
|
|
||||||
group_id int8, --树内最近团队长的id
|
|
||||||
genealogy_list int8[], -- 往上所有父级
|
|
||||||
user_child_number int, --用户下线总人数
|
|
||||||
user_direct_number int, --用户直推总人数
|
|
||||||
user_direct_list int8[], --直推列表
|
|
||||||
remark text,
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4 default 1, -- 1: active -- 2: revoked (注销) -- 3: frozen (冻结)
|
|
||||||
is_deleted int4 default 0
|
|
||||||
);
|
|
||||||
CREATE INDEX idx_ug_pid ON user_market_genealogy (pid) WHERE status = 1;
|
|
||||||
CREATE INDEX idx_ug_root ON user_market_genealogy (root_id) WHERE status = 1;
|
|
||||||
CREATE INDEX idx_ug_root_level ON user_market_genealogy (root_id, level) WHERE status = 1;
|
|
||||||
CREATE INDEX idx_ug_path ON user_market_genealogy USING gin (genealogy_list);
|
|
||||||
CREATE INDEX idx_ug_direct ON user_market_genealogy USING gin (user_direct_list);
|
|
||||||
|
|
||||||
comment on table user_market_genealogy is '用户族谱表';
|
|
||||||
comment on column user_market_genealogy.id is '主键';
|
|
||||||
comment on column user_market_genealogy.pid is '上级id';
|
|
||||||
comment on column user_market_genealogy.level is '层级';
|
|
||||||
comment on column user_market_genealogy.root_id is '根节点id';
|
|
||||||
comment on column user_market_genealogy.group_id is '团队长id';
|
|
||||||
comment on column user_market_genealogy.genealogy_list is '族谱列表';
|
|
||||||
comment on column user_market_genealogy.user_child_number is '用户下线总人数';
|
|
||||||
comment on column user_market_genealogy.user_direct_number is '用户直推总人数';
|
|
||||||
comment on column user_market_genealogy.user_direct_list is '直推列表';
|
|
||||||
comment on column user_market_genealogy.create_user is '创建人';
|
|
||||||
comment on column user_market_genealogy.create_dept is '创建部门';
|
|
||||||
comment on column user_market_genealogy.create_time is '创建时间';
|
|
||||||
comment on column user_market_genealogy.update_user is '修改人';
|
|
||||||
comment on column user_market_genealogy.update_time is '修改时间';
|
|
||||||
comment on column user_market_genealogy.status is '状态 -- 1: active -- 2: revoked (注销) -- 3: frozen (冻结)';
|
|
||||||
comment on column user_market_genealogy.is_deleted is '是否已删除';
|
|
||||||
alter table user_market_genealogy
|
|
||||||
owner to yicha1lu;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create table user_market_tree
|
|
||||||
(
|
|
||||||
id int8 not null primary key, --user_id
|
|
||||||
level int4 default 1,
|
|
||||||
pid int8,
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4 default 1, -- 1: active -- 2: revoked (注销) -- 3: frozen (冻结)
|
|
||||||
is_deleted int4 default 0
|
|
||||||
);
|
|
||||||
CREATE INDEX idx_user_tree_pid ON user_market_tree (pid) WHERE status = 1;
|
|
||||||
CREATE INDEX idx_user_tree_level ON user_market_tree (level) WHERE status = 1;
|
|
||||||
|
|
||||||
comment on table user_market_tree is '用户树结构表';
|
|
||||||
comment on column user_market_tree.id is '主键';
|
|
||||||
comment on column user_market_tree.pid is '上级id';
|
|
||||||
comment on column user_market_tree.level is '层级';
|
|
||||||
|
|
||||||
comment on column user_market_tree.create_user is '创建人';
|
|
||||||
comment on column user_market_tree.create_dept is '创建部门';
|
|
||||||
comment on column user_market_tree.create_time is '创建时间';
|
|
||||||
comment on column user_market_tree.update_user is '修改人';
|
|
||||||
comment on column user_market_tree.update_time is '修改时间';
|
|
||||||
comment on column user_market_tree.status is '状态';
|
|
||||||
comment on column user_market_tree.is_deleted is '是否已删除';
|
|
||||||
alter table user_market_tree
|
|
||||||
owner to yicha1lu;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create table user_market_info
|
|
||||||
(
|
|
||||||
id int8 not null primary key, --user_id
|
|
||||||
pid int8,
|
|
||||||
synchronized int4 default 0, --是否同步
|
|
||||||
vendor int4 default 0, -- 是否成为服务商 0-否 1-是
|
|
||||||
e_signed int4 default 0, -- 是否已经签署电子合同 0-否 1-是
|
|
||||||
e_signed_url text, -- 电子合同地址
|
|
||||||
verified int4 default 0, -- 是否实名用户 0-否 1-是
|
|
||||||
verified_date timestamp(6), -- 实名时间
|
|
||||||
real_name varchar(128), -- 实名姓名
|
|
||||||
id_card varchar(128), -- 实名身份证
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4 default 1, -- 1: active -- 2: revoked (注销) -- 3: frozen (冻结)
|
|
||||||
is_deleted int4 default 0
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX idx_user_market_pid ON user_market_info (pid) WHERE status = 1;
|
|
||||||
|
|
||||||
|
|
||||||
comment on table user_market_info is '用户拓展信息表';
|
|
||||||
|
|
||||||
comment on column user_market_info.id is '主键';
|
|
||||||
comment on column user_market_info.pid is '邀请人';
|
|
||||||
comment on column user_market_info.synchronized is '是否同步族谱 0-否 1-是';
|
|
||||||
comment on column user_market_info.vendor is '是否成为服务商 0-否 1-是';
|
|
||||||
comment on column user_market_info.e_signed is '是否签署法大大协议 0-否 1-是';
|
|
||||||
comment on column user_market_info.e_signed_url is '电子合同地址';
|
|
||||||
comment on column user_market_info.verified is '是否实名用户 0-否 1-是';
|
|
||||||
comment on column user_market_info.verified_date is '实名时间';
|
|
||||||
comment on column user_market_info.real_name is '实名姓名';
|
|
||||||
comment on column user_market_info.id_card is '实名身份证';
|
|
||||||
comment on column user_market_info.create_user is '创建人';
|
|
||||||
comment on column user_market_info.create_dept is '创建部门';
|
|
||||||
comment on column user_market_info.create_time is '创建时间';
|
|
||||||
comment on column user_market_info.update_user is '修改人';
|
|
||||||
comment on column user_market_info.update_time is '修改时间';
|
|
||||||
comment on column user_market_info.status is '状态';
|
|
||||||
comment on column user_market_info.is_deleted is '是否已删除';
|
|
||||||
alter table user_market_info owner to yicha1lu;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create table user_market_level_info
|
|
||||||
(
|
|
||||||
id int8 not null primary key, --user_id
|
|
||||||
current_vip_id int4, --用户当前等级
|
|
||||||
current_vip_name varchar(12), --用户当前等级
|
|
||||||
pid int8,
|
|
||||||
p_vip int4 default 1,
|
|
||||||
version int4 default 1,
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4 default 1, -- 1: active -- 2: revoked (注销) -- 3: frozen (冻结)
|
|
||||||
is_deleted int4 default 0
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX idx_user_level_pid ON user_market_level_info (pid) WHERE status = 1;
|
|
||||||
|
|
||||||
comment on table user_market_level_info is '用户等级信息表';
|
|
||||||
|
|
||||||
comment on column user_market_level_info.id is '主键';
|
|
||||||
comment on column user_market_level_info.current_vip_id is '用户当前升级id';
|
|
||||||
comment on column user_market_level_info.current_vip_name is '用户当前升级名称';
|
|
||||||
comment on column user_market_level_info.pid is '父级id';
|
|
||||||
comment on column user_market_level_info.p_vip is '父级升级升级';
|
|
||||||
comment on column user_market_level_info.version is '版本号';
|
|
||||||
comment on column user_market_level_info.create_user is '创建人';
|
|
||||||
comment on column user_market_level_info.create_dept is '创建部门';
|
|
||||||
comment on column user_market_level_info.create_time is '创建时间';
|
|
||||||
comment on column user_market_level_info.update_user is '修改人';
|
|
||||||
comment on column user_market_level_info.update_time is '修改时间';
|
|
||||||
comment on column user_market_level_info.status is '状态';
|
|
||||||
comment on column user_market_level_info.is_deleted is '是否已删除';
|
|
||||||
alter table user_market_level_info
|
|
||||||
owner to yicha1lu;
|
|
||||||
|
|
||||||
@@ -1,254 +0,0 @@
|
|||||||
--- 用户积分 = user_point
|
|
||||||
--- 现金券 = cash_coupon
|
|
||||||
--- 福利包 = benefit_package
|
|
||||||
--- 福利积分 = benefit_point
|
|
||||||
--- 福利值 = benefit_value
|
|
||||||
|
|
||||||
CREATE TABLE user_market_benefit_package_template --积分包信息模板表
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY,
|
|
||||||
package_name VARCHAR(128) NULL,
|
|
||||||
user_limit int4 default 0, -- 最大购买数量
|
|
||||||
max_limit int4 default 0, -- 全网最大兑换数量
|
|
||||||
day_limit int4 default 0, -- 产出总天数
|
|
||||||
benefit_point_amount decimal(14, 2) default 0, -- 总产出福利积分
|
|
||||||
benefit_value_amount decimal(14, 2) default 0, -- 购买赠与福利值
|
|
||||||
benefit_point_price decimal(14, 2) default 0, --兑换包需要的福利积分
|
|
||||||
cash_coupon_price decimal(14, 2) default 0, --兑换包需要的现金券
|
|
||||||
exchanged_quantity int4 default 0, -- 已兑换数量
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4 default 1,
|
|
||||||
is_deleted int4 default 0
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE user_market_benefit_package_template IS '积分包信息表';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_template.id IS '主键';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_template.package_name IS '积分包名称';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_template.user_limit IS '最大购买数量';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_template.day_limit IS '产出总天数';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_template.benefit_point_amount IS '总产出福利积分';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_template.benefit_value_amount IS '购买赠与福利值';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_template.benefit_point_price IS '兑换包需要的福利积分';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_template.cash_coupon_price IS '兑换包需要的现金券';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_template.max_limit IS '全网最大兑换数量';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_template.exchanged_quantity IS '已兑换数量';
|
|
||||||
comment on column user_market_benefit_package_template.create_user is '创建人';
|
|
||||||
comment on column user_market_benefit_package_template.create_dept is '创建部门';
|
|
||||||
comment on column user_market_benefit_package_template.create_time is '创建时间';
|
|
||||||
comment on column user_market_benefit_package_template.update_user is '修改人';
|
|
||||||
comment on column user_market_benefit_package_template.update_time is '修改时间';
|
|
||||||
comment on column user_market_benefit_package_template.status is '状态';
|
|
||||||
comment on column user_market_benefit_package_template.is_deleted is '是否已删除';
|
|
||||||
|
|
||||||
alter table user_market_benefit_package_template
|
|
||||||
owner to yicha1lu;
|
|
||||||
|
|
||||||
|
|
||||||
create table user_market_benefit_package --用户福利积分包表
|
|
||||||
(
|
|
||||||
id int8 not null primary key,
|
|
||||||
statistical_date timestamp(6),
|
|
||||||
user_id int8,
|
|
||||||
phone int8,
|
|
||||||
user_name varchar(128),
|
|
||||||
package_id int8,
|
|
||||||
package_name varchar(128),
|
|
||||||
type int4 default 1, -- 1-积分兑换 2-后台划拨
|
|
||||||
user_benefit decimal(14, 2) default 0, --兑换包需要的福利积分
|
|
||||||
user_cash decimal(14, 2) default 0, --兑换包需要的现金券
|
|
||||||
give_amount decimal(14, 2) default 0, -- 购买赠与福利值
|
|
||||||
day_total int4 default 0, -- 产出总天数
|
|
||||||
amount_total decimal(14, 2) default 0, -- 总产出福利积分
|
|
||||||
amount_day decimal(14, 2) default 0, -- 每日产出福利积分 = 总产出 / 总产出
|
|
||||||
amount_out decimal(16, 4) default 0, -- 已产出福利积分
|
|
||||||
out_day int4 default 0, -- 已产出天数
|
|
||||||
is_complete integer default 0, -- 是否完成 0未完成 1完成
|
|
||||||
expired_date timestamp(6),
|
|
||||||
is_expired int4 default 0,
|
|
||||||
remark text,
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4 default 1,
|
|
||||||
is_deleted int4 default 0
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create index upi_complete_index
|
|
||||||
on user_market_benefit_package (is_deleted, user_id, is_complete, is_expired);
|
|
||||||
|
|
||||||
create index upi_date_index
|
|
||||||
on user_market_benefit_package (is_deleted, statistical_date, user_id);
|
|
||||||
|
|
||||||
create index upi_expired_index
|
|
||||||
on user_market_benefit_package (is_deleted, expired_date, is_expired);
|
|
||||||
|
|
||||||
COMMENT ON TABLE user_market_benefit_package IS '用户积分包信息表';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.id IS '主键';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.user_id IS '用户id';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.phone IS '用户手机号';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.user_name IS '用户名';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.package_id IS '积分包id';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.package_name IS '积分包名称';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.type IS '1-积分兑换 2-后台划拨';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.user_benefit IS '兑换包需要的福利积分';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.user_cash IS '兑换包需要的现金券';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.give_amount IS '购买赠与福利值';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.day_total IS '产出总天数';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.amount_total IS '总产出福利积分';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.amount_day IS '每日产出福利积分';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.amount_out IS '已产出福利积分';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.out_day IS '已产出天数';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.is_complete IS '是否完成 0-未完成 1-完成';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.expired_date IS '过期时间';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.is_expired IS '是否过期 0-未过期 1-已过期';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.remark IS '备注';
|
|
||||||
comment on column user_market_benefit_package.create_user is '创建人';
|
|
||||||
comment on column user_market_benefit_package.create_dept is '创建部门';
|
|
||||||
comment on column user_market_benefit_package.create_time is '创建时间';
|
|
||||||
comment on column user_market_benefit_package.update_user is '修改人';
|
|
||||||
comment on column user_market_benefit_package.update_time is '修改时间';
|
|
||||||
comment on column user_market_benefit_package.status is '状态';
|
|
||||||
comment on column user_market_benefit_package.is_deleted is '是否已删除';
|
|
||||||
|
|
||||||
alter table user_market_benefit_package
|
|
||||||
owner to yicha1lu;
|
|
||||||
|
|
||||||
create table user_market_benefit_package_log
|
|
||||||
(
|
|
||||||
id int8 not null primary key,
|
|
||||||
statistical_date timestamp(6),
|
|
||||||
user_id int8,
|
|
||||||
phone int8,
|
|
||||||
user_name varchar(128),
|
|
||||||
type int4 default 1, -- 1-积分兑换 2-后台划拨
|
|
||||||
user_package_id int8,
|
|
||||||
package_name varchar(128),
|
|
||||||
package_detail text,
|
|
||||||
give_number int4 default 1,
|
|
||||||
remark text,
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4 default 1,
|
|
||||||
is_deleted int4 default 0
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
create index gpl_date_index
|
|
||||||
on user_market_benefit_package_log (is_deleted, statistical_date, user_id);
|
|
||||||
|
|
||||||
|
|
||||||
COMMENT ON TABLE user_market_benefit_package_log IS '划拨积分记录';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.id IS '主键';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.statistical_date IS '统计日期';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.user_id IS '用户id';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.phone IS '用户手机号';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.user_name IS '用户名';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.type IS '1-积分兑换 2-后台划拨';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.user_package_id IS '积分包id';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.package_name IS '积分包名称';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.package_detail IS '积分包信息快照';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.give_number IS '赠送数量';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.remark IS '备注';
|
|
||||||
comment on column user_market_benefit_package_log.create_user is '创建人';
|
|
||||||
comment on column user_market_benefit_package_log.create_dept is '创建部门';
|
|
||||||
comment on column user_market_benefit_package_log.create_time is '创建时间';
|
|
||||||
comment on column user_market_benefit_package_log.update_user is '修改人';
|
|
||||||
comment on column user_market_benefit_package_log.update_time is '修改时间';
|
|
||||||
comment on column user_market_benefit_package_log.status is '状态';
|
|
||||||
comment on column user_market_benefit_package_log.is_deleted is '是否已删除';
|
|
||||||
|
|
||||||
alter table user_market_benefit_package_log
|
|
||||||
owner to yicha1lu;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create table user_benefit_point
|
|
||||||
(
|
|
||||||
id int8 not null primary key,
|
|
||||||
amount decimal(14, 2) default 0,
|
|
||||||
version int4 default 1,
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4 default 1,
|
|
||||||
is_deleted int4 default 0
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
comment on table user_benefit_point is '用户福利值表';
|
|
||||||
comment on column user_benefit_point.id is '主键';
|
|
||||||
comment on column user_benefit_point.amount is '金额';
|
|
||||||
comment on column user_benefit_point.version is '版本号';
|
|
||||||
comment on column user_benefit_point.create_user is '创建人';
|
|
||||||
comment on column user_benefit_point.create_dept is '创建部门';
|
|
||||||
comment on column user_benefit_point.create_time is '创建时间';
|
|
||||||
comment on column user_benefit_point.update_user is '修改人';
|
|
||||||
comment on column user_benefit_point.update_time is '修改时间';
|
|
||||||
comment on column user_benefit_point.status is '状态';
|
|
||||||
comment on column user_benefit_point.is_deleted is '是否已删除';
|
|
||||||
|
|
||||||
alter table user_benefit_point
|
|
||||||
owner to yicha1lu;
|
|
||||||
|
|
||||||
create table user_benefit_point_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 int4 default 1,
|
|
||||||
statistical_date timestamp(6),
|
|
||||||
remark text,
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4 default 1,
|
|
||||||
is_deleted int4 default 0
|
|
||||||
|
|
||||||
);
|
|
||||||
create index ub_log_date_index
|
|
||||||
on user_benefit_point_log (is_deleted, user_id, statistical_date, type);
|
|
||||||
|
|
||||||
comment on table user_benefit_point_log is '用户福利值流水表';
|
|
||||||
comment on column user_benefit_point_log.id is '主键';
|
|
||||||
comment on column user_benefit_point_log.user_id is '用户id';
|
|
||||||
comment on column user_benefit_point_log.user_phone is '用户手机号';
|
|
||||||
comment on column user_benefit_point_log.user_name is '用户名称';
|
|
||||||
comment on column user_benefit_point_log.amount is '金额';
|
|
||||||
comment on column user_benefit_point_log.source_id is '来源id';
|
|
||||||
comment on column user_benefit_point_log.user_pack_id is '用户积分包id';
|
|
||||||
comment on column user_benefit_point_log.source_detail is '来源详情';
|
|
||||||
comment on column user_benefit_point_log.order_id is '订单id';
|
|
||||||
comment on column user_benefit_point_log.type is '消费类型 1-收入 2-支出';
|
|
||||||
comment on column user_benefit_point_log.statistical_date is '统计时间';
|
|
||||||
comment on column user_benefit_point_log.remark is '备注';
|
|
||||||
comment on column user_benefit_point_log.create_user is '创建人';
|
|
||||||
comment on column user_benefit_point_log.create_dept is '创建部门';
|
|
||||||
comment on column user_benefit_point_log.create_time is '创建时间';
|
|
||||||
comment on column user_benefit_point_log.update_user is '修改人';
|
|
||||||
comment on column user_benefit_point_log.update_time is '修改时间';
|
|
||||||
comment on column user_benefit_point_log.status is '状态';
|
|
||||||
comment on column user_benefit_point_log.is_deleted is '是否已删除';
|
|
||||||
alter table user_benefit_point_log
|
|
||||||
owner to yicha1lu;
|
|
||||||
@@ -1,193 +0,0 @@
|
|||||||
CREATE TABLE mall_product
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY,
|
|
||||||
serial_number VARCHAR(100) DEFAULT '' NOT NULL,
|
|
||||||
product_name VARCHAR(255) DEFAULT '' NOT NULL,
|
|
||||||
main_image_urls text[] DEFAULT '{}' NOT NULL,
|
|
||||||
detail_image_urls text[] DEFAULT '{}' NULL,
|
|
||||||
thumb_image_url text NULL,
|
|
||||||
specs JSONB DEFAULT '[]',
|
|
||||||
unit VARCHAR(12),
|
|
||||||
category_id int8 DEFAULT 0 NOT NULL,
|
|
||||||
category_path int8[] DEFAULT '{}' NOT NULL,
|
|
||||||
original_price DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
|
||||||
retail_price DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
|
||||||
freight DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
|
||||||
sales int4 DEFAULT 0 NOT NULL,
|
|
||||||
stock int4 DEFAULT 0 NOT NULL,
|
|
||||||
tags JSONB DEFAULT '[]' NOT NULL,
|
|
||||||
status int4 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 int4 DEFAULT 0 NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE mall_product IS '商城商品';
|
|
||||||
COMMENT ON COLUMN mall_product.id IS '主键';
|
|
||||||
COMMENT ON COLUMN mall_product.serial_number IS '商品编码';
|
|
||||||
COMMENT ON COLUMN mall_product.product_name IS '商品名称';
|
|
||||||
COMMENT ON COLUMN mall_product.main_image_urls IS '主图';
|
|
||||||
COMMENT ON COLUMN mall_product.detail_image_urls IS '详情图';
|
|
||||||
COMMENT ON COLUMN mall_product.thumb_image_url IS '缩略图';
|
|
||||||
COMMENT ON COLUMN mall_product.specs IS '规格详情,JSONB数组 [{"attr":"颜色","value":"红"}]';
|
|
||||||
COMMENT ON COLUMN mall_product.unit IS '单位';
|
|
||||||
COMMENT ON COLUMN mall_product.category_id IS '分类';
|
|
||||||
COMMENT ON COLUMN mall_product.category_path IS '分类路径ID数组,如 [1,5,23]';
|
|
||||||
COMMENT ON COLUMN mall_product.original_price IS '原价';
|
|
||||||
COMMENT ON COLUMN mall_product.retail_price IS '销售价';
|
|
||||||
COMMENT ON COLUMN mall_product.freight IS '运费';
|
|
||||||
COMMENT ON COLUMN mall_product.sales IS '销量';
|
|
||||||
COMMENT ON COLUMN mall_product.stock IS '库存';
|
|
||||||
COMMENT ON COLUMN mall_product.tags IS '标签列表,JSONB数组格式,如 ["热销","包邮"]';
|
|
||||||
COMMENT ON COLUMN mall_product.status IS '状态(0=下架,1=上架)';
|
|
||||||
COMMENT ON COLUMN mall_product.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN mall_product.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN mall_product.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN mall_product.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN mall_product.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN mall_product.is_deleted IS '是否已删除';
|
|
||||||
|
|
||||||
CREATE INDEX idx_product_category ON mall_product (category_id);
|
|
||||||
CREATE INDEX idx_product_status ON mall_product (status) WHERE is_deleted = 0;
|
|
||||||
CREATE INDEX idx_product_tags ON mall_product USING GIN (tags);
|
|
||||||
|
|
||||||
alter table mall_product
|
|
||||||
owner to yicha1lu;
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE mall_category
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY,
|
|
||||||
category_name VARCHAR(100) DEFAULT '' NOT NULL,
|
|
||||||
image_url VARCHAR(200) NULL,
|
|
||||||
pid int8 NULL,
|
|
||||||
level int4 DEFAULT 0 NOT NULL,
|
|
||||||
sort INT4 DEFAULT 0 NOT NULL,
|
|
||||||
is_deleted int4 DEFAULT 0 NULL,
|
|
||||||
create_time TIMESTAMP(6) NULL,
|
|
||||||
create_user int8 NULL,
|
|
||||||
update_time TIMESTAMP(6) NULL,
|
|
||||||
update_user int8 NULL,
|
|
||||||
status int4 DEFAULT 1 NOT NULL,
|
|
||||||
create_dept int8 NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
COMMENT ON TABLE mall_category IS '商品分类(支持三级树形结构)';
|
|
||||||
COMMENT ON COLUMN mall_category.id IS '主键';
|
|
||||||
COMMENT ON COLUMN mall_category.category_name IS '分类名称';
|
|
||||||
COMMENT ON COLUMN mall_category.image_url IS '图片';
|
|
||||||
COMMENT ON COLUMN mall_category.pid IS '父分类ID,NULL 表示顶级分类';
|
|
||||||
COMMENT ON COLUMN mall_category.level IS '层级:1-一级分类,2-二级分类,3-三级分类';
|
|
||||||
COMMENT ON COLUMN mall_category.sort IS '排序值,越小越靠前';
|
|
||||||
COMMENT ON COLUMN mall_category.is_deleted IS '是否已删除';
|
|
||||||
COMMENT ON COLUMN mall_category.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN mall_category.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN mall_category.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN mall_category.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN mall_category.status IS '状态:1-启用,2-禁用';
|
|
||||||
COMMENT ON COLUMN mall_category.create_dept IS '创建部门';
|
|
||||||
|
|
||||||
CREATE INDEX idx_category_pid ON mall_category (pid);
|
|
||||||
CREATE INDEX idx_category_sort ON mall_category(sort);
|
|
||||||
|
|
||||||
|
|
||||||
alter table mall_category
|
|
||||||
owner to yicha1lu;
|
|
||||||
|
|
||||||
--改成全局购物车
|
|
||||||
CREATE TABLE user_cart
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY,
|
|
||||||
service_type int4 DEFAULT 0 NOT NULL,
|
|
||||||
user_id int8 DEFAULT 0 NOT NULL,
|
|
||||||
title VARCHAR(200) DEFAULT '' NOT NULL,
|
|
||||||
spu_id int8 DEFAULT 0 NOT NULL,
|
|
||||||
quantity int4 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 int4 NULL,
|
|
||||||
is_deleted int4 DEFAULT 0 NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
COMMENT ON TABLE user_cart IS '用户购物车';
|
|
||||||
COMMENT ON COLUMN user_cart.id IS '主键';
|
|
||||||
COMMENT ON COLUMN user_cart.service_type IS '购物车业务类型 1-商城购物车';
|
|
||||||
COMMENT ON COLUMN user_cart.user_id IS '用户id';
|
|
||||||
COMMENT ON COLUMN user_cart.title IS '商品名称';
|
|
||||||
COMMENT ON COLUMN user_cart.spu_id IS 'spuId';
|
|
||||||
COMMENT ON COLUMN user_cart.quantity IS '数量';
|
|
||||||
COMMENT ON COLUMN user_cart.original_price IS '原价';
|
|
||||||
COMMENT ON COLUMN user_cart.main_img IS '主图';
|
|
||||||
COMMENT ON COLUMN user_cart.retail_price IS '销售价';
|
|
||||||
COMMENT ON COLUMN user_cart.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN user_cart.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN user_cart.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN user_cart.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN user_cart.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN user_cart.status IS '状态';
|
|
||||||
COMMENT ON COLUMN user_cart.is_deleted IS '是否已删除';
|
|
||||||
CREATE INDEX idx_user_id ON user_cart (user_id);
|
|
||||||
|
|
||||||
alter table user_cart
|
|
||||||
owner to yicha1lu;
|
|
||||||
|
|
||||||
CREATE TABLE common_user_address
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY,
|
|
||||||
user_id int8 NOT NULL,
|
|
||||||
regions_id int8 NOT NULL,
|
|
||||||
province VARCHAR(200) NULL,
|
|
||||||
city VARCHAR(200) NULL,
|
|
||||||
district VARCHAR(200) NULL,
|
|
||||||
street VARCHAR(200) NULL,
|
|
||||||
detail VARCHAR(500) NULL,
|
|
||||||
consignee VARCHAR(200) NOT NULL,
|
|
||||||
phone VARCHAR(20) NOT NULL,
|
|
||||||
is_default int4 NULL,
|
|
||||||
create_user int8 NULL,
|
|
||||||
create_dept int8 NULL,
|
|
||||||
create_time TIMESTAMP NULL,
|
|
||||||
update_user int8 NULL,
|
|
||||||
update_time TIMESTAMP NULL,
|
|
||||||
status int4 NULL,
|
|
||||||
is_deleted int4 DEFAULT 0 NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE common_user_address IS '用户地址表';
|
|
||||||
COMMENT ON COLUMN common_user_address.id IS '主键';
|
|
||||||
COMMENT ON COLUMN common_user_address.user_id IS '用户id';
|
|
||||||
COMMENT ON COLUMN common_user_address.regions_id IS '地区信息id';
|
|
||||||
COMMENT ON COLUMN common_user_address.province IS '省份';
|
|
||||||
COMMENT ON COLUMN common_user_address.city IS '城市';
|
|
||||||
COMMENT ON COLUMN common_user_address.district IS '区县';
|
|
||||||
COMMENT ON COLUMN common_user_address.street IS '街道';
|
|
||||||
COMMENT ON COLUMN common_user_address.detail IS '详细地址';
|
|
||||||
COMMENT ON COLUMN common_user_address.consignee IS '收货人';
|
|
||||||
COMMENT ON COLUMN common_user_address.phone IS '联系电话';
|
|
||||||
COMMENT ON COLUMN common_user_address.is_default IS '是否默认地址(0=否,1=是)';
|
|
||||||
COMMENT ON COLUMN common_user_address.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN common_user_address.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN common_user_address.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN common_user_address.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN common_user_address.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN common_user_address.status IS '状态';
|
|
||||||
COMMENT ON COLUMN common_user_address.is_deleted IS '是否已删除';
|
|
||||||
|
|
||||||
alter table common_user_address
|
|
||||||
owner to yicha1lu;
|
|
||||||
|
|
||||||
CREATE INDEX idx_user_address_user_id ON common_user_address (user_id);
|
|
||||||
CREATE INDEX idx_user_address_regions_id ON common_user_address (regions_id);
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
-- 阔一张业务属性的地理信息
|
|
||||||
CREATE TABLE common_regions_info
|
|
||||||
(
|
|
||||||
id int4 PRIMARY KEY,
|
|
||||||
name VARCHAR(50) NULL,
|
|
||||||
level int4 NULL,
|
|
||||||
pid int4 DEFAULT 0 NULL,
|
|
||||||
coordinates point,
|
|
||||||
region_code VARCHAR(128) NULL,
|
|
||||||
full_name VARCHAR(200) NULL,
|
|
||||||
is_deleted int4 DEFAULT 0 NULL,
|
|
||||||
create_time TIMESTAMP(6) NULL,
|
|
||||||
create_user int8 NULL,
|
|
||||||
update_time TIMESTAMP(6) NULL,
|
|
||||||
update_user int8 NULL,
|
|
||||||
status int4 NULL,
|
|
||||||
create_dept int8 NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE common_regions_info IS '地区详情表';
|
|
||||||
COMMENT ON COLUMN common_regions_info.id IS '主键';
|
|
||||||
COMMENT ON COLUMN common_regions_info.name IS '名称';
|
|
||||||
COMMENT ON COLUMN common_regions_info.level IS '层级';
|
|
||||||
COMMENT ON COLUMN common_regions_info.pid IS '父主键';
|
|
||||||
COMMENT ON COLUMN common_regions_info.coordinates IS '坐标';
|
|
||||||
COMMENT ON COLUMN common_regions_info.region_code IS '地区编码';
|
|
||||||
COMMENT ON COLUMN common_regions_info.full_name IS '全称';
|
|
||||||
COMMENT ON COLUMN common_regions_info.is_deleted IS '是否删除';
|
|
||||||
COMMENT ON COLUMN common_regions_info.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN common_regions_info.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN common_regions_info.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN common_regions_info.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN common_regions_info.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN common_regions_info.status IS '状态';
|
|
||||||
|
|
||||||
alter table common_regions_info
|
|
||||||
owner to yicha1lu;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE regions_info_extend
|
|
||||||
(
|
|
||||||
id int4 PRIMARY KEY,
|
|
||||||
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 int4 DEFAULT 0 NULL,
|
|
||||||
create_time TIMESTAMP(6) NULL,
|
|
||||||
create_user int8 NULL,
|
|
||||||
update_time TIMESTAMP(6) NULL,
|
|
||||||
update_user int8 NULL,
|
|
||||||
status int4 NULL,
|
|
||||||
create_dept int8 NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE regions_info_extend IS '地区详情表';
|
|
||||||
COMMENT ON COLUMN regions_info_extend.id IS '主键';
|
|
||||||
COMMENT ON COLUMN regions_info_extend.vendor_region_id IS '服务商地区表id';
|
|
||||||
COMMENT ON COLUMN regions_info_extend.store_city_id IS '城市店铺id';
|
|
||||||
COMMENT ON COLUMN regions_info_extend.hotel_city_code IS '酒店地区编码';
|
|
||||||
COMMENT ON COLUMN regions_info_extend.hotel_city_pinyin IS '酒店地区拼音';
|
|
||||||
COMMENT ON COLUMN regions_info_extend.hotel_city_initials IS '酒店地区拼音首字母';
|
|
||||||
COMMENT ON COLUMN regions_info_extend.sight_city_name IS '景点城市名';
|
|
||||||
COMMENT ON COLUMN regions_info_extend.is_deleted IS '是否删除';
|
|
||||||
COMMENT ON COLUMN regions_info_extend.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN regions_info_extend.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN regions_info_extend.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN regions_info_extend.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN regions_info_extend.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN regions_info_extend.status IS '状态';
|
|
||||||
|
|
||||||
alter table regions_info_extend
|
|
||||||
owner to yicha1lu;
|
|
||||||
File diff suppressed because it is too large
Load Diff
46
doc/sql/createtable/aliyun_certify_postgres.sql
Normal file
46
doc/sql/createtable/aliyun_certify_postgres.sql
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
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);
|
||||||
42
doc/sql/createtable/app_banner_postgres.sql
Normal file
42
doc/sql/createtable/app_banner_postgres.sql
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
|
||||||
|
-- 创建表
|
||||||
|
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 '是否已删除';
|
||||||
168
doc/sql/createtable/mall_postgres.sql
Normal file
168
doc/sql/createtable/mall_postgres.sql
Normal file
@@ -0,0 +1,168 @@
|
|||||||
|
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,65 +1,77 @@
|
|||||||
CREATE TABLE user_order
|
CREATE TABLE user_order
|
||||||
(
|
(
|
||||||
id int8 NOT NULL PRIMARY KEY,
|
id int8 DEFAULT 0 NOT NULL PRIMARY KEY,
|
||||||
user_id int8 NOT NULL,
|
user_id int8 DEFAULT 0 NOT NULL,
|
||||||
consignee_phone varchar(128) NOT NULL,
|
user_phone int8,
|
||||||
consignee varchar(128) NOT NULL,
|
user_name varchar(128),
|
||||||
order_type varchar(128) NOT NULL,
|
order_type INTEGER DEFAULT 0 NOT NULL,
|
||||||
item_code varchar(128) NOT NULL,
|
order_id int8 DEFAULT 0 NOT NULL,
|
||||||
item_name varchar(128) NOT NULL,
|
title VARCHAR(256) DEFAULT '' NOT NULL,
|
||||||
image_url VARCHAR(512) NULL,
|
images VARCHAR(512) NULL,
|
||||||
quantity int4 DEFAULT 1 NOT NULL,
|
quantity INTEGER NULL,
|
||||||
delivery_address text NULL,
|
description VARCHAR(200) DEFAULT '' NOT NULL,
|
||||||
express_company VARCHAR(100) NULL,
|
order_status INTEGER DEFAULT 0 NOT NULL,
|
||||||
express_no VARCHAR(100) NULL,
|
|
||||||
order_status int4 DEFAULT 0 NOT NULL,
|
|
||||||
total_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,
|
actual_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||||
payment_type int4 DEFAULT 0 NOT NULL,
|
payment_type INTEGER DEFAULT 0 NOT NULL,
|
||||||
payment_time TIMESTAMP NULL,
|
payment_time TIMESTAMP NULL,
|
||||||
payment_status int4 DEFAULT 0 NOT NULL,
|
|
||||||
payment_track VARCHAR(255) DEFAULT '' NOT NULL,
|
payment_track VARCHAR(255) DEFAULT '' NOT NULL,
|
||||||
|
payment_status INTEGER DEFAULT 1 NOT NULL,
|
||||||
create_user int8 NULL,
|
create_user int8 NULL,
|
||||||
create_dept int8 NULL,
|
create_dept int8 NULL,
|
||||||
create_time TIMESTAMP(6) NULL,
|
create_time TIMESTAMP(6) NULL,
|
||||||
update_user int8 NULL,
|
update_user int8 NULL,
|
||||||
update_time TIMESTAMP(6) NULL,
|
update_time TIMESTAMP(6) NULL,
|
||||||
status int4 NULL,
|
status INTEGER NULL,
|
||||||
is_deleted int4 DEFAULT 0 NULL
|
is_deleted INTEGER DEFAULT 0 NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
COMMENT ON TABLE user_order IS '用户订单';
|
COMMENT ON TABLE user_order IS '用户订单';
|
||||||
COMMENT ON COLUMN user_order.id IS '主键';
|
COMMENT ON COLUMN user_order.id IS '主键';
|
||||||
COMMENT ON COLUMN user_order.user_id IS '用户id';
|
COMMENT ON COLUMN user_order.user_id IS '用户id';
|
||||||
COMMENT ON COLUMN user_order.consignee_phone IS '收件人手机号';
|
COMMENT ON COLUMN user_order.user_phone IS '用户手机号';
|
||||||
COMMENT ON COLUMN user_order.consignee IS '收件人';
|
COMMENT ON COLUMN user_order.user_name IS '用户名称';
|
||||||
COMMENT ON COLUMN user_order.order_type IS '订单类型';
|
COMMENT ON COLUMN user_order.order_type IS '订单类型';
|
||||||
COMMENT ON COLUMN user_order.item_code IS '商品编号';
|
COMMENT ON COLUMN user_order.order_id IS '订单id';
|
||||||
COMMENT ON COLUMN user_order.item_name IS '商品名称';
|
COMMENT ON COLUMN user_order.title IS '订单名称';
|
||||||
COMMENT ON COLUMN user_order.image_url IS '图片';
|
COMMENT ON COLUMN user_order.images IS '图片';
|
||||||
COMMENT ON COLUMN user_order.quantity IS '数量';
|
COMMENT ON COLUMN user_order.quantity IS '数量';
|
||||||
COMMENT ON COLUMN user_order.delivery_address IS '收货地址(实物商品必填,虚拟商品可为空)';
|
COMMENT ON COLUMN user_order.description IS '订单描述';
|
||||||
COMMENT ON COLUMN user_order.order_status IS '订单状态 0=待支付 1=已支付(待发货/待使用)2=已取消 3=已发货/已出票(进行中)4=已完成 5=已关闭(超时未支付)6=退款中 7: 已退款';
|
COMMENT ON COLUMN user_order.order_status IS '订单状态';
|
||||||
COMMENT ON COLUMN user_order.total_amount IS '订单金额';
|
COMMENT ON COLUMN user_order.total_amount IS '订单金额';
|
||||||
COMMENT ON COLUMN user_order.actual_amount IS '实际支付金额';
|
COMMENT ON COLUMN user_order.actual_amount IS '实际支付金额';
|
||||||
COMMENT ON COLUMN user_order.payment_type IS '支付方式';
|
COMMENT ON COLUMN user_order.payment_type IS '支付方式';
|
||||||
COMMENT ON COLUMN user_order.payment_time IS '支付时间';
|
COMMENT ON COLUMN user_order.payment_time IS '支付时间';
|
||||||
COMMENT ON COLUMN user_order.payment_track IS '支付凭证编号';
|
COMMENT ON COLUMN user_order.payment_track IS '支付凭证编号';
|
||||||
COMMENT ON COLUMN user_order.payment_status IS '支付状态 0=未支付 1=已支付 2=支付失败 3=支付中(如跳转网银)';
|
COMMENT ON COLUMN user_order.payment_status IS '支付状态';
|
||||||
COMMENT ON COLUMN user_order.express_company IS '快递公司名称';
|
|
||||||
COMMENT ON COLUMN user_order.express_no IS '快递单号(物流单号)';
|
|
||||||
COMMENT ON COLUMN user_order.create_user IS '创建人';
|
COMMENT ON COLUMN user_order.create_user IS '创建人';
|
||||||
COMMENT ON COLUMN user_order.create_dept IS '创建部门';
|
COMMENT ON COLUMN user_order.create_dept IS '创建部门';
|
||||||
COMMENT ON COLUMN user_order.create_time IS '创建时间';
|
COMMENT ON COLUMN user_order.create_time IS '创建时间';
|
||||||
COMMENT ON COLUMN user_order.update_user IS '修改人';
|
COMMENT ON COLUMN user_order.update_user IS '修改人';
|
||||||
COMMENT ON COLUMN user_order.update_time IS '修改时间';
|
COMMENT ON COLUMN user_order.update_time IS '修改时间';
|
||||||
COMMENT ON COLUMN user_order.status 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 idx_user_order_user_status_time ON user_order (user_id, order_status, create_time DESC);
|
CREATE INDEX user_order_index ON user_order (user_id, order_type);
|
||||||
CREATE INDEX idx_user_order_status_time ON user_order (order_status, create_time DESC);
|
|
||||||
|
|
||||||
alter table user_order
|
|
||||||
owner to yicha1lu;
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE mall_summary_order
|
CREATE TABLE mall_summary_order
|
||||||
@@ -80,15 +92,18 @@ CREATE TABLE mall_summary_order
|
|||||||
total_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,
|
actual_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||||
refund_amount DECIMAL(10, 2) DEFAULT 0.00 NULL,
|
refund_amount DECIMAL(10, 2) DEFAULT 0.00 NULL,
|
||||||
payment_type int4 DEFAULT 0 NOT NULL,
|
payment_type INTEGER DEFAULT 0 NOT NULL,
|
||||||
extra_type int4 DEFAULT 0 NOT NULL,
|
extra_type INTEGER DEFAULT 0 NOT NULL,
|
||||||
payment_status int4 DEFAULT 0 NOT NULL,
|
payment_status INTEGER DEFAULT 0 NOT NULL,
|
||||||
order_status int4 DEFAULT 0 NOT NULL,
|
order_status INTEGER DEFAULT 0 NOT NULL,
|
||||||
payment_completed_time TIMESTAMP NULL,
|
payment_completed_time TIMESTAMP NULL,
|
||||||
payment_track VARCHAR(200) DEFAULT '' NOT NULL,
|
payment_track VARCHAR(200) DEFAULT '' NOT NULL,
|
||||||
expire_time TIMESTAMP NULL,
|
expire_time TIMESTAMP NULL,
|
||||||
is_recorded int4 DEFAULT 0 NULL,
|
give_token DECIMAL(10, 2) NULL,
|
||||||
is_statistics int4 DEFAULT 0 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,
|
remarks VARCHAR(200) DEFAULT '' NOT NULL,
|
||||||
version int8 DEFAULT 0 NULL,
|
version int8 DEFAULT 0 NULL,
|
||||||
create_user int8 NULL,
|
create_user int8 NULL,
|
||||||
@@ -96,8 +111,8 @@ CREATE TABLE mall_summary_order
|
|||||||
create_time TIMESTAMP NULL,
|
create_time TIMESTAMP NULL,
|
||||||
update_user int8 NULL,
|
update_user int8 NULL,
|
||||||
update_time TIMESTAMP NULL,
|
update_time TIMESTAMP NULL,
|
||||||
status int4 DEFAULT 0 NULL,
|
status INTEGER DEFAULT 0 NULL,
|
||||||
is_deleted int4 DEFAULT 0 NULL
|
is_deleted INTEGER DEFAULT 0 NULL
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -122,13 +137,16 @@ COMMENT ON COLUMN mall_summary_order.payment_type IS '支付类型';
|
|||||||
COMMENT ON COLUMN mall_summary_order.extra_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.payment_status IS '支付状态';
|
||||||
COMMENT ON COLUMN mall_summary_order.extra_type IS '附加支付类型';
|
COMMENT ON COLUMN mall_summary_order.extra_type IS '附加支付类型';
|
||||||
COMMENT ON COLUMN mall_summary_order.order_status IS '订单状态 1=待确认,2=待发货,3=待收货,4=已完成,5=已取消, 6=已关闭 ,7=售后中,8=已完结';
|
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_completed_time IS '支付完成时间';
|
||||||
COMMENT ON COLUMN mall_summary_order.payment_track IS '支付凭证';
|
COMMENT ON COLUMN mall_summary_order.payment_track IS '支付凭证';
|
||||||
COMMENT ON COLUMN mall_summary_order.order_status IS '订单状态 1=待确认,2=待发货,3=待收货,4=已完成,5=已取消, 6=已关闭 ,7=售后中,8=已完结';
|
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_completed_time IS '支付完成时间';
|
||||||
COMMENT ON COLUMN mall_summary_order.payment_track 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.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_recorded IS '是否记录资金账户里 0=否,1=是';
|
||||||
COMMENT ON COLUMN mall_summary_order.is_statistics 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.remarks IS '备注';
|
||||||
@@ -141,8 +159,6 @@ 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_recorded_index ON mall_summary_order (payment_status, is_recorded);
|
||||||
CREATE INDEX mso_statistics_index ON mall_summary_order (payment_status, is_statistics);
|
CREATE INDEX mso_statistics_index ON mall_summary_order (payment_status, is_statistics);
|
||||||
|
|
||||||
alter table mall_summary_order
|
|
||||||
owner to yicha1lu;
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE mall_detail_order
|
CREATE TABLE mall_detail_order
|
||||||
@@ -153,27 +169,27 @@ CREATE TABLE mall_detail_order
|
|||||||
user_name varchar(128),
|
user_name varchar(128),
|
||||||
summary_order_id int8 DEFAULT 0 NOT NULL,
|
summary_order_id int8 DEFAULT 0 NOT NULL,
|
||||||
spu_id int8 DEFAULT 0 NOT NULL,
|
spu_id int8 DEFAULT 0 NOT NULL,
|
||||||
quantity int4 DEFAULT 0 NOT NULL,
|
quantity INTEGER DEFAULT 0 NOT NULL,
|
||||||
sku_snapshot text NULL,
|
sku_snapshot text NULL,
|
||||||
freight_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
|
||||||
actual_cost_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
actual_cost_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||||
order_amount DECIMAL(10, 2) NULL,
|
order_amount DECIMAL(10, 2) NULL,
|
||||||
cost_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
cost_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||||
actual_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,
|
remarks VARCHAR(200) DEFAULT '' NOT NULL,
|
||||||
order_status int4 DEFAULT 0 NOT NULL,
|
order_status INTEGER DEFAULT 0 NOT NULL,
|
||||||
freight VARCHAR(200) DEFAULT 0.00 NOT NULL,
|
freight VARCHAR(200) DEFAULT 0.00 NOT NULL,
|
||||||
logistics VARCHAR(200) DEFAULT 0.00 NOT NULL,
|
logistics VARCHAR(200) DEFAULT 0.00 NOT NULL,
|
||||||
delivery_time timestamp(6),
|
delivery_time timestamp(6),
|
||||||
products_info text NULL,
|
products_info text NULL,
|
||||||
version int4 DEFAULT 0 NULL,
|
version integer DEFAULT 0 NULL,
|
||||||
create_user int8 NULL,
|
create_user int8 NULL,
|
||||||
create_dept int8 NULL,
|
create_dept int8 NULL,
|
||||||
create_time TIMESTAMP NULL,
|
create_time TIMESTAMP NULL,
|
||||||
update_user int8 NULL,
|
update_user int8 NULL,
|
||||||
update_time TIMESTAMP NULL,
|
update_time TIMESTAMP NULL,
|
||||||
status int4 DEFAULT -1 NULL,
|
status INTEGER DEFAULT -1 NULL,
|
||||||
is_deleted int4 DEFAULT 0 NULL
|
is_deleted INTEGER DEFAULT 0 NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
COMMENT ON TABLE mall_detail_order IS '商城详情订单';
|
COMMENT ON TABLE mall_detail_order IS '商城详情订单';
|
||||||
@@ -190,22 +206,22 @@ 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.actual_cost_amount IS '实际成本';
|
||||||
COMMENT ON COLUMN mall_detail_order.order_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.cost_amount IS '订单成本';
|
||||||
COMMENT ON COLUMN mall_detail_order.actual_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.remarks IS '备注';
|
||||||
COMMENT ON COLUMN mall_detail_order.logistics IS '物流';
|
COMMENT ON COLUMN mall_detail_order.logistics IS '物流';
|
||||||
COMMENT ON COLUMN mall_detail_order.products_info IS '商品信息';
|
COMMENT ON COLUMN mall_detail_order.products_info IS '商品信息';
|
||||||
COMMENT ON COLUMN mall_detail_order.freight IS '运费';
|
COMMENT ON COLUMN mall_detail_order.freight IS '运费';
|
||||||
COMMENT ON COLUMN mall_detail_order.order_status IS '订单状态 1=待确认,2=待发货,3=待收货,4=已完成,5=已取消, 6=已关闭 ,7=售后中,8=已完结';
|
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.status IS '状态';
|
||||||
COMMENT ON COLUMN mall_detail_order.is_deleted IS '是否已删除';
|
COMMENT ON COLUMN mall_detail_order.is_deleted IS '是否已删除';
|
||||||
|
|
||||||
|
|
||||||
CREATE INDEX mdo_index ON mall_detail_order (summary_order_id);
|
CREATE INDEX mdo_index ON mall_detail_order (summary_order_id);
|
||||||
CREATE INDEX mdo_uid_index ON mall_detail_order (user_id);
|
CREATE INDEX mdo_uid_index ON mall_detail_order (user_id);
|
||||||
|
|
||||||
alter table mall_detail_order
|
|
||||||
owner to yicha1lu;
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE mall_summary_order_after
|
CREATE TABLE mall_summary_order_after
|
||||||
(
|
(
|
||||||
@@ -217,26 +233,28 @@ CREATE TABLE mall_summary_order_after
|
|||||||
goods_id int8 DEFAULT -1 NOT NULL,
|
goods_id int8 DEFAULT -1 NOT NULL,
|
||||||
sku_id int8 NOT NULL,
|
sku_id int8 NOT NULL,
|
||||||
goods_name VARCHAR(256) NOT NULL,
|
goods_name VARCHAR(256) NOT NULL,
|
||||||
quantity int4 DEFAULT -1 NULL,
|
third_plat_order_no VARCHAR(32) NOT NULL,
|
||||||
apply_type int4 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_reason VARCHAR(100) DEFAULT '-1' NULL,
|
||||||
apply_pic_urls TEXT NULL,
|
apply_pic_urls TEXT NULL,
|
||||||
refund_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
refund_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||||
refund_status int4 DEFAULT 0 NULL,
|
refund_status INTEGER DEFAULT 0 NULL,
|
||||||
refund_reason VARCHAR(255) NULL,
|
refund_reason VARCHAR(255) NULL,
|
||||||
receiver VARCHAR(125) NULL,
|
receiver VARCHAR(125) NULL,
|
||||||
receiver_phone VARCHAR(255) NULL,
|
receiver_phone VARCHAR(255) NULL,
|
||||||
receiver_addr VARCHAR(255) NULL,
|
receiver_addr VARCHAR(255) NULL,
|
||||||
receiver_delivery_no VARCHAR(255) NULL,
|
receiver_delivery_no VARCHAR(255) NULL,
|
||||||
remarks VARCHAR(200) DEFAULT '' NULL,
|
remarks VARCHAR(200) DEFAULT '' NULL,
|
||||||
version int4 DEFAULT 0 NULL,
|
version integer DEFAULT 0 NULL,
|
||||||
create_user int8 NULL,
|
create_user int8 NULL,
|
||||||
create_dept int8 NULL,
|
create_dept int8 NULL,
|
||||||
create_time TIMESTAMP NULL,
|
create_time TIMESTAMP NULL,
|
||||||
update_user int8 NULL,
|
update_user int8 NULL,
|
||||||
update_time TIMESTAMP NULL,
|
update_time TIMESTAMP NULL,
|
||||||
status int4 DEFAULT 0 NULL,
|
status INTEGER DEFAULT 0 NULL,
|
||||||
is_deleted int4 DEFAULT 0 NULL,
|
is_deleted INTEGER DEFAULT 0 NULL,
|
||||||
after_info JSON NULL
|
after_info JSON NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -248,7 +266,9 @@ 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.summary_order_id IS '总订单id';
|
||||||
COMMENT ON COLUMN mall_summary_order_after.goods_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.sku_id IS '商品订单号';
|
||||||
COMMENT ON COLUMN mall_summary_order_after.goods_name 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.quantity IS '商品数量';
|
||||||
COMMENT ON COLUMN mall_summary_order_after.apply_type IS '申请售后类型,1=未收货退款,2=退货退款,3=换货补发,4=不退货仅退款';
|
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_reason IS '申请售后原因';
|
||||||
@@ -265,7 +285,15 @@ 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.status IS '状态';
|
||||||
COMMENT ON COLUMN mall_summary_order_after.is_deleted 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.after_info IS '售后详情';
|
||||||
|
COMMENT ON COLUMN mall_summary_order_after.refund_amount IS '退款金额';
|
||||||
alter table mall_summary_order_after
|
COMMENT ON COLUMN mall_summary_order_after.refund_status IS '处理售后状态';
|
||||||
owner to yicha1lu;
|
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 '售后详情';
|
||||||
|
|
||||||
250
doc/sql/createtable/otc_postgres.sql
Normal file
250
doc/sql/createtable/otc_postgres.sql
Normal file
@@ -0,0 +1,250 @@
|
|||||||
|
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 '是否已删除';
|
||||||
48
doc/sql/createtable/regions_info_postgres.sql
Normal file
48
doc/sql/createtable/regions_info_postgres.sql
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
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 '状态';
|
||||||
|
|
||||||
73
doc/sql/createtable/user_daily_sign_postgres.sql
Normal file
73
doc/sql/createtable/user_daily_sign_postgres.sql
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
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 '状态';
|
||||||
1071
doc/sql/createtable/user_info_update_postgres.sql
Normal file
1071
doc/sql/createtable/user_info_update_postgres.sql
Normal file
File diff suppressed because it is too large
Load Diff
44
doc/sql/createtable/user_notice_postgres.sql
Normal file
44
doc/sql/createtable/user_notice_postgres.sql
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
|
||||||
|
-- 创建表
|
||||||
|
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 '是否已删除';
|
||||||
180
doc/sql/createtable/user_performance_postgres.sql
Normal file
180
doc/sql/createtable/user_performance_postgres.sql
Normal file
@@ -0,0 +1,180 @@
|
|||||||
|
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;
|
||||||
424
doc/sql/createtable/user_point_postgres.sql
Normal file
424
doc/sql/createtable/user_point_postgres.sql
Normal file
@@ -0,0 +1,424 @@
|
|||||||
|
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;
|
||||||
322
doc/sql/createtable/vendor_info_postgres.sql
Normal file
322
doc/sql/createtable/vendor_info_postgres.sql
Normal file
@@ -0,0 +1,322 @@
|
|||||||
|
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 '是否已删除';
|
||||||
79
doc/sql/createtable/wheel_prize_postgres.sql
Normal file
79
doc/sql/createtable/wheel_prize_postgres.sql
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
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 '是否已删除';
|
||||||
@@ -1,626 +0,0 @@
|
|||||||
------------------user_market_info common_user_address common_regions_info mall_product mall_category-------------------
|
|
||||||
------------------------------------------------------------------------------------------------------------------------
|
|
||||||
DROP TABLE IF EXISTS user_market_info;
|
|
||||||
create table user_market_info
|
|
||||||
(
|
|
||||||
id int8 not null primary key, --user_id
|
|
||||||
pid int8,
|
|
||||||
has_synchronized int4 default 0, --是否同步
|
|
||||||
vendor int4 default 0, -- 是否成为服务商 0-否 1-是
|
|
||||||
e_signed int4 default 0, -- 是否已经签署电子合同 0-否 1-是
|
|
||||||
e_signed_url text, -- 电子合同地址
|
|
||||||
verified int4 default 0, -- 是否实名用户 0-否 1-是
|
|
||||||
verified_date timestamp(6), -- 实名时间
|
|
||||||
real_name varchar(128), -- 实名姓名
|
|
||||||
id_card varchar(128), -- 实名身份证
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4 default 1, -- 1: active -- 2: revoked (注销) -- 3: frozen (冻结)
|
|
||||||
is_deleted int4 default 0
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX idx_user_market_pid ON user_market_info (pid) WHERE status = 1;
|
|
||||||
|
|
||||||
|
|
||||||
comment on table user_market_info is '用户拓展信息表';
|
|
||||||
comment on column user_market_info.id is '主键';
|
|
||||||
comment on column user_market_info.pid is '邀请人';
|
|
||||||
comment on column user_market_info.has_synchronized is '是否同步族谱 0-否 1-是';
|
|
||||||
comment on column user_market_info.vendor is '是否成为服务商 0-否 1-是';
|
|
||||||
comment on column user_market_info.e_signed is '是否签署法大大协议 0-否 1-是';
|
|
||||||
comment on column user_market_info.e_signed_url is '电子合同地址';
|
|
||||||
comment on column user_market_info.verified is '是否实名用户 0-否 1-是';
|
|
||||||
comment on column user_market_info.verified_date is '实名时间';
|
|
||||||
comment on column user_market_info.real_name is '实名姓名';
|
|
||||||
comment on column user_market_info.id_card is '实名身份证';
|
|
||||||
comment on column user_market_info.create_user is '创建人';
|
|
||||||
comment on column user_market_info.create_dept is '创建部门';
|
|
||||||
comment on column user_market_info.create_time is '创建时间';
|
|
||||||
comment on column user_market_info.update_user is '修改人';
|
|
||||||
comment on column user_market_info.update_time is '修改时间';
|
|
||||||
comment on column user_market_info.status is '状态';
|
|
||||||
comment on column user_market_info.is_deleted is '是否已删除';
|
|
||||||
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2019319816467976193', '1123598815738675201', 'marketInfo', '用户拓展信息表', 'menu', '/market/marketInfo',
|
|
||||||
NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2019319816467976194', '2019319816467976193', 'marketInfo_add', '新增', 'add', '/market/marketInfo/add', 'plus',
|
|
||||||
1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2019319816467976195', '2019319816467976193', 'marketInfo_edit', '修改', 'edit', '/market/marketInfo/edit',
|
|
||||||
'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2019319816467976196', '2019319816467976193', 'marketInfo_delete', '删除', 'delete',
|
|
||||||
'/api/blade-marketinfo/marketInfo/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2019319816467976197', '2019319816467976193', 'marketInfo_view', '查看', 'view', '/market/marketInfo/view',
|
|
||||||
'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------
|
|
||||||
DROP TABLE IF EXISTS common_user_address;
|
|
||||||
CREATE TABLE common_user_address
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY,
|
|
||||||
user_id int8 NOT NULL,
|
|
||||||
regions_id int8 NOT NULL,
|
|
||||||
province VARCHAR(200) NULL,
|
|
||||||
city VARCHAR(200) NULL,
|
|
||||||
district VARCHAR(200) NULL,
|
|
||||||
street VARCHAR(200) NULL,
|
|
||||||
detail VARCHAR(500) NULL,
|
|
||||||
consignee VARCHAR(200) NOT NULL,
|
|
||||||
phone VARCHAR(20) NOT NULL,
|
|
||||||
is_default int4 NULL,
|
|
||||||
create_user int8 NULL,
|
|
||||||
create_dept int8 NULL,
|
|
||||||
create_time TIMESTAMP NULL,
|
|
||||||
update_user int8 NULL,
|
|
||||||
update_time TIMESTAMP NULL,
|
|
||||||
status int4 NULL,
|
|
||||||
is_deleted int4 DEFAULT 0 NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE common_user_address IS '用户地址表';
|
|
||||||
COMMENT ON COLUMN common_user_address.id IS '主键';
|
|
||||||
COMMENT ON COLUMN common_user_address.user_id IS '用户id';
|
|
||||||
COMMENT ON COLUMN common_user_address.regions_id IS '地区信息id';
|
|
||||||
COMMENT ON COLUMN common_user_address.province IS '省份';
|
|
||||||
COMMENT ON COLUMN common_user_address.city IS '城市';
|
|
||||||
COMMENT ON COLUMN common_user_address.district IS '区县';
|
|
||||||
COMMENT ON COLUMN common_user_address.street IS '街道';
|
|
||||||
COMMENT ON COLUMN common_user_address.detail IS '详细地址';
|
|
||||||
COMMENT ON COLUMN common_user_address.consignee IS '收货人';
|
|
||||||
COMMENT ON COLUMN common_user_address.phone IS '联系电话';
|
|
||||||
COMMENT ON COLUMN common_user_address.is_default IS '是否默认地址(0=否,1=是)';
|
|
||||||
COMMENT ON COLUMN common_user_address.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN common_user_address.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN common_user_address.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN common_user_address.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN common_user_address.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN common_user_address.status IS '状态';
|
|
||||||
COMMENT ON COLUMN common_user_address.is_deleted IS '是否已删除';
|
|
||||||
|
|
||||||
CREATE INDEX idx_user_address_user_id ON common_user_address (user_id);
|
|
||||||
CREATE INDEX idx_user_address_regions_id ON common_user_address (regions_id);
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------
|
|
||||||
DROP TABLE IF EXISTS common_regions_info;
|
|
||||||
CREATE TABLE common_regions_info
|
|
||||||
(
|
|
||||||
id int4 PRIMARY KEY,
|
|
||||||
name VARCHAR(50) NULL,
|
|
||||||
level int4 NULL,
|
|
||||||
pid int4 DEFAULT 0 NULL,
|
|
||||||
coordinates point,
|
|
||||||
region_code VARCHAR(128) NULL,
|
|
||||||
full_name VARCHAR(500) NULL,
|
|
||||||
is_deleted int4 DEFAULT 0 NULL,
|
|
||||||
create_time TIMESTAMP(6) NULL,
|
|
||||||
create_user int8 NULL,
|
|
||||||
update_time TIMESTAMP(6) NULL,
|
|
||||||
update_user int8 NULL,
|
|
||||||
status int4 NULL,
|
|
||||||
create_dept int8 NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE common_regions_info IS '地区详情表';
|
|
||||||
COMMENT ON COLUMN common_regions_info.id IS '主键';
|
|
||||||
COMMENT ON COLUMN common_regions_info.name IS '名称';
|
|
||||||
COMMENT ON COLUMN common_regions_info.level IS '层级';
|
|
||||||
COMMENT ON COLUMN common_regions_info.pid IS '父主键';
|
|
||||||
COMMENT ON COLUMN common_regions_info.coordinates IS '坐标';
|
|
||||||
COMMENT ON COLUMN common_regions_info.region_code IS '地区编码';
|
|
||||||
COMMENT ON COLUMN common_regions_info.full_name IS '全称';
|
|
||||||
COMMENT ON COLUMN common_regions_info.is_deleted IS '是否删除';
|
|
||||||
COMMENT ON COLUMN common_regions_info.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN common_regions_info.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN common_regions_info.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN common_regions_info.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN common_regions_info.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN common_regions_info.status IS '状态';
|
|
||||||
|
|
||||||
CREATE INDEX idx_regions_pid ON common_regions_info (pid);
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------
|
|
||||||
DROP TABLE IF EXISTS mall_product;
|
|
||||||
CREATE TABLE mall_product
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY,
|
|
||||||
serial_number VARCHAR(100) DEFAULT '' NOT NULL,
|
|
||||||
product_name VARCHAR(255) DEFAULT '' NOT NULL,
|
|
||||||
main_image_urls text[] DEFAULT '{}' NOT NULL,
|
|
||||||
detail_image_urls text[] DEFAULT '{}' NULL,
|
|
||||||
thumb_image_url text NULL,
|
|
||||||
specs JSONB DEFAULT '[]',
|
|
||||||
unit VARCHAR(12),
|
|
||||||
category_id int8 DEFAULT 0 NOT NULL,
|
|
||||||
category_path int8[] DEFAULT '{}' NOT NULL,
|
|
||||||
original_price DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
|
||||||
retail_price DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
|
||||||
freight DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
|
||||||
sales int4 DEFAULT 0 NOT NULL,
|
|
||||||
stock int4 DEFAULT 0 NOT NULL,
|
|
||||||
tags JSONB DEFAULT '[]' NOT NULL,
|
|
||||||
status int4 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 int4 DEFAULT 0 NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE mall_product IS '商城商品';
|
|
||||||
COMMENT ON COLUMN mall_product.id IS '主键';
|
|
||||||
COMMENT ON COLUMN mall_product.serial_number IS '商品编码';
|
|
||||||
COMMENT ON COLUMN mall_product.product_name IS '商品名称';
|
|
||||||
COMMENT ON COLUMN mall_product.main_image_urls IS '主图';
|
|
||||||
COMMENT ON COLUMN mall_product.detail_image_urls IS '详情图';
|
|
||||||
COMMENT ON COLUMN mall_product.thumb_image_url IS '缩略图';
|
|
||||||
COMMENT ON COLUMN mall_product.specs IS '规格详情,JSONB数组 [{"attr":"颜色","value":"红"}]';
|
|
||||||
COMMENT ON COLUMN mall_product.unit IS '单位';
|
|
||||||
COMMENT ON COLUMN mall_product.category_id IS '分类';
|
|
||||||
COMMENT ON COLUMN mall_product.category_path IS '分类路径ID数组,如 [1,5,23]';
|
|
||||||
COMMENT ON COLUMN mall_product.original_price IS '原价';
|
|
||||||
COMMENT ON COLUMN mall_product.retail_price IS '销售价';
|
|
||||||
COMMENT ON COLUMN mall_product.freight IS '运费';
|
|
||||||
COMMENT ON COLUMN mall_product.sales IS '销量';
|
|
||||||
COMMENT ON COLUMN mall_product.stock IS '库存';
|
|
||||||
COMMENT ON COLUMN mall_product.tags IS '标签列表,JSONB数组格式,如 ["热销","包邮"]';
|
|
||||||
COMMENT ON COLUMN mall_product.status IS '状态(0=下架,1=上架)';
|
|
||||||
COMMENT ON COLUMN mall_product.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN mall_product.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN mall_product.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN mall_product.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN mall_product.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN mall_product.is_deleted IS '是否已删除';
|
|
||||||
|
|
||||||
CREATE INDEX idx_product_category ON mall_product (category_id);
|
|
||||||
CREATE INDEX idx_product_status ON mall_product (status) WHERE is_deleted = 0;
|
|
||||||
CREATE INDEX idx_product_tags ON mall_product USING GIN (tags);
|
|
||||||
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2019341061775732737', '2016445919294554113', 'mallProduct', '商城商品', 'menu', '/mall/mallProduct', NULL, 1,
|
|
||||||
1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2019341061775732738', '2019341061775732737', 'mallProduct_add', '新增', 'add', '/mall/mallProduct/add', 'plus',
|
|
||||||
1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2019341061775732739', '2019341061775732737', 'mallProduct_edit', '修改', 'edit', '/mall/mallProduct/edit',
|
|
||||||
'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2019341061775732740', '2019341061775732737', 'mallProduct_delete', '删除', 'delete',
|
|
||||||
'/api/blade-mallproduct/mallProduct/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2019341061775732741', '2019341061775732737', 'mallProduct_view', '查看', 'view', '/mall/mallProduct/view',
|
|
||||||
'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
------------------------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS mall_category;
|
|
||||||
CREATE TABLE mall_category
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY,
|
|
||||||
category_name VARCHAR(100) DEFAULT '' NOT NULL,
|
|
||||||
image_url VARCHAR(200) NULL,
|
|
||||||
pid int8 NULL,
|
|
||||||
level int4 DEFAULT 0 NOT NULL,
|
|
||||||
sort INT4 DEFAULT 0 NOT NULL,
|
|
||||||
is_deleted int4 DEFAULT 0 NULL,
|
|
||||||
create_time TIMESTAMP(6) NULL,
|
|
||||||
create_user int8 NULL,
|
|
||||||
update_time TIMESTAMP(6) NULL,
|
|
||||||
update_user int8 NULL,
|
|
||||||
status int4 DEFAULT 1 NOT NULL,
|
|
||||||
create_dept int8 NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
COMMENT ON TABLE mall_category IS '商品分类(支持三级树形结构)';
|
|
||||||
COMMENT ON COLUMN mall_category.id IS '主键';
|
|
||||||
COMMENT ON COLUMN mall_category.category_name IS '分类名称';
|
|
||||||
COMMENT ON COLUMN mall_category.image_url IS '图片';
|
|
||||||
COMMENT ON COLUMN mall_category.pid IS '父分类ID,NULL 表示顶级分类';
|
|
||||||
COMMENT ON COLUMN mall_category.level IS '层级:1-一级分类,2-二级分类,3-三级分类';
|
|
||||||
COMMENT ON COLUMN mall_category.sort IS '排序值,越小越靠前';
|
|
||||||
COMMENT ON COLUMN mall_category.is_deleted IS '是否已删除';
|
|
||||||
COMMENT ON COLUMN mall_category.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN mall_category.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN mall_category.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN mall_category.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN mall_category.status IS '状态:1-启用,2-禁用';
|
|
||||||
COMMENT ON COLUMN mall_category.create_dept IS '创建部门';
|
|
||||||
|
|
||||||
CREATE INDEX idx_category_pid ON mall_category (pid);
|
|
||||||
CREATE INDEX idx_category_sort ON mall_category (sort);
|
|
||||||
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2019341061003980801', '2016445919294554113', 'mallCategory', '商品分类', 'menu', '/mall/mallCategory', NULL, 1,
|
|
||||||
1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2019341061003980802', '2019341061003980801', 'mallCategory_add', '新增', 'add', '/mall/mallCategory/add',
|
|
||||||
'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2019341061003980803', '2019341061003980801', 'mallCategory_edit', '修改', 'edit', '/mall/mallCategory/edit',
|
|
||||||
'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2019341061003980804', '2019341061003980801', 'mallCategory_delete', '删除', 'delete',
|
|
||||||
'/api/blade-mallcategory/mallCategory/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2019341061003980805', '2019341061003980801', 'mallCategory_view', '查看', 'view', '/mall/mallCategory/view',
|
|
||||||
'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------
|
|
||||||
------------------------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS user_order;
|
|
||||||
CREATE TABLE user_order
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY,
|
|
||||||
user_id int8 NOT NULL,
|
|
||||||
consignee_phone varchar(128) NOT NULL,
|
|
||||||
consignee varchar(128) NOT NULL,
|
|
||||||
order_type varchar(128) NOT NULL,
|
|
||||||
item_code varchar(128) NOT NULL,
|
|
||||||
item_name varchar(128) NOT NULL,
|
|
||||||
image_url VARCHAR(512) NULL,
|
|
||||||
quantity int4 DEFAULT 1 NOT NULL,
|
|
||||||
delivery_address text NULL,
|
|
||||||
express_company VARCHAR(100) NULL,
|
|
||||||
express_no VARCHAR(100) NULL,
|
|
||||||
order_status int4 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 int4 DEFAULT 0 NOT NULL,
|
|
||||||
payment_time TIMESTAMP NULL,
|
|
||||||
payment_status int4 DEFAULT 0 NOT NULL,
|
|
||||||
payment_track VARCHAR(255) 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 int4 NULL,
|
|
||||||
is_deleted int4 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.consignee_phone IS '收件人手机号';
|
|
||||||
COMMENT ON COLUMN user_order.consignee IS '收件人';
|
|
||||||
COMMENT ON COLUMN user_order.order_type IS '订单类型';
|
|
||||||
COMMENT ON COLUMN user_order.item_code IS '商品编号';
|
|
||||||
COMMENT ON COLUMN user_order.item_name IS '商品名称';
|
|
||||||
COMMENT ON COLUMN user_order.image_url IS '图片';
|
|
||||||
COMMENT ON COLUMN user_order.quantity IS '数量';
|
|
||||||
COMMENT ON COLUMN user_order.delivery_address IS '收货地址(实物商品必填,虚拟商品可为空)';
|
|
||||||
COMMENT ON COLUMN user_order.order_status IS '订单状态 0=待支付 1=已支付(待发货/待使用)2=已取消 3=已发货/已出票(进行中)4=已完成 5=已关闭(超时未支付)6=退款中 7: 已退款';
|
|
||||||
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 '支付状态 0=未支付 1=已支付 2=支付失败 3=支付中(如跳转网银)';
|
|
||||||
COMMENT ON COLUMN user_order.express_company IS '快递公司名称';
|
|
||||||
COMMENT ON COLUMN user_order.express_no 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 '状态';
|
|
||||||
|
|
||||||
CREATE INDEX idx_user_order_user_status_time ON user_order (user_id, order_status, create_time DESC);
|
|
||||||
CREATE INDEX idx_user_order_status_time ON user_order (order_status, create_time DESC);
|
|
||||||
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019446499472781314', '1123598815738675201', 'order', '用户订单', 'menu', '/common/order', NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019446499472781315', '2019446499472781314', 'order_add', '新增', 'add', '/common/order/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019446499472781316', '2019446499472781314', 'order_edit', '修改', 'edit', '/common/order/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019446499472781317', '2019446499472781314', 'order_delete', '删除', 'delete', '/api/user-order/order/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019446499472781318', '2019446499472781314', 'order_view', '查看', 'view', '/common/order/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS user_market_benefit_package_template;
|
|
||||||
CREATE TABLE user_market_benefit_package_template --积分包信息模板表
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY,
|
|
||||||
package_name VARCHAR(128) NULL,
|
|
||||||
user_limit int4 default 0, -- 最大购买数量
|
|
||||||
max_limit int4 default 0, -- 全网最大兑换数量
|
|
||||||
day_limit int4 default 0, -- 产出总天数
|
|
||||||
benefit_point_amount decimal(14, 2) default 0, -- 总产出福利积分
|
|
||||||
benefit_value_amount decimal(14, 2) default 0, -- 购买赠与福利值
|
|
||||||
benefit_point_price decimal(14, 2) default 0, --兑换包需要的福利积分
|
|
||||||
cash_coupon_price decimal(14, 2) default 0, --兑换包需要的现金券
|
|
||||||
exchanged_quantity int4 default 0, -- 已兑换数量
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4 default 1,
|
|
||||||
is_deleted int4 default 0
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE user_market_benefit_package_template IS '积分包信息表';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_template.id IS '主键';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_template.package_name IS '积分包名称';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_template.user_limit IS '最大购买数量';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_template.day_limit IS '产出总天数';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_template.benefit_point_amount IS '总产出福利积分';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_template.benefit_value_amount IS '购买赠与福利值';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_template.benefit_point_price IS '兑换包需要的福利积分';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_template.cash_coupon_price IS '兑换包需要的现金券';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_template.max_limit IS '全网最大兑换数量';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_template.exchanged_quantity IS '已兑换数量';
|
|
||||||
comment on column user_market_benefit_package_template.create_user is '创建人';
|
|
||||||
comment on column user_market_benefit_package_template.create_dept is '创建部门';
|
|
||||||
comment on column user_market_benefit_package_template.create_time is '创建时间';
|
|
||||||
comment on column user_market_benefit_package_template.update_user is '修改人';
|
|
||||||
comment on column user_market_benefit_package_template.update_time is '修改时间';
|
|
||||||
comment on column user_market_benefit_package_template.status is '状态';
|
|
||||||
comment on column user_market_benefit_package_template.is_deleted is '是否已删除';
|
|
||||||
|
|
||||||
alter table user_market_benefit_package_template
|
|
||||||
owner to yicha1lu;
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO user_market_benefit_package_template (id, package_name, user_limit, max_limit, day_limit, benefit_point_amount, benefit_value_amount, benefit_point_price, cash_coupon_price, exchanged_quantity, create_user, create_dept, create_time, update_user, update_time, status, is_deleted) VALUES (2019440113307066370, '100福利包', 10, 2000000, 360, 300.00, 100.00, 100.00, 20.00, 0, 1123598821738675201, 1123598813738675201, '2026-02-05 23:56:57.000000', 1123598821738675201, '2026-02-05 23:57:40.162000', 1, 0);
|
|
||||||
INSERT INTO user_market_benefit_package_template (id, package_name, user_limit, max_limit, day_limit, benefit_point_amount, benefit_value_amount, benefit_point_price, cash_coupon_price, exchanged_quantity, create_user, create_dept, create_time, update_user, update_time, status, is_deleted) VALUES (2019440172115402754, '1000福利包', 4, 1000000, 360, 3000.00, 1000.00, 1000.00, 300.00, 0, 1123598821738675201, 1123598813738675201, '2026-02-05 23:57:11.072000', 1123598821738675201, '2026-02-05 23:57:11.072000', 1, 0);
|
|
||||||
INSERT INTO user_market_benefit_package_template (id, package_name, user_limit, max_limit, day_limit, benefit_point_amount, benefit_value_amount, benefit_point_price, cash_coupon_price, exchanged_quantity, create_user, create_dept, create_time, update_user, update_time, status, is_deleted) VALUES (2019440222086340610, '5000福利包', 2, 50000, 360, 15000.00, 5000.00, 5000.00, 1500.00, 0, 1123598821738675201, 1123598813738675201, '2026-02-05 23:57:23.001000', 1123598821738675201, '2026-02-05 23:57:23.001000', 1, 0);
|
|
||||||
INSERT INTO user_market_benefit_package_template (id, package_name, user_limit, max_limit, day_limit, benefit_point_amount, benefit_value_amount, benefit_point_price, cash_coupon_price, exchanged_quantity, create_user, create_dept, create_time, update_user, update_time, status, is_deleted) VALUES (2019440263022747650, '10000福利包', 1, 20000, 360, 40000.00, 10000.00, 10000.00, 4000.00, 0, 1123598821738675201, 1123598813738675201, '2026-02-05 23:57:32.752000', 1123598821738675201, '2026-02-05 23:57:32.752000', 1, 0);
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS user_market_benefit_package;
|
|
||||||
create table user_market_benefit_package --用户福利积分包表
|
|
||||||
(
|
|
||||||
id int8 not null primary key,
|
|
||||||
statistical_date timestamp(6),
|
|
||||||
user_id int8,
|
|
||||||
phone int8,
|
|
||||||
user_name varchar(128),
|
|
||||||
package_id int8,
|
|
||||||
package_name varchar(128),
|
|
||||||
type int4 default 1, -- 1-积分兑换 2-后台划拨
|
|
||||||
user_benefit decimal(14, 2) default 0, --兑换包需要的福利积分
|
|
||||||
user_cash decimal(14, 2) default 0, --兑换包需要的现金券
|
|
||||||
give_amount decimal(14, 2) default 0, -- 购买赠与福利值
|
|
||||||
day_total int4 default 0, -- 产出总天数
|
|
||||||
amount_total decimal(14, 2) default 0, -- 总产出福利积分
|
|
||||||
amount_day decimal(14, 2) default 0, -- 每日产出福利积分 = 总产出 / 总产出
|
|
||||||
amount_out decimal(16, 4) default 0, -- 已产出福利积分
|
|
||||||
out_day int4 default 0, -- 已产出天数
|
|
||||||
active_time timestamp(6), -- 激活时间
|
|
||||||
expired_date timestamp(6), -- 过期时间
|
|
||||||
remark text,
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4 default 1, -- 1-未激活 2-已激活 3-已完成 4-已过期,
|
|
||||||
is_deleted int4 default 0
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
create index upi_status_index
|
|
||||||
on user_market_benefit_package (is_deleted, status);
|
|
||||||
|
|
||||||
COMMENT ON TABLE user_market_benefit_package IS '用户积分包信息表';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.id IS '主键';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.user_id IS '用户id';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.phone IS '用户手机号';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.user_name IS '用户名';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.package_id IS '积分包id';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.package_name IS '积分包名称';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.type IS '1-积分兑换 2-后台划拨';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.user_benefit IS '兑换包需要的福利积分';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.user_cash IS '兑换包需要的现金券';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.give_amount IS '购买赠与福利值';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.day_total IS '产出总天数';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.amount_total IS '总产出福利积分';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.amount_day IS '每日产出福利积分';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.amount_out IS '已产出福利积分';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.out_day IS '已产出天数';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.expired_date IS '过期时间';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.active_time IS '激活时间';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package.remark IS '备注';
|
|
||||||
comment on column user_market_benefit_package.create_user is '创建人';
|
|
||||||
comment on column user_market_benefit_package.create_dept is '创建部门';
|
|
||||||
comment on column user_market_benefit_package.create_time is '创建时间';
|
|
||||||
comment on column user_market_benefit_package.update_user is '修改人';
|
|
||||||
comment on column user_market_benefit_package.update_time is '修改时间';
|
|
||||||
comment on column user_market_benefit_package.status is '状态 1-未激活 2-已激活 3-已完成 4-已过期';
|
|
||||||
comment on column user_market_benefit_package.is_deleted is '是否已删除';
|
|
||||||
|
|
||||||
alter table user_market_benefit_package
|
|
||||||
owner to yicha1lu;
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS user_market_benefit_package_log;
|
|
||||||
create table user_market_benefit_package_log
|
|
||||||
(
|
|
||||||
id int8 not null primary key,
|
|
||||||
statistical_date timestamp(6),
|
|
||||||
user_id int8,
|
|
||||||
phone int8,
|
|
||||||
user_name varchar(128),
|
|
||||||
type int4 default 1, -- 1-积分兑换 2-后台划拨
|
|
||||||
user_package_id int8,
|
|
||||||
package_name varchar(128),
|
|
||||||
package_detail text,
|
|
||||||
give_number int4 default 1,
|
|
||||||
remark text,
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4 default 1,
|
|
||||||
is_deleted int4 default 0
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
create index gpl_date_index
|
|
||||||
on user_market_benefit_package_log (is_deleted, statistical_date, user_id);
|
|
||||||
|
|
||||||
COMMENT ON TABLE user_market_benefit_package_log IS '兑换福利包记录';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.id IS '主键';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.statistical_date IS '统计日期';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.user_id IS '用户id';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.phone IS '用户手机号';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.user_name IS '用户名';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.type IS '1-积分兑换 2-后台划拨';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.user_package_id IS '积分包id';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.package_name IS '积分包名称';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.package_detail IS '积分包信息快照';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.give_number IS '赠送数量';
|
|
||||||
COMMENT ON COLUMN user_market_benefit_package_log.remark IS '备注';
|
|
||||||
comment on column user_market_benefit_package_log.create_user is '创建人';
|
|
||||||
comment on column user_market_benefit_package_log.create_dept is '创建部门';
|
|
||||||
comment on column user_market_benefit_package_log.create_time is '创建时间';
|
|
||||||
comment on column user_market_benefit_package_log.update_user is '修改人';
|
|
||||||
comment on column user_market_benefit_package_log.update_time is '修改时间';
|
|
||||||
comment on column user_market_benefit_package_log.status is '状态';
|
|
||||||
comment on column user_market_benefit_package_log.is_deleted is '是否已删除';
|
|
||||||
|
|
||||||
alter table user_market_benefit_package_log
|
|
||||||
owner to yicha1lu;
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO 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, -1, 1, '', '', 0);
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517579878402', '2016446332399943682', 'userMarketBenefitPackage', '用户福利包信息', 'menu', '/userPackage/userMarketBenefitPackage', NULL, 2, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517579878403', '2019438517579878402', 'userMarketBenefitPackage_add', '新增', 'add', '/userPackage/userMarketBenefitPackage/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517579878404', '2019438517579878402', 'userMarketBenefitPackage_edit', '修改', 'edit', '/userPackage/userMarketBenefitPackage/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517579878405', '2019438517579878402', 'userMarketBenefitPackage_delete', '删除', 'delete', '/api/blade-usermarketbenefitpackage/userMarketBenefitPackage/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517579878406', '2019438517579878402', 'userMarketBenefitPackage_view', '查看', 'view', '/userPackage/userMarketBenefitPackage/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517974142978', '2016446332399943682', 'userMarketBenefitPackageLog', '划拨福利包记录', 'menu', '/userPackage/userMarketBenefitPackageLog', NULL, 3, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517974142979', '2019438517974142978', 'userMarketBenefitPackageLog_add', '新增', 'add', '/userPackage/userMarketBenefitPackageLog/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517974142980', '2019438517974142978', 'userMarketBenefitPackageLog_edit', '修改', 'edit', '/userPackage/userMarketBenefitPackageLog/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517974142981', '2019438517974142978', 'userMarketBenefitPackageLog_delete', '删除', 'delete', '/api/blade-usermarketbenefitpackagelog/userMarketBenefitPackageLog/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517974142982', '2019438517974142978', 'userMarketBenefitPackageLog_view', '查看', 'view', '/userPackage/userMarketBenefitPackageLog/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517080756225', '2016446332399943682', 'userMarketBenefitPackageTemplate', '福利包信息', 'menu', '/userPackage/userMarketBenefitPackageTemplate', NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517080756226', '2019438517080756225', 'userMarketBenefitPackageTemplate_add', '新增', 'add', '/userPackage/userMarketBenefitPackageTemplate/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517080756227', '2019438517080756225', 'userMarketBenefitPackageTemplate_edit', '修改', 'edit', '/userPackage/userMarketBenefitPackageTemplate/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517080756228', '2019438517080756225', 'userMarketBenefitPackageTemplate_delete', '删除', 'delete', '/api/blade-usermarketbenefitpackagetemplate/userMarketBenefitPackageTemplate/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517080756229', '2019438517080756225', 'userMarketBenefitPackageTemplate_view', '查看', 'view', '/userPackage/userMarketBenefitPackageTemplate/view', 'file-text', 4, 2, 2, 1, NULL, 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);
|
|
||||||
INSERT INTO blade_dict (id, parent_id, code, dict_key, dict_value, sort, remark, is_sealed, status, is_deleted) VALUES (2019414847658545153, 0, 'app_product_status', '-1', 'app上下架商品状态', 26, '', 0, 1, 0);
|
|
||||||
INSERT INTO blade_dict (id, parent_id, code, dict_key, dict_value, sort, remark, is_sealed, status, is_deleted) VALUES (2019414970329354241, 2019414847658545153, 'app_product_status', '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 (2019415024934998018, 2019414847658545153, 'app_product_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 (2019491173300129793, 0, 'app_package_status', '-1', '福利包状态', 27, '', 0, 1, 0);
|
|
||||||
INSERT INTO blade_dict (id, parent_id, code, dict_key, dict_value, sort, remark, is_sealed, status, is_deleted) VALUES (2019491225556963329, 2019491173300129793, 'app_package_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 (2019491256389292033, 2019491173300129793, 'app_package_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 (2019491292992983042, 2019491173300129793, 'app_package_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 (2019491330833993730, 2019491173300129793, 'app_package_status', '4', '已过期', 4, '', 0, 1, 0);
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,39 +0,0 @@
|
|||||||
DROP TABLE IF EXISTS user_sms_log;
|
|
||||||
CREATE TABLE user_sms_log
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- 主键
|
|
||||||
user_id int8 DEFAULT 0 NOT NULL, -- 用户id
|
|
||||||
sms_type int4 NOT NULL DEFAULT 0, -- 短信类型 0-找回密码
|
|
||||||
content TEXT, -- 存储短信业务发送的具体内容,用于回溯审计
|
|
||||||
stat_date timestamp(6) NOT NULL, -- 统计日期,格式 '2026-02-24'
|
|
||||||
remarks 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 int4 NULL, -- 状态
|
|
||||||
is_deleted int4 DEFAULT 0 NULL -- 是否已删除
|
|
||||||
);
|
|
||||||
|
|
||||||
-- 用于按天统计查询用户发送短信次数
|
|
||||||
CREATE INDEX idx_usl_stat ON user_sms_log (user_id, sms_type, stat_date, create_time);
|
|
||||||
-- 用于按时间倒序查看某个用户的发送记录
|
|
||||||
CREATE INDEX idx_usl_uid_time ON user_sms_log (user_id, sms_type, create_time DESC);
|
|
||||||
|
|
||||||
COMMENT ON TABLE user_sms_log IS '用户短信日志';
|
|
||||||
COMMENT ON COLUMN user_sms_log.id IS '主键';
|
|
||||||
COMMENT ON COLUMN user_sms_log.user_id IS '用户id';
|
|
||||||
COMMENT ON COLUMN user_sms_log.sms_type IS '短信类型 0-找回密码';
|
|
||||||
COMMENT ON COLUMN user_sms_log.content IS '存储短信业务发送的具体内容,用于回溯审计';
|
|
||||||
COMMENT ON COLUMN user_sms_log.stat_date IS '统计日期';
|
|
||||||
COMMENT ON COLUMN user_sms_log.remarks IS '备注';
|
|
||||||
COMMENT ON COLUMN user_sms_log.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN user_sms_log.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN user_sms_log.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN user_sms_log.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN user_sms_log.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN user_sms_log.status IS '状态';
|
|
||||||
COMMENT ON COLUMN user_sms_log.is_deleted IS '是否已删除';
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,270 +0,0 @@
|
|||||||
DROP TABLE IF EXISTS market_upgrade_config;
|
|
||||||
CREATE TABLE market_upgrade_config
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- 主键ID
|
|
||||||
type int4 NOT NULL, -- 等级类型:1=福利值, 2=现金
|
|
||||||
level_name varchar(50) NOT NULL, -- 等级名称,如 '社区经销商V1', '无等级'
|
|
||||||
direct_recommend int4, -- 直推人数 (持有福利包人数 / 统计现金下单人数)
|
|
||||||
requirement_value decimal(20, 2), -- 要求值 (福利值 / 金额),使用 numeric 防止金额精度丢失
|
|
||||||
reward_rate decimal(5, 2), -- 加速/分红比例 (如 8% 存为 8.00)
|
|
||||||
description varchar(255), -- 详细规则备注 (对应图片中的括号说明)
|
|
||||||
sort_order int4 DEFAULT 0, -- 排序
|
|
||||||
next_level_id int8, -- 下一个等级的ID (关联自身ID)
|
|
||||||
has_next_level int4 DEFAULT 0, -- 是否有下一个等级
|
|
||||||
create_user int8 NULL, -- 创建人
|
|
||||||
create_dept int8 NULL, -- 创建部门
|
|
||||||
create_time timestamp(6) NULL, -- 创建时间
|
|
||||||
update_user int8 NULL, -- 修改人
|
|
||||||
update_time timestamp(6) NULL, -- 修改时间
|
|
||||||
status int4 NULL, -- 状态
|
|
||||||
is_deleted int4 DEFAULT 0 NULL -- 是否已删除
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE market_upgrade_config IS '用户等级升级配置表';
|
|
||||||
COMMENT ON COLUMN market_upgrade_config.type IS '等级类型:1=福利值, 2=现金';
|
|
||||||
COMMENT ON COLUMN market_upgrade_config.level_name IS '等级名称';
|
|
||||||
COMMENT ON COLUMN market_upgrade_config.direct_recommend IS '直推人数要求';
|
|
||||||
COMMENT ON COLUMN market_upgrade_config.requirement_value IS '业绩/福利值要求';
|
|
||||||
COMMENT ON COLUMN market_upgrade_config.reward_rate IS '加速或分红比例';
|
|
||||||
COMMENT ON COLUMN market_upgrade_config.description IS '等级详细说明';
|
|
||||||
COMMENT ON COLUMN market_upgrade_config.next_level_id IS '下一个等级的ID';
|
|
||||||
COMMENT ON COLUMN market_upgrade_config.has_next_level IS '是否拥有下一级';
|
|
||||||
COMMENT ON COLUMN market_upgrade_config.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN market_upgrade_config.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN market_upgrade_config.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN market_upgrade_config.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN market_upgrade_config.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN market_upgrade_config.status IS '状态';
|
|
||||||
COMMENT ON COLUMN market_upgrade_config.is_deleted IS '是否已删除';
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO "market_upgrade_config" ("id", "type", "level_name", "direct_recommend", "requirement_value", "reward_rate", "description", "sort_order", "next_level_id", "has_next_level", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (1, 1, '无等级', 0, '0.00', '0.00', '初始等级', 1, 2, 1, NULL, NULL, '2026-03-11 17:26:31.524', NULL, '2026-03-11 17:26:31.524', 1, 0);
|
|
||||||
INSERT INTO "market_upgrade_config" ("id", "type", "level_name", "direct_recommend", "requirement_value", "reward_rate", "description", "sort_order", "next_level_id", "has_next_level", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2, 1, '社区经销商V1', 10, '100000.00', '0.08', '福利包加速动态: 社区经销商V1', 2, 3, 1, NULL, NULL, '2026-03-11 17:26:31.524', NULL, '2026-03-11 17:26:31.524', 1, 0);
|
|
||||||
INSERT INTO "market_upgrade_config" ("id", "type", "level_name", "direct_recommend", "requirement_value", "reward_rate", "description", "sort_order", "next_level_id", "has_next_level", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (3, 1, '区县经销商V2', 20, '1000000.00', '0.06', '福利包加速动态: 区县经销商V2', 3, 4, 1, NULL, NULL, '2026-03-11 17:26:31.524', NULL, '2026-03-11 17:26:31.524', 1, 0);
|
|
||||||
INSERT INTO "market_upgrade_config" ("id", "type", "level_name", "direct_recommend", "requirement_value", "reward_rate", "description", "sort_order", "next_level_id", "has_next_level", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (4, 1, '市级经销商V3', 30, '5000000.00', '0.04', '福利包加速动态: 市级经销商V3', 4, 5, 1, NULL, NULL, '2026-03-11 17:26:31.524', NULL, '2026-03-11 17:26:31.524', 1, 0);
|
|
||||||
INSERT INTO "market_upgrade_config" ("id", "type", "level_name", "direct_recommend", "requirement_value", "reward_rate", "description", "sort_order", "next_level_id", "has_next_level", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (5, 1, '联合创始人V4', 40, '20000000.00', '0.02', '福利包加速动态: 联合创始人V4', 5, NULL, 0, NULL, NULL, '2026-03-11 17:26:31.524', NULL, '2026-03-11 17:26:31.524', 1, 0);
|
|
||||||
INSERT INTO "market_upgrade_config" ("id", "type", "level_name", "direct_recommend", "requirement_value", "reward_rate", "description", "sort_order", "next_level_id", "has_next_level", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (6, 2, '无等级', 0, '0.00', '0.00', '初始等级', 1, 7, 1, NULL, NULL, '2026-03-11 17:28:42.821', NULL, '2026-03-11 17:28:42.821', 1, 0);
|
|
||||||
INSERT INTO "market_upgrade_config" ("id", "type", "level_name", "direct_recommend", "requirement_value", "reward_rate", "description", "sort_order", "next_level_id", "has_next_level", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (7, 2, '社区经销商V1', 10, '100000.00', '0.05', '现金加速动态: 社区经销商V1', 2, 8, 1, NULL, NULL, '2026-03-11 17:28:42.822', NULL, '2026-03-11 17:28:42.822', 1, 0);
|
|
||||||
INSERT INTO "market_upgrade_config" ("id", "type", "level_name", "direct_recommend", "requirement_value", "reward_rate", "description", "sort_order", "next_level_id", "has_next_level", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (8, 2, '区县经销商V2', 20, '1000000.00', '0.05', '现金加速动态: 区县经销商V2', 3, 9, 1, NULL, NULL, '2026-03-11 17:28:42.822', NULL, '2026-03-11 17:28:42.822', 1, 0);
|
|
||||||
INSERT INTO "market_upgrade_config" ("id", "type", "level_name", "direct_recommend", "requirement_value", "reward_rate", "description", "sort_order", "next_level_id", "has_next_level", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (9, 2, '市级经销商V3', 30, '5000000.00', '0.05', '现金加速动态: 市级经销商V3', 4, 10, 1, NULL, NULL, '2026-03-11 17:28:42.822', NULL, '2026-03-11 17:28:42.822', 1, 0);
|
|
||||||
INSERT INTO "market_upgrade_config" ("id", "type", "level_name", "direct_recommend", "requirement_value", "reward_rate", "description", "sort_order", "next_level_id", "has_next_level", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (10, 2, '联合创始人V4', 40, '20000000.00', '0.05', '现金加速动态: 联合创始人V4(全网加权,单独乘区,不累加级差)', 5, NULL, 0, NULL, NULL, '2026-03-11 17:28:42.822', NULL, '2026-03-11 17:28:42.822', 1, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS market_upgrade_welfare_log;
|
|
||||||
CREATE TABLE market_upgrade_welfare_log
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- 主键ID
|
|
||||||
user_id int8 NOT NULL, -- 用户ID
|
|
||||||
last_level int8, -- 升级前的等级ID (关联配置表ID)
|
|
||||||
current_level_id int8, -- 用户当前等级
|
|
||||||
current_level_name varchar(50), -- 用户当前等级
|
|
||||||
upgrade_date timestamp(6) NOT NULL, -- 升级时间 (到天结束)
|
|
||||||
remarks text, -- 详细升级信息/备注
|
|
||||||
create_user int8 NULL, -- 创建人
|
|
||||||
create_dept int8 NULL, -- 创建部门
|
|
||||||
create_time timestamp(6) NULL, -- 创建时间
|
|
||||||
update_user int8 NULL, -- 修改人
|
|
||||||
update_time timestamp(6) NULL, -- 修改时间
|
|
||||||
status int4 NULL, -- 状态
|
|
||||||
is_deleted int4 DEFAULT 0 NULL -- 是否已删除
|
|
||||||
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX idx_muwl_uid
|
|
||||||
ON market_upgrade_welfare_log (user_id, upgrade_date ,create_time DESC);
|
|
||||||
|
|
||||||
COMMENT ON TABLE market_upgrade_welfare_log IS '用户福利包升级日志表';
|
|
||||||
COMMENT ON COLUMN market_upgrade_welfare_log.user_id IS '用户ID';
|
|
||||||
COMMENT ON COLUMN market_upgrade_welfare_log.last_level IS '升级前等级';
|
|
||||||
COMMENT ON COLUMN market_upgrade_welfare_log.current_level_id IS '当前等级ID';
|
|
||||||
COMMENT ON COLUMN market_upgrade_welfare_log.current_level_name IS '当前等级名称';
|
|
||||||
COMMENT ON COLUMN market_upgrade_welfare_log.upgrade_date IS '升级日期';
|
|
||||||
COMMENT ON COLUMN market_upgrade_welfare_log.remarks IS '升级详情备注';
|
|
||||||
COMMENT ON COLUMN market_upgrade_welfare_log.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN market_upgrade_welfare_log.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN market_upgrade_welfare_log.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN market_upgrade_welfare_log.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN market_upgrade_welfare_log.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN market_upgrade_welfare_log.status IS '状态';
|
|
||||||
COMMENT ON COLUMN market_upgrade_welfare_log.is_deleted IS '是否已删除';
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS market_upgrade_cash_log;
|
|
||||||
CREATE TABLE market_upgrade_cash_log
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- 主键ID
|
|
||||||
user_id int8 NOT NULL, -- 用户ID
|
|
||||||
last_level int8, -- 升级前的等级ID (关联配置表ID)
|
|
||||||
current_level_id int8, -- 用户当前等级
|
|
||||||
current_level_name varchar(50), -- 用户当前等级
|
|
||||||
upgrade_date timestamp(6) NOT NULL, -- 升级时间 (到天结束)
|
|
||||||
remarks text, -- 详细升级信息/备注
|
|
||||||
create_user int8 NULL, -- 创建人
|
|
||||||
create_dept int8 NULL, -- 创建部门
|
|
||||||
create_time timestamp(6) NULL, -- 创建时间
|
|
||||||
update_user int8 NULL, -- 修改人
|
|
||||||
update_time timestamp(6) NULL, -- 修改时间
|
|
||||||
status int4 NULL, -- 状态
|
|
||||||
is_deleted int4 DEFAULT 0 NULL -- 是否已删除
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX idx_mucl_uid
|
|
||||||
ON market_upgrade_cash_log (user_id, upgrade_date ,create_time DESC);
|
|
||||||
COMMENT ON TABLE market_upgrade_cash_log IS '用户现金升级日志表';
|
|
||||||
COMMENT ON COLUMN market_upgrade_cash_log.user_id IS '用户ID';
|
|
||||||
COMMENT ON COLUMN market_upgrade_cash_log.last_level IS '升级前等级';
|
|
||||||
COMMENT ON COLUMN market_upgrade_cash_log.current_level_id IS '当前等级ID';
|
|
||||||
COMMENT ON COLUMN market_upgrade_cash_log.current_level_name IS '当前等级名称';
|
|
||||||
COMMENT ON COLUMN market_upgrade_cash_log.upgrade_date IS '升级日期';
|
|
||||||
COMMENT ON COLUMN market_upgrade_cash_log.remarks IS '升级详情备注';
|
|
||||||
COMMENT ON COLUMN market_upgrade_cash_log.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN market_upgrade_cash_log.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN market_upgrade_cash_log.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN market_upgrade_cash_log.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN market_upgrade_cash_log.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN market_upgrade_cash_log.status IS '状态';
|
|
||||||
COMMENT ON COLUMN market_upgrade_cash_log.is_deleted IS '是否已删除';
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS market_welfare_performance;
|
|
||||||
CREATE TABLE market_welfare_performance
|
|
||||||
(
|
|
||||||
id int8 PRIMARY KEY, -- 主键ID (用户ID)
|
|
||||||
owen_amount decimal(14, 2) DEFAULT 0.00, -- 自身业绩 (直推/个人产生的)
|
|
||||||
total_amount decimal(14, 2) DEFAULT 0.00, -- 总业绩 (团队/包含下级的业绩)
|
|
||||||
version int4 DEFAULT 1, -- 版本号 (用于乐观锁,防止并发更新覆盖)
|
|
||||||
create_user int8 NULL, -- 创建人
|
|
||||||
create_dept int8 NULL, -- 创建部门
|
|
||||||
create_time timestamp(6) NULL, -- 创建时间
|
|
||||||
update_user int8 NULL, -- 修改人
|
|
||||||
update_time timestamp(6) NULL, -- 修改时间
|
|
||||||
status int4 NULL, -- 状态
|
|
||||||
is_deleted int4 DEFAULT 0 NULL -- 是否已删除
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE market_welfare_performance IS '福利包业绩表';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance.id IS '主键ID';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance.owen_amount IS '自身业绩';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance.total_amount IS '总业绩';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance.version IS '版本号';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance.status IS '状态';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance.is_deleted IS '是否已删除';
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS market_welfare_performance_log;
|
|
||||||
CREATE TABLE market_welfare_performance_log
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- 主键ID
|
|
||||||
user_id int8 NOT NULL, -- 用户ID
|
|
||||||
stat_date timestamp(6) NOT NULL, -- 统计时间 (到天)
|
|
||||||
performance decimal(14, 2) NOT NULL, -- 业绩
|
|
||||||
source_id int8, -- 来源ID (例如:订单ID, 产生业绩的具体业务ID)
|
|
||||||
source_detail varchar(255), -- 来源详情 (例如:订单号, 业务简述)
|
|
||||||
remarks text, -- 备注
|
|
||||||
create_user int8 NULL, -- 创建人
|
|
||||||
create_dept int8 NULL, -- 创建部门
|
|
||||||
create_time timestamp(6) NULL, -- 创建时间
|
|
||||||
update_user int8 NULL, -- 修改人
|
|
||||||
update_time timestamp(6) NULL, -- 修改时间
|
|
||||||
status int4 NULL, -- 状态
|
|
||||||
is_deleted int4 DEFAULT 0 NULL -- 是否已删除
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE market_welfare_performance_log IS '福利包业绩日志表';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance_log.user_id IS '用户ID';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance_log.stat_date IS '统计时间';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance_log.performance IS '当前业绩';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance_log.source_id IS '来源ID';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance_log.source_detail IS '来源详情';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance_log.remarks IS '备注';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance_log.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance_log.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance_log.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance_log.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance_log.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance_log.status IS '状态';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance_log.is_deleted IS '是否已删除';
|
|
||||||
|
|
||||||
CREATE INDEX idx_mwpl_uid ON market_welfare_performance_log (user_id, stat_date DESC);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS market_cash_performance;
|
|
||||||
CREATE TABLE market_cash_performance
|
|
||||||
(
|
|
||||||
id int8 PRIMARY KEY, -- 主键ID (用户ID)
|
|
||||||
owen_amount decimal(14, 2) DEFAULT 0.00, -- 自身业绩 (直推/个人产生的)
|
|
||||||
total_amount decimal(14, 2) DEFAULT 0.00, -- 总业绩 (团队/包含下级的业绩)
|
|
||||||
version int4 DEFAULT 1, -- 版本号 (用于乐观锁,防止并发更新覆盖)
|
|
||||||
create_user int8 NULL, -- 创建人
|
|
||||||
create_dept int8 NULL, -- 创建部门
|
|
||||||
create_time timestamp(6) NULL, -- 创建时间
|
|
||||||
update_user int8 NULL, -- 修改人
|
|
||||||
update_time timestamp(6) NULL, -- 修改时间
|
|
||||||
status int4 NULL, -- 状态
|
|
||||||
is_deleted int4 DEFAULT 0 NULL -- 是否已删除
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE market_cash_performance IS '现金业绩表';
|
|
||||||
COMMENT ON COLUMN market_cash_performance.id IS '主键ID';
|
|
||||||
COMMENT ON COLUMN market_cash_performance.owen_amount IS '自身业绩';
|
|
||||||
COMMENT ON COLUMN market_cash_performance.total_amount IS '总业绩';
|
|
||||||
COMMENT ON COLUMN market_cash_performance.version IS '版本号';
|
|
||||||
COMMENT ON COLUMN market_cash_performance.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN market_cash_performance.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN market_cash_performance.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN market_cash_performance.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN market_cash_performance.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN market_cash_performance.status IS '状态';
|
|
||||||
COMMENT ON COLUMN market_cash_performance.is_deleted IS '是否已删除';
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS market_cash_performance_log;
|
|
||||||
CREATE TABLE market_cash_performance_log
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- 主键ID
|
|
||||||
user_id int8 NOT NULL, -- 用户ID
|
|
||||||
stat_date timestamp(6) NOT NULL, -- 统计时间 (到天)
|
|
||||||
performance decimal(14, 2) NOT NULL, -- 业绩
|
|
||||||
source_id int8, -- 来源ID (例如:订单ID, 产生业绩的具体业务ID)
|
|
||||||
source_detail varchar(255), -- 来源详情 (例如:订单号, 业务简述)
|
|
||||||
remarks text, -- 备注
|
|
||||||
create_user int8 NULL, -- 创建人
|
|
||||||
create_dept int8 NULL, -- 创建部门
|
|
||||||
create_time timestamp(6) NULL, -- 创建时间
|
|
||||||
update_user int8 NULL, -- 修改人
|
|
||||||
update_time timestamp(6) NULL, -- 修改时间
|
|
||||||
status int4 NULL, -- 状态
|
|
||||||
is_deleted int4 DEFAULT 0 NULL -- 是否已删除
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE market_cash_performance_log IS '现金业绩日志表';
|
|
||||||
COMMENT ON COLUMN market_cash_performance_log.user_id IS '用户ID';
|
|
||||||
COMMENT ON COLUMN market_cash_performance_log.stat_date IS '统计时间';
|
|
||||||
COMMENT ON COLUMN market_cash_performance_log.performance IS '当前业绩';
|
|
||||||
COMMENT ON COLUMN market_cash_performance_log.source_id IS '来源ID';
|
|
||||||
COMMENT ON COLUMN market_cash_performance_log.source_detail IS '来源详情';
|
|
||||||
COMMENT ON COLUMN market_cash_performance_log.remarks IS '备注';
|
|
||||||
COMMENT ON COLUMN market_cash_performance_log.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN market_cash_performance_log.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN market_cash_performance_log.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN market_cash_performance_log.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN market_cash_performance_log.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN market_cash_performance_log.status IS '状态';
|
|
||||||
COMMENT ON COLUMN market_cash_performance_log.is_deleted IS '是否已删除';
|
|
||||||
|
|
||||||
CREATE INDEX idx_mcpl_uid ON market_cash_performance_log (user_id, stat_date DESC);
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------ 参数配置
|
|
||||||
|
|
||||||
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 (2029205589205626881, '后台划拨福利包数量配置', 'market.benefit.pack.allocate.number', '{2019440113307066370:10,2019440172115402754:4,2019440222086340610:2,2019440263022747650:1}', '后台划拨福利包数量配置', null, null, '2026-03-04 22:41:27.922000', null, '2026-03-04 22:41:27.922000', 1, 0);
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,388 +0,0 @@
|
|||||||
-- =============================================
|
|
||||||
-- 微信商户配置表 (blade_pay_wxpay_account_config)
|
|
||||||
-- =============================================
|
|
||||||
DROP TABLE IF EXISTS blade_pay_wxpay_account_config;
|
|
||||||
CREATE TABLE blade_pay_wxpay_account_config
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- ID
|
|
||||||
tenant_id varchar(12), -- 租户id
|
|
||||||
mch_id varchar(255) NOT NULL, -- 商户号
|
|
||||||
pay_key varchar(500) NOT NULL, -- 支付密钥
|
|
||||||
pay_name varchar(255), -- 收款名称
|
|
||||||
v3_key varchar(500), -- V3密钥
|
|
||||||
api_type int4, -- API类型【0:普通】
|
|
||||||
notify_url varchar(1000), -- 统一支付回调地址
|
|
||||||
refund_notify_url varchar(1000), -- 统一退款回调
|
|
||||||
cashier_url varchar(1000), -- 聚合收银台URL
|
|
||||||
cert_pem text, -- 微信证书pem文件
|
|
||||||
cert_pkcs text, -- 微信正式p12文件
|
|
||||||
cert_pub_key text, -- 微信证书公钥
|
|
||||||
cert_private_key text, -- 微信证书私钥
|
|
||||||
cert_serial_no varchar(500), -- 商户 API 证书序列号
|
|
||||||
cert_plat_serial_no varchar(500), -- 平台序列号
|
|
||||||
wx_pub_key text, -- 微信支付公钥
|
|
||||||
wx_pub_key_id varchar(255), -- 微信支付公钥ID
|
|
||||||
status int4 NOT NULL DEFAULT 0, -- 状态【0:关闭、1:启用】
|
|
||||||
create_user int8, -- 创建人
|
|
||||||
create_dept int8, -- 创建部门
|
|
||||||
create_time timestamp(6), -- 创建时间
|
|
||||||
update_user int8, -- 修改人
|
|
||||||
update_time timestamp(6), -- 修改时间
|
|
||||||
is_deleted int4, -- 是否已删除
|
|
||||||
remark varchar(500) DEFAULT '' -- 备注
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE blade_pay_wxpay_account_config IS '微信商户配置表';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.id IS 'ID';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.tenant_id IS '租户id';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.mch_id IS '商户号';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.pay_key IS '支付密钥';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.pay_name IS '收款名称';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.v3_key IS 'V3密钥';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.api_type IS 'API类型【0:普通】';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.notify_url IS '统一支付回调地址';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.refund_notify_url IS '统一退款回调';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.cashier_url IS '聚合收银台URL';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.cert_pem IS '微信证书pem文件';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.cert_pkcs IS '微信正式p12文件';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.cert_pub_key IS '微信证书公钥';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.cert_private_key IS '微信证书私钥';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.cert_serial_no IS '商户 API 证书序列号';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.cert_plat_serial_no IS '平台序列号';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.wx_pub_key IS '微信支付公钥';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.wx_pub_key_id IS '微信支付公钥ID';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.status IS '状态【0:关闭、1:启用】';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.is_deleted IS '是否已删除';
|
|
||||||
COMMENT ON COLUMN blade_pay_wxpay_account_config.remark IS '备注';
|
|
||||||
|
|
||||||
|
|
||||||
-- =============================================
|
|
||||||
-- 支付订单表 (blade_pay_order)
|
|
||||||
-- =============================================
|
|
||||||
DROP TABLE IF EXISTS blade_pay_order;
|
|
||||||
CREATE TABLE blade_pay_order
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- ID
|
|
||||||
tenant_id varchar(12), -- 租户id
|
|
||||||
order_no varchar(255) NOT NULL, -- 系统单号
|
|
||||||
body varchar(255) NOT NULL, -- 商品名称
|
|
||||||
money varchar(255) NOT NULL, -- 支付金额
|
|
||||||
app_id varchar(255) NOT NULL, -- 应用ID
|
|
||||||
mch_id varchar(255) NOT NULL, -- 商户号
|
|
||||||
pay_name varchar(255) NOT NULL, -- 收款名称
|
|
||||||
pay_type varchar(255) NOT NULL, -- 支付方式【code、native、jsapi、wxapp、h5、app】
|
|
||||||
channel varchar(255) NOT NULL, -- 支付渠道【wxpay、alipay】
|
|
||||||
buyer_id varchar(255), -- 买家ID
|
|
||||||
status int4 NOT NULL DEFAULT 0, -- 0:未支付、1:已支付
|
|
||||||
pay_no varchar(255), -- 第三方支付单号
|
|
||||||
pay_time varchar(255), -- 支付时间
|
|
||||||
is_refund int4 NOT NULL DEFAULT 0, -- 是否退款【0:否、1:是】
|
|
||||||
refund_money varchar(255), -- 已退款金额
|
|
||||||
notify_url varchar(255), -- 异步回调地址
|
|
||||||
create_user int8, -- 创建人
|
|
||||||
create_dept int8, -- 创建部门
|
|
||||||
create_time timestamp(6), -- 创建时间
|
|
||||||
update_user int8, -- 修改人
|
|
||||||
update_time timestamp(6), -- 修改时间
|
|
||||||
is_deleted int4, -- 是否已删除
|
|
||||||
remark varchar(500) DEFAULT '' -- 备注
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE blade_pay_order IS '支付订单表';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.id IS 'ID';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.tenant_id IS '租户id';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.order_no IS '系统单号';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.body IS '商品名称';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.money IS '支付金额';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.app_id IS '应用ID';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.mch_id IS '商户号';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.pay_name IS '收款名称';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.pay_type IS '支付方式【code、native、jsapi、wxapp、h5、app】';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.channel IS '支付渠道【wxpay、alipay】';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.buyer_id IS '买家ID';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.status IS '0:未支付、1:已支付';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.pay_no IS '第三方支付单号';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.pay_time IS '支付时间';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.is_refund IS '是否退款【0:否、1:是】';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.refund_money IS '已退款金额';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.notify_url IS '异步回调地址';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.is_deleted IS '是否已删除';
|
|
||||||
COMMENT ON COLUMN blade_pay_order.remark IS '备注';
|
|
||||||
|
|
||||||
|
|
||||||
-- =============================================
|
|
||||||
-- 订单退款表 (blade_pay_order_refund)
|
|
||||||
-- =============================================
|
|
||||||
DROP TABLE IF EXISTS blade_pay_order_refund;
|
|
||||||
CREATE TABLE blade_pay_order_refund
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- ID
|
|
||||||
tenant_id varchar(12), -- 租户id
|
|
||||||
refund_no varchar(255) NOT NULL, -- 退款单号
|
|
||||||
order_no varchar(255) NOT NULL, -- 业务订单
|
|
||||||
pay_no varchar(255) NOT NULL, -- 支付单号
|
|
||||||
refund_mch_id varchar(255) NOT NULL, -- 退款商户
|
|
||||||
refund_money varchar(255) NOT NULL, -- 退款金额
|
|
||||||
refund_desc varchar(255), -- 退款原因
|
|
||||||
status int4 NOT NULL DEFAULT 0, -- 退款状态 -1:退款失败 0:已发起 1:退款成功
|
|
||||||
notify_url varchar(1000), -- 退款回调地址
|
|
||||||
create_user int8, -- 创建人
|
|
||||||
create_dept int8, -- 创建部门
|
|
||||||
create_time timestamp(6), -- 创建时间
|
|
||||||
update_user int8, -- 修改人
|
|
||||||
update_time timestamp(6), -- 修改时间
|
|
||||||
is_deleted int4, -- 是否已删除
|
|
||||||
remark varchar(500) DEFAULT '' -- 备注
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE blade_pay_order_refund IS '订单退款表';
|
|
||||||
COMMENT ON COLUMN blade_pay_order_refund.id IS 'ID';
|
|
||||||
COMMENT ON COLUMN blade_pay_order_refund.tenant_id IS '租户id';
|
|
||||||
COMMENT ON COLUMN blade_pay_order_refund.refund_no IS '退款单号';
|
|
||||||
COMMENT ON COLUMN blade_pay_order_refund.order_no IS '业务订单';
|
|
||||||
COMMENT ON COLUMN blade_pay_order_refund.pay_no IS '支付单号';
|
|
||||||
COMMENT ON COLUMN blade_pay_order_refund.refund_mch_id IS '退款商户';
|
|
||||||
COMMENT ON COLUMN blade_pay_order_refund.refund_money IS '退款金额';
|
|
||||||
COMMENT ON COLUMN blade_pay_order_refund.refund_desc IS '退款原因';
|
|
||||||
COMMENT ON COLUMN blade_pay_order_refund.status IS '退款状态 -1:退款失败 0:已发起 1:退款成功';
|
|
||||||
COMMENT ON COLUMN blade_pay_order_refund.notify_url IS '退款回调地址';
|
|
||||||
COMMENT ON COLUMN blade_pay_order_refund.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN blade_pay_order_refund.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN blade_pay_order_refund.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN blade_pay_order_refund.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN blade_pay_order_refund.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN blade_pay_order_refund.is_deleted IS '是否已删除';
|
|
||||||
COMMENT ON COLUMN blade_pay_order_refund.remark IS '备注';
|
|
||||||
|
|
||||||
|
|
||||||
-- =============================================
|
|
||||||
-- 支付宝商户配置表 (blade_pay_alipay_account_config)
|
|
||||||
-- =============================================
|
|
||||||
DROP TABLE IF EXISTS blade_pay_alipay_account_config;
|
|
||||||
CREATE TABLE blade_pay_alipay_account_config
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- ID
|
|
||||||
tenant_id varchar(12), -- 租户id
|
|
||||||
mch_id varchar(255) NOT NULL, -- 商户号
|
|
||||||
app_id varchar(255) NOT NULL, -- 支付宝应用ID
|
|
||||||
account varchar(255) NOT NULL, -- 支付宝账户
|
|
||||||
pay_key text, -- 支付密钥
|
|
||||||
pub_key text, -- 支付宝公钥(开发者工具生成的txt文件)证书模式下通过程序提取该值
|
|
||||||
private_key text, -- 支付宝私钥(开发者工具生成的txt文件,证书模式下CSR文件夹下的私钥)
|
|
||||||
app_cert text, -- 应用证书,开发者网站下载
|
|
||||||
alipay_pub_cert text, -- 支付宝公钥证书,开发者网站下载
|
|
||||||
root_cert text, -- 支付宝根证书,开发者网站下载
|
|
||||||
app_auth_token varchar(500), -- 三方模式授权token
|
|
||||||
service_url varchar(500), -- 支付宝网关地址
|
|
||||||
sign_type varchar(255) NOT NULL, -- 加密算法类型
|
|
||||||
pay_name varchar(255), -- 收款名称
|
|
||||||
company_name varchar(500), -- 公司名称
|
|
||||||
api_type int4 NOT NULL DEFAULT 0, -- API类型【0:普通】
|
|
||||||
notify_url varchar(1000), -- 统一支付回调地址
|
|
||||||
refund_notify_url varchar(1000), -- 退款回调地址
|
|
||||||
status int4 NOT NULL DEFAULT 0, -- 状态【0:关闭、1:启用】
|
|
||||||
create_user int8, -- 创建人
|
|
||||||
create_dept int8, -- 创建部门
|
|
||||||
create_time timestamp(6), -- 创建时间
|
|
||||||
update_user int8, -- 修改人
|
|
||||||
update_time timestamp(6), -- 修改时间
|
|
||||||
is_deleted int4, -- 是否已删除
|
|
||||||
remark varchar(500) DEFAULT '' -- 备注
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE blade_pay_alipay_account_config IS '支付宝商户配置表';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.id IS 'ID';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.tenant_id IS '租户id';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.mch_id IS '商户号';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.app_id IS '支付宝应用ID';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.account IS '支付宝账户';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.pay_key IS '支付密钥';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.pub_key IS '支付宝公钥(开发者工具生成的txt文件)证书模式下通过程序提取该值';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.private_key IS '支付宝私钥(开发者工具生成的txt文件,证书模式下CSR文件夹下的私钥)';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.app_cert IS '应用证书,开发者网站下载';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.alipay_pub_cert IS '支付宝公钥证书,开发者网站下载';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.root_cert IS '支付宝根证书,开发者网站下载';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.app_auth_token IS '三方模式授权token';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.service_url IS '支付宝网关地址';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.sign_type IS '加密算法类型';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.pay_name IS '收款名称';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.company_name IS '公司名称';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.api_type IS 'API类型【0:普通】';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.notify_url IS '统一支付回调地址';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.refund_notify_url IS '退款回调地址';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.status IS '状态【0:关闭、1:启用】';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.is_deleted IS '是否已删除';
|
|
||||||
COMMENT ON COLUMN blade_pay_alipay_account_config.remark IS '备注';
|
|
||||||
|
|
||||||
|
|
||||||
-- =============================================
|
|
||||||
-- 聚合支付配置表 (blade_pay_merge_pay_config)
|
|
||||||
-- =============================================
|
|
||||||
DROP TABLE IF EXISTS blade_pay_merge_pay_config;
|
|
||||||
CREATE TABLE blade_pay_merge_pay_config
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- ID
|
|
||||||
tenant_id varchar(12), -- 租户id
|
|
||||||
mch_id varchar(255) NOT NULL, -- 商户号
|
|
||||||
pay_key varchar(255) NOT NULL, -- 支付密钥
|
|
||||||
notify_url varchar(1000), -- 统一支付回调地址
|
|
||||||
refund_notify_url varchar(1000), -- 退款回调地址
|
|
||||||
status int4 NOT NULL DEFAULT 0, -- 状态【0:关闭、1:启用】
|
|
||||||
create_user int8, -- 创建人
|
|
||||||
create_dept int8, -- 创建部门
|
|
||||||
create_time timestamp(6), -- 创建时间
|
|
||||||
update_user int8, -- 修改人
|
|
||||||
update_time timestamp(6), -- 修改时间
|
|
||||||
is_deleted int4, -- 是否已删除
|
|
||||||
remark varchar(500) DEFAULT '' -- 备注
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE blade_pay_merge_pay_config IS '聚合支付配置表';
|
|
||||||
COMMENT ON COLUMN blade_pay_merge_pay_config.id IS 'ID';
|
|
||||||
COMMENT ON COLUMN blade_pay_merge_pay_config.tenant_id IS '租户id';
|
|
||||||
COMMENT ON COLUMN blade_pay_merge_pay_config.mch_id IS '商户号';
|
|
||||||
COMMENT ON COLUMN blade_pay_merge_pay_config.pay_key IS '支付密钥';
|
|
||||||
COMMENT ON COLUMN blade_pay_merge_pay_config.notify_url IS '统一支付回调地址';
|
|
||||||
COMMENT ON COLUMN blade_pay_merge_pay_config.refund_notify_url IS '退款回调地址';
|
|
||||||
COMMENT ON COLUMN blade_pay_merge_pay_config.status IS '状态【0:关闭、1:启用】';
|
|
||||||
COMMENT ON COLUMN blade_pay_merge_pay_config.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN blade_pay_merge_pay_config.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN blade_pay_merge_pay_config.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN blade_pay_merge_pay_config.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN blade_pay_merge_pay_config.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN blade_pay_merge_pay_config.is_deleted IS '是否已删除';
|
|
||||||
COMMENT ON COLUMN blade_pay_merge_pay_config.remark IS '备注';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS common_order_confirm_log;
|
|
||||||
|
|
||||||
CREATE TABLE common_order_confirm_log
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- 主键ID
|
|
||||||
user_id int8, -- 用户ID
|
|
||||||
order_id int8, -- 订单ID
|
|
||||||
item_name varchar(32), -- 商品名称
|
|
||||||
delivery_address varchar(255), -- 收货地址ID
|
|
||||||
actual_amount numeric(10, 2) default 0.00 not null, -- 实际支付金额
|
|
||||||
order_type varchar(32), -- 订单类型
|
|
||||||
payment_type int4, -- 支付类型
|
|
||||||
is_agency_distributed int4 NOT NULL DEFAULT 0, -- 是否分发极差代理 (0:未分发, 1:已分发)
|
|
||||||
agency_distribute_time timestamp(6), -- 极差代理发放时间
|
|
||||||
is_service_distributed int4 NOT NULL DEFAULT 0, -- 是否发放服务商佣金 (0:未发放, 1:已发放)
|
|
||||||
service_distribute_time timestamp(6), -- 服务商佣金发放时间
|
|
||||||
status int4 NOT NULL DEFAULT 0, -- 状态
|
|
||||||
create_user int8, -- 创建人
|
|
||||||
create_dept int8, -- 创建部门
|
|
||||||
create_time timestamp(6), -- 创建时间
|
|
||||||
update_user int8, -- 修改人
|
|
||||||
update_time timestamp(6), -- 修改时间
|
|
||||||
is_deleted int4, -- 是否已删除 (0:未删除, 1:已删除)
|
|
||||||
remark varchar(500) DEFAULT '' -- 备注
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX idx_cocl_aop ON common_order_confirm_log (is_agency_distributed, order_type, payment_type);
|
|
||||||
CREATE INDEX idx_cocl_sop ON common_order_confirm_log (is_service_distributed, order_type, payment_type);
|
|
||||||
CREATE INDEX idx_cocl_poc ON common_order_confirm_log (payment_type, order_type, create_time DESC);
|
|
||||||
|
|
||||||
COMMENT ON TABLE common_order_confirm_log IS '订单确认收货记录表';
|
|
||||||
|
|
||||||
COMMENT ON COLUMN common_order_confirm_log.id IS 'id';
|
|
||||||
COMMENT ON COLUMN common_order_confirm_log.user_id IS '用户id';
|
|
||||||
COMMENT ON COLUMN common_order_confirm_log.order_id IS '订单id';
|
|
||||||
COMMENT ON COLUMN common_order_confirm_log.item_name IS '商品名称';
|
|
||||||
COMMENT ON COLUMN common_order_confirm_log.delivery_address IS '收货地址';
|
|
||||||
COMMENT ON COLUMN common_order_confirm_log.actual_amount IS '实际支付金额';
|
|
||||||
COMMENT ON COLUMN common_order_confirm_log.order_type IS '订单类型';
|
|
||||||
COMMENT ON COLUMN common_order_confirm_log.payment_type IS '支付类型';
|
|
||||||
COMMENT ON COLUMN common_order_confirm_log.is_agency_distributed IS '是否分发极差代理 (0:未分发, 1:已分发)';
|
|
||||||
COMMENT ON COLUMN common_order_confirm_log.agency_distribute_time IS '极差代理发放时间';
|
|
||||||
COMMENT ON COLUMN common_order_confirm_log.is_service_distributed IS '是否发放服务商佣金 (0:未发放, 1:已发放)';
|
|
||||||
COMMENT ON COLUMN common_order_confirm_log.service_distribute_time IS '服务商佣金发放时间';
|
|
||||||
COMMENT ON COLUMN common_order_confirm_log.status IS '状态';
|
|
||||||
COMMENT ON COLUMN common_order_confirm_log.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN common_order_confirm_log.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN common_order_confirm_log.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN common_order_confirm_log.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN common_order_confirm_log.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN common_order_confirm_log.is_deleted IS '是否已删除';
|
|
||||||
COMMENT ON COLUMN common_order_confirm_log.remark IS '备注';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- =============================================
|
|
||||||
-- 菜单数据初始化 (blade_menu)
|
|
||||||
-- =============================================
|
|
||||||
|
|
||||||
-- 1. 支付管理 (根节点)
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, is_open, remark, is_deleted) VALUES (1477199103906373633, 0, '14', '支付管理', 'pay', '/pay', 'iconfont icon-weixin1', 100, 1, 1, '', 0);
|
|
||||||
|
|
||||||
-- 2. 微信支付配置模块
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted) VALUES (1476839243041804294, 1477199103906373633, 'wxconfig', '微信支付配置', 'menu', '/plugin/pay/wxconfig', NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1476839243041804295, 1476839243041804294, 'wxconfig_add', '新增', 'add', '/plugin/pay/wxconfig/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1476839243041804296, 1476839243041804294, 'wxconfig_edit', '修改', 'edit', '/plugin/pay/wxconfig/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted) VALUES (1476839243041804297, 1476839243041804294, 'wxconfig_delete', '删除', 'delete', '/api/blade-pay/wxconfig/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1476839243041804298, 1476839243041804294, 'wxconfig_view', '查看', 'view', '/plugin/pay/wxconfig/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
-- 3. 订单管理模块
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1476767495650865158, 1477199103906373633, 'order', '订单管理', 'menu', '/plugin/pay/order', NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1476767495650865159, 1476767495650865158, 'order_add', '新增', 'add', '/plugin/pay/order/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1476767495650865160, 1476767495650865158, 'order_edit', '修改', 'edit', '/plugin/pay/order/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1476767495650865161, 1476767495650865158, 'order_delete', '删除', 'delete', '/api/blade-pay/order/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1476767495650865162, 1476767495650865158, 'order_view', '查看', 'view', '/plugin/pay/order/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
-- 4. 支付体验 (根节点下的子菜单)
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, is_open, remark, is_deleted)VALUES (1477222211518210049, 1477199103906373633, '12', '支付体验', 'pay-demo', '/plugin/pay/demo', 'iconfont iconicon_wechat', 3, 1, 1, '', 0);
|
|
||||||
|
|
||||||
-- 5. 退款管理模块
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1478012327564226566, 1477199103906373633, 'refund', '退款管理', 'menu', '/plugin/pay/refund', NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
|
|
||||||
-- 注意:原SQL中退款管理缺少“新增”按钮,此处保持原样。如果有需要可自行添加。
|
|
||||||
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1478012327564226568, 1478012327564226566, 'refund_edit', '修改', 'edit', '/plugin/pay/refund/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1478012327564226569, 1478012327564226566, 'refund_delete', '删除', 'delete', '/api/blade-pay/refund/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1478012327564226570, 1478012327564226566, 'refund_view', '查看', 'view', '/plugin/pay/refund/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
-- 6. 支付宝配置模块
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1519502474608390145, 1477199103906373633, 'aliconfig', '支付宝配置', 'menu', '/plugin/pay/aliconfig', NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
|
|
||||||
-- 修正了原SQL中字段顺序不一致的问题,统一为 action 列
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1519502474608391478, 1477199103906373633, 'aliconfig_view', '查看', 'view', '/plugin/pay/aliconfig/view', 'file-text', 4, 2, 2, 1, '', 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1519502474608398520, 1477199103906373633, 'aliconfig_delete', '删除', 'delete', '/api/blade-pay/aliconfig/remove', 'delete', 3, 2, 3, 1, '', 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1519502474608399630, 1477199103906373633, 'aliconfig_edit', '修改', 'edit', '/plugin/pay/aliconfig/edit', 'form', 2, 2, 2, 1, '', 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1519502474608397841, 1477199103906373633, 'aliconfig_add', '新增', 'add', '/plugin/pay/aliconfig/add', 'plus', 1, 2, 1, 1, '', 0);
|
|
||||||
|
|
||||||
-- 7. 聚合支付配置模块
|
|
||||||
-- 注意:原SQL使用 VALUES 位置匹配,这里显式指定字段以确保安全
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1541359525647163398, 1477199103906373633, 'mergepayconfig', '聚合支付', 'menu', '/plugin/pay/merge/config', NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1541359525647163399, 1541359525647163398, 'mergepayconfig_add', '新增', 'add', '/plugin/pay/merge/config/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1541359525647163400, 1541359525647163398, 'mergepayconfig_edit', '修改', 'edit', '/plugin/pay/merge/config/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1541359525647163401, 1541359525647163398, 'mergepayconfig_delete', '删除', 'delete', '/api/blade-pay/merge/config/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES (1541359525647163402, 1541359525647163398, 'mergepayconfig_view', '查看', 'view', '/plugin/pay/merge/config/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,438 +0,0 @@
|
|||||||
DROP TABLE IF EXISTS merchant_flagship_store CASCADE;
|
|
||||||
|
|
||||||
CREATE TABLE merchant_flagship_store
|
|
||||||
(
|
|
||||||
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- [主键]
|
|
||||||
store_name VARCHAR(255) NOT NULL, -- 商家全称
|
|
||||||
contact_phone VARCHAR(20), -- 商家联系电话
|
|
||||||
province_id int8 NOT NULL,
|
|
||||||
city_id int8 NOT NULL,
|
|
||||||
regions_id int8 NOT NULL,
|
|
||||||
region_name text NOT NULL, -- 地区名
|
|
||||||
full_address text NOT NULL, -- 详细地址
|
|
||||||
location geometry(Point, 4326) NOT NULL, -- 门店经纬度坐标(用于地图打点和距离计算)
|
|
||||||
thumbnail_url text, -- 缩略图
|
|
||||||
main_image_url text[] default '{}'::text[], -- 商家主图
|
|
||||||
detail_images text[] default '{}'::text[], -- 详情展示多图
|
|
||||||
business_hours VARCHAR(100), -- 营业时间描述
|
|
||||||
store_description text, -- 商家详细介绍
|
|
||||||
create_user int8 NULL, -- 创建人
|
|
||||||
create_dept int8 NULL, -- 创建部门
|
|
||||||
create_time timestamp(6) NULL, -- 创建时间
|
|
||||||
update_user int8 NULL, -- 修改人
|
|
||||||
update_time timestamp(6) NULL, -- 修改时间
|
|
||||||
status int4 NULL, -- 状态
|
|
||||||
is_deleted int4 DEFAULT 0 NULL -- 是否已删除
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE merchant_flagship_store IS '商家旗舰店信息表';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.id IS '主键 ID';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.store_name IS '店铺名字';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.contact_phone IS '商家联系电话';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.province_id IS '省份id';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.city_id IS '城市id';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.regions_id IS '地址id';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.region_name IS '地区名';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.full_address IS '完整详细地址';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.location IS '地理坐标 POINT(经度,纬度),用于地图定位和距离计算';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.main_image_url IS '商家主图';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.thumbnail_url IS '缩略图';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.detail_images IS '详情图';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.business_hours IS '营业时间,如:10:00--23:00';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.store_description IS '商家详细介绍';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.status IS '状态';
|
|
||||||
COMMENT ON COLUMN merchant_flagship_store.is_deleted IS '是否已删除';
|
|
||||||
|
|
||||||
|
|
||||||
-- 4.3 地理位置索引 (GiST):核心!用于“附近店铺”查询和距离排序
|
|
||||||
CREATE INDEX idx_mfs_location ON merchant_flagship_store USING gist(location);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS cultural_tourism_spot CASCADE;
|
|
||||||
CREATE TABLE cultural_tourism_spot
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- 自增主键
|
|
||||||
is_recommended int4 DEFAULT 0, -- 是否推荐
|
|
||||||
spot_name VARCHAR(255) NOT NULL, -- 景点名称
|
|
||||||
summary varchar(255), -- 简短摘要(列表页显示,如:“中国最美的地方”)
|
|
||||||
rating NUMERIC(3, 2) DEFAULT 0.00, -- 用户评分
|
|
||||||
visit_count int4 DEFAULT 0, -- 出行人数
|
|
||||||
thumbnail_url text, -- 缩略图
|
|
||||||
main_image_url text[] default '{}'::text[], -- 主图
|
|
||||||
detail_images text[] default '{}'::text[], -- 详情多图集合
|
|
||||||
video_url text, -- 宣传视频链接
|
|
||||||
description text, -- 详细介绍
|
|
||||||
create_user int8 NULL, -- 创建人
|
|
||||||
create_dept int8 NULL, -- 创建部门
|
|
||||||
create_time timestamp(6) NULL, -- 创建时间
|
|
||||||
update_user int8 NULL, -- 修改人
|
|
||||||
update_time timestamp(6) NULL, -- 修改时间
|
|
||||||
status int4 NULL, -- 状态
|
|
||||||
is_deleted int4 DEFAULT 0 NULL -- 是否已删除
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE cultural_tourism_spot IS '文旅景点信息表';
|
|
||||||
COMMENT ON COLUMN cultural_tourism_spot.id IS '主键ID';
|
|
||||||
COMMENT ON COLUMN cultural_tourism_spot.is_recommended IS '是否推荐';
|
|
||||||
COMMENT ON COLUMN cultural_tourism_spot.spot_name IS '景点全称';
|
|
||||||
COMMENT ON COLUMN cultural_tourism_spot.rating IS '用户评分,范围0.00~5.00';
|
|
||||||
COMMENT ON COLUMN cultural_tourism_spot.visit_count IS '出行人数';
|
|
||||||
COMMENT ON COLUMN cultural_tourism_spot.thumbnail_url IS '缩略图';
|
|
||||||
COMMENT ON COLUMN cultural_tourism_spot.main_image_url IS '主图';
|
|
||||||
COMMENT ON COLUMN cultural_tourism_spot.detail_images IS '详情图';
|
|
||||||
COMMENT ON COLUMN cultural_tourism_spot.video_url IS '宣传视频链接';
|
|
||||||
COMMENT ON COLUMN cultural_tourism_spot.summary IS '简短摘要';
|
|
||||||
COMMENT ON COLUMN cultural_tourism_spot.description IS '详细介绍';
|
|
||||||
COMMENT ON COLUMN cultural_tourism_spot.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN cultural_tourism_spot.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN cultural_tourism_spot.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN cultural_tourism_spot.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN cultural_tourism_spot.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN cultural_tourism_spot.status IS '状态';
|
|
||||||
COMMENT ON COLUMN cultural_tourism_spot.is_deleted IS '是否已删除';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS news_category CASCADE;
|
|
||||||
|
|
||||||
CREATE TABLE news_category
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- 自增主键
|
|
||||||
category_name VARCHAR(50) NOT NULL, -- 分类名称
|
|
||||||
sort_order int4 DEFAULT 0, -- 排序
|
|
||||||
is_top int4 DEFAULT 0, -- 是否置顶
|
|
||||||
create_user int8 NULL, -- 创建人
|
|
||||||
create_dept int8 NULL, -- 创建部门
|
|
||||||
create_time timestamp(6) NULL, -- 创建时间
|
|
||||||
update_user int8 NULL, -- 修改人
|
|
||||||
update_time timestamp(6) NULL, -- 修改时间
|
|
||||||
status int4 NULL, -- 状态
|
|
||||||
is_deleted int4 DEFAULT 0 NULL -- 是否已删除
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMENT ON TABLE news_category IS '资讯分类表,用于管理顶部导航标签';
|
|
||||||
|
|
||||||
COMMENT ON COLUMN news_category.id IS '主键';
|
|
||||||
COMMENT ON COLUMN news_category.category_name IS '分类名称';
|
|
||||||
COMMENT ON COLUMN news_category.sort_order IS '排序';
|
|
||||||
COMMENT ON COLUMN news_category.is_top IS '是否置顶';
|
|
||||||
COMMENT ON COLUMN news_category.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN news_category.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN news_category.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN news_category.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN news_category.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN news_category.status IS '状态';
|
|
||||||
COMMENT ON COLUMN news_category.is_deleted IS '是否已删除';
|
|
||||||
|
|
||||||
CREATE INDEX idx_nc_pinned_sort ON news_category(is_top DESC, sort_order DESC, create_time DESC);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS news_content CASCADE;
|
|
||||||
|
|
||||||
-- =================================================================
|
|
||||||
-- 2. 创建资讯内容表
|
|
||||||
-- =================================================================
|
|
||||||
CREATE TABLE news_content
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- 自增主键
|
|
||||||
category_id int8 NOT NULL, -- 所属分类ID
|
|
||||||
title VARCHAR(255) NOT NULL, -- 标题
|
|
||||||
summary varchar(255), -- 简短摘要
|
|
||||||
content_type int4 DEFAULT 0, -- 内容类型:0-图文 1-视频
|
|
||||||
video_url text, -- 视频链接
|
|
||||||
play_count int8 DEFAULT 0, -- 播放次数
|
|
||||||
thumbnail_url text, -- 缩略图
|
|
||||||
main_image_url text[] default '{}'::text[], -- 主图(
|
|
||||||
detail_images text[] default '{}'::text[], -- 详情多图集合
|
|
||||||
article_content text, -- 正文内容
|
|
||||||
comment_count int8 DEFAULT 0, -- 评论数量
|
|
||||||
is_featured int4 DEFAULT 0, -- 是否置顶
|
|
||||||
sort_order int4 DEFAULT 0, -- 排序
|
|
||||||
view_count int8 DEFAULT 0, -- 浏览次数
|
|
||||||
create_user int8 NULL, -- 创建人
|
|
||||||
create_dept int8 NULL, -- 创建部门
|
|
||||||
create_time timestamp(6) NULL, -- 创建时间
|
|
||||||
update_user int8 NULL, -- 修改人
|
|
||||||
update_time timestamp(6) NULL, -- 修改时间
|
|
||||||
status int4 NULL DEFAULT 1, -- 状态 ,0=下架,1=上架
|
|
||||||
is_deleted int4 DEFAULT 0 NULL -- 是否已删除
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
-- =================================================================
|
|
||||||
-- 3. 添加字段备注
|
|
||||||
-- =================================================================
|
|
||||||
COMMENT ON TABLE news_content IS '资讯内容表';
|
|
||||||
|
|
||||||
COMMENT ON COLUMN news_content.id IS '主键ID';
|
|
||||||
COMMENT ON COLUMN news_content.category_id IS '所属分类ID';
|
|
||||||
COMMENT ON COLUMN news_content.title IS '资讯标题';
|
|
||||||
COMMENT ON COLUMN news_content.summary IS '简短摘要';
|
|
||||||
COMMENT ON COLUMN news_content.content_type IS '内容类型 0-图文 1-视频';
|
|
||||||
COMMENT ON COLUMN news_content.video_url IS '视频链接';
|
|
||||||
COMMENT ON COLUMN news_content.play_count IS '视频播放次数';
|
|
||||||
COMMENT ON COLUMN news_content.thumbnail_url IS '缩略图';
|
|
||||||
COMMENT ON COLUMN news_content.main_image_url IS '主图';
|
|
||||||
COMMENT ON COLUMN news_content.detail_images IS '详情多图';
|
|
||||||
COMMENT ON COLUMN news_content.article_content IS '正文内容';
|
|
||||||
COMMENT ON COLUMN news_content.comment_count IS '评论数量';
|
|
||||||
COMMENT ON COLUMN news_content.is_featured IS '是否置顶';
|
|
||||||
COMMENT ON COLUMN news_content.sort_order IS '排序';
|
|
||||||
COMMENT ON COLUMN news_content.view_count IS '浏览次数';
|
|
||||||
COMMENT ON COLUMN news_content.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN news_content.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN news_content.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN news_content.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN news_content.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN news_content.status IS '状态 0=下架,1=上架';
|
|
||||||
COMMENT ON COLUMN news_content.is_deleted IS '是否已删除';
|
|
||||||
|
|
||||||
CREATE INDEX idx_ncc_featured_sort ON news_content(is_featured DESC, sort_order DESC, create_time DESC);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS tour_product;
|
|
||||||
CREATE TABLE tour_product
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- 主键ID
|
|
||||||
product_name varchar(100) NOT NULL, -- 产品名称 (如:恩施硒茶文化之旅)
|
|
||||||
sub_title varchar(255) DEFAULT NULL, -- 副标题/亮点 (如:4天3晚 | 研学之旅)
|
|
||||||
thumbnail_url text DEFAULT NULL, -- 缩略图
|
|
||||||
main_image_url text[] DEFAULT '{}'::text[], -- 商家主图 (数组)
|
|
||||||
detail_images text[] DEFAULT '{}'::text[], -- 详情展示多图 (数组)
|
|
||||||
city_name varchar(50) DEFAULT NULL, -- 目的地城市名称
|
|
||||||
duration_days int4 DEFAULT NULL, -- 行程天数
|
|
||||||
duration_nights int4 DEFAULT NULL, -- 住宿晚数
|
|
||||||
base_price decimal(10, 2) NOT NULL, -- 基础起售价
|
|
||||||
adult_price decimal(10, 2) DEFAULT NULL, -- 成人单价
|
|
||||||
child_price decimal(10, 2) DEFAULT NULL, -- 儿童单价
|
|
||||||
elderly_price decimal(10, 2) DEFAULT NULL, -- 老年人单价
|
|
||||||
min_people int4 DEFAULT 1, -- 最小成团人数
|
|
||||||
max_people int4 DEFAULT 9999, -- 最大接待人数
|
|
||||||
is_recommended int4 DEFAULT 0, -- 是否推荐
|
|
||||||
require_id_card int4 DEFAULT 0, -- 是否强制身份证
|
|
||||||
require_passport int4 DEFAULT 0, -- 是否强制护照
|
|
||||||
require_hk_macau_pass int4 DEFAULT 0, -- 是否强制港澳通行证
|
|
||||||
description text DEFAULT NULL, -- 产品详情描述
|
|
||||||
visit_count int4 DEFAULT 0, -- 已成团次数/销量
|
|
||||||
rating decimal(3, 2) DEFAULT 0.00, -- 用户评分
|
|
||||||
province_id int8 NOT NULL,
|
|
||||||
city_id int8 NOT NULL,
|
|
||||||
create_user int8 NULL, -- 创建人ID
|
|
||||||
create_dept int8 NULL, -- 创建部门ID
|
|
||||||
create_time timestamp(6) NULL, -- 创建时间
|
|
||||||
update_user int8 NULL, -- 修改人ID
|
|
||||||
update_time timestamp(6) NULL, -- 修改时间
|
|
||||||
status int4 NULL DEFAULT 1, -- 状态:0=下架,1=上架
|
|
||||||
is_deleted int4 DEFAULT 0 NULL -- 是否已删除:0=未删除,1=已删除
|
|
||||||
);
|
|
||||||
|
|
||||||
-- 添加表注释
|
|
||||||
COMMENT ON TABLE tour_product IS '旅游产品表';
|
|
||||||
|
|
||||||
-- 添加列注释
|
|
||||||
COMMENT ON COLUMN tour_product.id IS '主键ID';
|
|
||||||
COMMENT ON COLUMN tour_product.product_name IS '产品名称 (如:恩施硒茶文化之旅)';
|
|
||||||
COMMENT ON COLUMN tour_product.sub_title IS '副标题/亮点 (如:4天3晚 | 研学之旅)';
|
|
||||||
COMMENT ON COLUMN tour_product.thumbnail_url IS '缩略图';
|
|
||||||
COMMENT ON COLUMN tour_product.main_image_url IS '商家主图 (数组)';
|
|
||||||
COMMENT ON COLUMN tour_product.detail_images IS '详情展示多图 (数组)';
|
|
||||||
COMMENT ON COLUMN tour_product.city_name IS '目的地城市名称';
|
|
||||||
COMMENT ON COLUMN tour_product.duration_days IS '行程天数';
|
|
||||||
COMMENT ON COLUMN tour_product.duration_nights IS '住宿晚数';
|
|
||||||
COMMENT ON COLUMN tour_product.base_price IS '基础起售价';
|
|
||||||
COMMENT ON COLUMN tour_product.adult_price IS '成人单价';
|
|
||||||
COMMENT ON COLUMN tour_product.child_price IS '儿童单价';
|
|
||||||
COMMENT ON COLUMN tour_product.elderly_price IS '老年人单价';
|
|
||||||
COMMENT ON COLUMN tour_product.min_people IS '最小成团人数';
|
|
||||||
COMMENT ON COLUMN tour_product.max_people IS '最大接待人数';
|
|
||||||
COMMENT ON COLUMN tour_product.is_recommended IS '是否推荐:0=否,1=是';
|
|
||||||
COMMENT ON COLUMN tour_product.require_id_card IS '是否强制身份证:0=否,1=是';
|
|
||||||
COMMENT ON COLUMN tour_product.require_passport IS '是否强制护照:0=否,1=是';
|
|
||||||
COMMENT ON COLUMN tour_product.require_hk_macau_pass IS '是否强制港澳通行证:0=否,1=是';
|
|
||||||
COMMENT ON COLUMN tour_product.description IS '产品详情描述';
|
|
||||||
COMMENT ON COLUMN tour_product.visit_count IS '已成团次数/销量';
|
|
||||||
COMMENT ON COLUMN tour_product.rating IS '用户评分';
|
|
||||||
COMMENT ON COLUMN tour_product.province_id IS '省份id';
|
|
||||||
COMMENT ON COLUMN tour_product.city_id IS '城市id';
|
|
||||||
COMMENT ON COLUMN tour_product.create_user IS '创建人ID';
|
|
||||||
COMMENT ON COLUMN tour_product.create_dept IS '创建部门ID';
|
|
||||||
COMMENT ON COLUMN tour_product.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN tour_product.update_user IS '修改人ID';
|
|
||||||
COMMENT ON COLUMN tour_product.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN tour_product.status IS '状态:0=下架,1=上架';
|
|
||||||
COMMENT ON COLUMN tour_product.is_deleted IS '是否已删除:0=未删除,1=已删除';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS tour_order_detail;
|
|
||||||
|
|
||||||
CREATE TABLE tour_order_detail
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- 主键ID
|
|
||||||
order_id int8 NOT NULL, -- 关联订单ID (主表 tour_order 的ID)
|
|
||||||
user_id int8 NOT NULL, -- 下单用户ID
|
|
||||||
traveler_detail jsonb DEFAULT NULL, -- 出行人信息快照 (数组格式,冗余存储,防止档案修改影响历史订单)
|
|
||||||
product_snapshot jsonb DEFAULT NULL, -- 产品信息快照 (数组格式,包含线路名称、单价、数量、规格等,防止产品下架/改价影响历史订单)
|
|
||||||
contract_url varchar(500) DEFAULT NULL, -- 电子合同地址/编号 (存储生成的合同PDF路径或第三方合同号)
|
|
||||||
contract_status int4 DEFAULT 0, -- 合同状态:0=未签署,1=已签署,2=已过期 (扩展字段,建议加上)
|
|
||||||
guide_name varchar(50) DEFAULT NULL, -- 导游姓名
|
|
||||||
guide_phone varchar(20) DEFAULT NULL, -- 导游联系电话
|
|
||||||
start_date timestamp(6) DEFAULT NULL, -- 出行日期 (具体出发时间)
|
|
||||||
end_date timestamp(6) DEFAULT NULL, -- 预计返回日期
|
|
||||||
remark varchar(255) DEFAULT NULL, -- 订单备注 (用户留言或内部备注)
|
|
||||||
create_user int8 NULL, -- 创建人ID
|
|
||||||
create_dept int8 NULL, -- 创建部门ID
|
|
||||||
create_time timestamp(6) NULL, -- 创建时间
|
|
||||||
update_user int8 NULL, -- 修改人ID
|
|
||||||
update_time timestamp(6) NULL, -- 修改时间
|
|
||||||
status int4 NULL DEFAULT 1, -- 状态:0=下架,1=上架
|
|
||||||
is_deleted int4 DEFAULT 0 NULL -- 是否已删除:0=未删除,1=已删除
|
|
||||||
);
|
|
||||||
|
|
||||||
-- 表注释
|
|
||||||
COMMENT ON TABLE tour_order_detail IS '订单详情扩展表';
|
|
||||||
|
|
||||||
-- 字段注释
|
|
||||||
COMMENT ON COLUMN tour_order_detail.id IS '主键ID';
|
|
||||||
COMMENT ON COLUMN tour_order_detail.order_id IS '关联订单ID';
|
|
||||||
COMMENT ON COLUMN tour_order_detail.user_id IS '下单用户ID';
|
|
||||||
COMMENT ON COLUMN tour_order_detail.traveler_detail IS '出行人信息快照 (JSONB数组)';
|
|
||||||
COMMENT ON COLUMN tour_order_detail.product_snapshot IS '产品信息快照 (JSONB数组)';
|
|
||||||
COMMENT ON COLUMN tour_order_detail.contract_url IS '电子合同地址或编号';
|
|
||||||
COMMENT ON COLUMN tour_order_detail.contract_status IS '合同签署状态:0=未签署,1=已签署,2=已过期';
|
|
||||||
COMMENT ON COLUMN tour_order_detail.guide_name IS '导游姓名';
|
|
||||||
COMMENT ON COLUMN tour_order_detail.guide_phone IS '导游联系电话';
|
|
||||||
COMMENT ON COLUMN tour_order_detail.start_date IS '出行日期';
|
|
||||||
COMMENT ON COLUMN tour_order_detail.end_date IS '预计返回日期';
|
|
||||||
COMMENT ON COLUMN tour_order_detail.remark IS '备注信息';
|
|
||||||
COMMENT ON COLUMN tour_order_detail.create_user IS '创建人ID';
|
|
||||||
COMMENT ON COLUMN tour_order_detail.create_dept IS '创建部门ID';
|
|
||||||
COMMENT ON COLUMN tour_order_detail.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN tour_order_detail.update_user IS '修改人ID';
|
|
||||||
COMMENT ON COLUMN tour_order_detail.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN tour_order_detail.status IS '数据状态:0=无效,1=有效';
|
|
||||||
COMMENT ON COLUMN tour_order_detail.is_deleted IS '是否已删除:0=未删除,1=已删除';
|
|
||||||
|
|
||||||
-- 索引优化
|
|
||||||
-- 1. 关联订单查询 (最常用)
|
|
||||||
CREATE INDEX idx_tod_order_id ON tour_order_detail (order_id);
|
|
||||||
|
|
||||||
-- 2. 用户查询我的订单详情
|
|
||||||
CREATE INDEX idx_tod_user_id ON tour_order_detail (user_id);
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS common_tour_info;
|
|
||||||
CREATE TABLE common_tour_info
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- 主键ID
|
|
||||||
user_id int8 NOT NULL, -- 关联系统用户ID
|
|
||||||
id_card_no varchar(20) DEFAULT NULL, -- 身份证号
|
|
||||||
passport_no varchar(30) DEFAULT NULL, -- 护照号码
|
|
||||||
hk_macau_pass_no varchar(20) DEFAULT NULL, -- 港澳通行证号码
|
|
||||||
user_name varchar(50) NOT NULL, -- 姓名
|
|
||||||
gender int4 DEFAULT NULL,
|
|
||||||
contact_phone varchar(20) DEFAULT NULL, -- 本人手机号
|
|
||||||
traveler_type int4 DEFAULT 1, -- 默认人员类型:1=成人,2=儿童,3=老人 (系统可根据生日自动算,但允许用户手动修正)
|
|
||||||
remark varchar(255) DEFAULT NULL, -- 备注 (如:晕车、素食、靠窗座位等偏好)
|
|
||||||
create_user int8 NULL, -- 创建人ID (通常同 user_id)
|
|
||||||
create_dept int8 NULL, -- 创建部门ID (若为B2B2C模式可能需要)
|
|
||||||
create_time timestamp(6) NULL, -- 创建时间
|
|
||||||
update_user int8 NULL, -- 修改人ID
|
|
||||||
update_time timestamp(6) NULL, -- 修改时间
|
|
||||||
status int4 NULL DEFAULT 1,
|
|
||||||
is_deleted int4 NOT NULL DEFAULT 0 -- 逻辑删除:0=未删除,1=已删除
|
|
||||||
);
|
|
||||||
|
|
||||||
-- 表注释
|
|
||||||
COMMENT ON TABLE common_tour_info IS '基础出行人档案表';
|
|
||||||
COMMENT ON COLUMN common_tour_info.id IS '主键ID';
|
|
||||||
COMMENT ON COLUMN common_tour_info.user_id IS '关联系统用户ID (所属人)';
|
|
||||||
COMMENT ON COLUMN common_tour_info.id_card_no IS '身份证号';
|
|
||||||
COMMENT ON COLUMN common_tour_info.passport_no IS '护照号码';
|
|
||||||
COMMENT ON COLUMN common_tour_info.hk_macau_pass_no IS '港澳通行证号码';
|
|
||||||
COMMENT ON COLUMN common_tour_info.user_name IS '姓名';
|
|
||||||
COMMENT ON COLUMN common_tour_info.gender IS '性别:1=男,2=女';
|
|
||||||
COMMENT ON COLUMN common_tour_info.contact_phone IS '本人手机号';
|
|
||||||
COMMENT ON COLUMN common_tour_info.traveler_type IS '默认人员类型:1=成人,2=儿童,3=老人';
|
|
||||||
COMMENT ON COLUMN common_tour_info.remark IS '备注偏好';
|
|
||||||
COMMENT ON COLUMN common_tour_info.create_user IS '创建人ID';
|
|
||||||
COMMENT ON COLUMN common_tour_info.create_dept IS '创建部门ID';
|
|
||||||
COMMENT ON COLUMN common_tour_info.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN common_tour_info.update_user IS '修改人ID';
|
|
||||||
COMMENT ON COLUMN common_tour_info.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN common_tour_info.is_deleted IS '是否已删除:0=未删除,1=已删除';
|
|
||||||
|
|
||||||
|
|
||||||
CREATE INDEX idx_tup_uid ON common_tour_info (user_id);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------- 商品分类 (自营商品 , 生态产品) ---------------------------------------------
|
|
||||||
INSERT INTO mall_category (id, category_name, image_url, pid, level, sort, is_deleted, create_time, create_user, update_time, update_user, status, create_dept) VALUES (2033413707249164290, '自营商品', '', null, 1, 0, 0, '2026-03-16 13:23:01.460000', 1123598821738675201, '2026-03-16 13:23:01.460000', 1123598821738675201, 1, 1123598813738675201);
|
|
||||||
INSERT INTO mall_category (id, category_name, image_url, pid, level, sort, is_deleted, create_time, create_user, update_time, update_user, status, create_dept) VALUES (2033413760969809921, '生态产品', '', null, 1, 0, 0, '2026-03-16 13:23:14.280000', 1123598821738675201, '2026-03-16 13:23:14.280000', 1123598821738675201, 1, 1123598813738675201);
|
|
||||||
|
|
||||||
--------------------------------------------- 系统参数 -app支付宝aesKey ---------------------------------------------
|
|
||||||
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 (2037772595062923266, 'app支付宝aesKey', 'yichuyilu.app.ali.aes.key', 'VS14+f0md0HjJ1D0Wp3Lgw==', 'app支付宝aesKey', null, null, '2026-03-28 14:03:41.282000', null, '2026-03-28 14:03:41.282000', 1, 0);
|
|
||||||
|
|
||||||
--------------------------------------------- 后台菜单 ---------------------------------------------
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2033415593821937665, 1123598815738675201, 'ecosystemProduct', '生态产品', 'menu', '/mall/ecosystemProduct', 'iconfont iconicon_addressbook', 11, 1, -1, 1, '', '', 0);
|
|
||||||
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2033749606692487170, 1123598815738675201, 'merchantFlagshipStore', '商家旗舰店信息', 'menu', '/common/merchantFlagshipStore', 'iconfont iconicon_message', 13, 1, 0, 1, '', '', 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120179162013698', '2033749606692487170', 'merchantFlagshipStore_add', '新增', 'add', '/common/merchantFlagshipStore/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120179162013699', '2033749606692487170', 'merchantFlagshipStore_edit', '修改', 'edit', '/common/merchantFlagshipStore/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120179162013700', '2033749606692487170', 'merchantFlagshipStore_delete', '删除', 'delete', '/api/common/merchant-store/merchantFlagshipStore/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120179162013701', '2033749606692487170', 'merchantFlagshipStore_view', '查看', 'view', '/common/merchantFlagshipStore/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2033749607145472001, 1123598815738675201, 'culturalTourismSpot', '文旅景点信息', 'menu', '/common/culturalTourismSpot', 'iconfont iconicon_message', 14, 1, 0, 1, '', '', 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120179677913091', '2033749607145472001', 'culturalTourismSpot_add', '新增', 'add', '/common/culturalTourismSpot/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120179677913092', '2033749607145472001', 'culturalTourismSpot_edit', '修改', 'edit', '/common/culturalTourismSpot/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120179677913093', '2033749607145472001', 'culturalTourismSpot_delete', '删除', 'delete', '/api/common/tourism-spot/culturalTourismSpot/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120179677913094', '2033749607145472001', 'culturalTourismSpot_view', '查看', 'view', '/common/culturalTourismSpot/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2033749607535542273, 1123598815738675201, 'newsCategory', '资讯分类', 'menu', '/common/newsCategory', 'iconfont iconicon_message', 15, 1, 0, 1, '', '', 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120180067983362', '2033749607535542273', 'newsCategory_add', '新增', 'add', '/common/newsCategory/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120180067983363', '2033749607535542273', 'newsCategory_edit', '修改', 'edit', '/common/newsCategory/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120180067983364', '2033749607535542273', 'newsCategory_delete', '删除', 'delete', '/api/common/news-category/newsCategory/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120180067983365', '2033749607535542273', 'newsCategory_view', '查看', 'view', '/common/newsCategory/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2033749607929806849, 1123598815738675201, 'newsContent', '资讯内容', 'menu', '/common/newsContent', 'iconfont iconicon_message', 15, 1, 0, 1, '', '', 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120180458053634', '2033749607929806849', 'newsContent_add', '新增', 'add', '/common/newsContent/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120180458053635', '2033749607929806849', 'newsContent_edit', '修改', 'edit', '/common/newsContent/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120180458053636', '2033749607929806849', 'newsContent_delete', '删除', 'delete', '/api/common/news-content/newsContent/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120180458053637', '2033749607929806849', 'newsContent_view', '查看', 'view', '/common/newsContent/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2034868678830284801, 1123598815738675201, 'tourProduct', '旅游团产品', 'menu', '/common/tourProduct', 'iconfont iconicon_addressbook', 16, 1, 0, 1, '', '', 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120180839735298', '2034868678830284801', 'tourProduct_add', '新增', 'add', '/common/tourProduct/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120180839735299', '2034868678830284801', 'tourProduct_edit', '修改', 'edit', '/common/tourProduct/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120180839735300', '2034868678830284801', 'tourProduct_delete', '删除', 'delete', '/api/common/tour-product/tourProduct/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120180839735301', '2034868678830284801', 'tourProduct_view', '查看', 'view', '/common/tourProduct/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2034920957235105793, 1123598815738675201, 'commonTourProductOrder', '旅游团订单', 'menu', '/common/commonTourProductOrder', 'iconfont iconicon_addressbook', 17, 1, null, 1, null, '', 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2037361283308748801, 1123598815738675201, 'commonEcoOrder', '生态产品订单', 'menu', '/common/commonEcoOrder', 'iconfont iconicon_message', 12, 1, -1, 1, '', '', 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2037414831325212674, 0, 'upgrade', '动态升级', 'upgrade', '/upgrade', 'iconfont iconicon_message', 16, 1, null, 1, null, '', 0);
|
|
||||||
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2037416131144216577, 2037414831325212674, 'marketUpgradeConfig', '用户升级配置', 'menu', '/market/marketUpgradeConfig', null, 1, 1, 0, 1, null, null, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120182441959427', '2037416131144216577', 'marketUpgradeConfig_add', '新增', 'add', '/market/marketUpgradeConfig/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120182441959428', '2037416131144216577', 'marketUpgradeConfig_edit', '修改', 'edit', '/market/marketUpgradeConfig/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120182441959429', '2037416131144216577', 'marketUpgradeConfig_delete', '删除', 'delete', '/api/market/upgrade-config/marketUpgradeConfig/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)VALUES ('2038120182441959430', '2037416131144216577', 'marketUpgradeConfig_view', '查看', 'view', '/market/marketUpgradeConfig/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2037416131601395714, 2037414831325212674, 'marketUpgradeCashLog', '用户现金升级日志', 'menu', '/market/marketUpgradeCashLog', null, 2, 1, 0, 1, null, null, 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2037416131991465985, 2037414831325212674, 'marketUpgradeWelfareLog', '用户福利包升级日志', 'menu', '/market/marketUpgradeWelfareLog', null, 3, 1, 0, 1, null, null, 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2037416132381536257, 2037414831325212674, 'marketCashPerformanceLog', '现金业绩日志', 'menu', '/market/marketCashPerformanceLog', null, 4, 1, 0, 1, null, null, 0);
|
|
||||||
INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2037416132771606529, 2037414831325212674, 'marketWelfarePerformanceLog', '福利包业绩日志', 'menu', '/market/marketWelfarePerformanceLog', null, 5, 1, 0, 1, null, null, 0);
|
|
||||||
|
|
||||||
@@ -1,129 +0,0 @@
|
|||||||
DROP TABLE IF EXISTS release_version CASCADE;
|
|
||||||
CREATE TABLE release_version
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- 主键ID
|
|
||||||
version_code int8 NULL, -- 内部版本号 (如: 10023)
|
|
||||||
version_name varchar(50) NOT NULL, -- 版本显示名称 (如: 1.2.3)
|
|
||||||
app_type int4 NOT NULL, -- 应用类型: 1-app, 2-market
|
|
||||||
channel_code varchar(20) NOT NULL, -- 渠道标识: xiaomi, huawei, honor, oppo, vivo, apple, qihoo, yingyongbao, pgyer, official
|
|
||||||
package_type int4 NOT NULL, -- 包类型: 1-应用市场包(含跳转链接), 2-OSS直连包(兜底)
|
|
||||||
is_force_update int4 NOT NULL, -- 是否强制更新: 0-否, 1-是
|
|
||||||
download_url varchar(255) NULL, -- 下载地址 (市场包通常为 schema 链接, OSS包为 http 链接)
|
|
||||||
update_content text NOT NULL, -- 更新日志内容
|
|
||||||
privacy_agreement_url varchar(255) NULL, -- 隐私协议地址
|
|
||||||
user_agreement_url varchar(255) NULL, -- 用户协议地址
|
|
||||||
create_user int8 NULL, -- 创建人ID
|
|
||||||
create_dept int8 NULL, -- 创建部门ID
|
|
||||||
create_time timestamp(6) NULL, -- 创建时间
|
|
||||||
update_user int8 NULL, -- 更新人ID
|
|
||||||
update_time timestamp(6) NULL, -- 更新时间
|
|
||||||
status int4 NULL, -- 上架状态: 1-启用, 2-已上架, 3-已过期
|
|
||||||
is_deleted int4 DEFAULT 0 -- 逻辑删除标识
|
|
||||||
);
|
|
||||||
|
|
||||||
-- 索引顺序:app_type -> channel_code -> status -> version_code (降序)
|
|
||||||
CREATE INDEX idx_app_channel_version ON release_version (app_type, channel_code, status, version_name DESC);
|
|
||||||
|
|
||||||
-- 后台管理系统页面索引
|
|
||||||
CREATE INDEX CONCURRENTLY idx_release_version_active_semver
|
|
||||||
ON release_version (
|
|
||||||
(string_to_array(version_name, '.')::int[]) DESC,
|
|
||||||
app_type,
|
|
||||||
id DESC
|
|
||||||
)
|
|
||||||
WHERE is_deleted = 0
|
|
||||||
AND version_name ~ '^\d+\.\d+\.\d+$';
|
|
||||||
|
|
||||||
-- 添加表注释
|
|
||||||
COMMENT ON TABLE release_version IS 'APP版本发布管理表';
|
|
||||||
|
|
||||||
-- 添加字段注释 (双注释)
|
|
||||||
COMMENT ON COLUMN release_version.id IS '主键ID';
|
|
||||||
COMMENT ON COLUMN release_version.version_code IS '内部版本号 (如: 10023)';
|
|
||||||
COMMENT ON COLUMN release_version.version_name IS '版本显示名称 (如: 1.2.3)';
|
|
||||||
COMMENT ON COLUMN release_version.app_type IS '应用类型: 1-app, 2-market';
|
|
||||||
COMMENT ON COLUMN release_version.channel_code IS '渠道标识: xiaomi, huawei, honor, oppo, vivo, apple, qihoo, yingyongbao, pgyer, official';
|
|
||||||
COMMENT ON COLUMN release_version.package_type IS '包类型: 1-应用市场包(含跳转链接), 2-OSS直连包(兜底)';
|
|
||||||
COMMENT ON COLUMN release_version.is_force_update IS '是否强制更新: 0-否, 1-是';
|
|
||||||
COMMENT ON COLUMN release_version.download_url IS '下载地址 (市场包通常为 schema 链接, OSS包为 http 链接)';
|
|
||||||
COMMENT ON COLUMN release_version.update_content IS '更新日志内容';
|
|
||||||
COMMENT ON COLUMN release_version.privacy_agreement_url IS '隐私协议地址';
|
|
||||||
COMMENT ON COLUMN release_version.user_agreement_url IS '用户协议地址';
|
|
||||||
COMMENT ON COLUMN release_version.create_user IS '创建人ID';
|
|
||||||
COMMENT ON COLUMN release_version.create_dept IS '创建部门ID';
|
|
||||||
COMMENT ON COLUMN release_version.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN release_version.update_user IS '更新人ID';
|
|
||||||
COMMENT ON COLUMN release_version.update_time IS '更新时间';
|
|
||||||
COMMENT ON COLUMN release_version.status IS '上架状态: 1-启用, 2-已上架, 3-已过期';
|
|
||||||
COMMENT ON COLUMN release_version.is_deleted IS '逻辑删除标识';
|
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------- 后台菜单 ----------------------------------------------------
|
|
||||||
INSERT INTO public.blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open,
|
|
||||||
component, remark, is_deleted)
|
|
||||||
VALUES (2039320381549809665, 1123598815738675201, 'commonReleaseversion', 'APP版本发布管理', 'menu',
|
|
||||||
'/common/commonReleaseversion', null, 18, 1, 0, 1, null, null, 0);
|
|
||||||
INSERT INTO public.blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open,
|
|
||||||
component, remark, is_deleted)
|
|
||||||
VALUES (2039320381549809666, 2039320381549809665, 'commonReleaseversion_add', '新增', 'add',
|
|
||||||
'/common/commonReleaseversion/add', 'plus', 1, 2, 1, 1, null, null, 0);
|
|
||||||
INSERT INTO public.blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open,
|
|
||||||
component, remark, is_deleted)
|
|
||||||
VALUES (2039320381549809667, 2039320381549809665, 'commonReleaseversion_edit', '修改', 'edit',
|
|
||||||
'/common/commonReleaseversion/edit', 'form', 2, 2, 2, 1, null, null, 0);
|
|
||||||
INSERT INTO public.blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open,
|
|
||||||
component, remark, is_deleted)
|
|
||||||
VALUES (2039320381549809668, 2039320381549809665, 'commonReleaseversion_delete', '删除', 'delete',
|
|
||||||
'/api/common/release-version/remove', 'delete', 3, 2, 3, 1, null, null, 0);
|
|
||||||
INSERT INTO public.blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open,
|
|
||||||
component, remark, is_deleted)
|
|
||||||
VALUES (2039320381549809669, 2039320381549809665, 'commonReleaseversion_view', '查看', 'view',
|
|
||||||
'/common/commonReleaseversion/view', 'file-text', 4, 2, 2, 1, null, null, 0);
|
|
||||||
|
|
||||||
---------------------------------------------------- 后台配置字典 ----------------------------------------------------
|
|
||||||
INSERT INTO public.blade_dict (id, parent_id, code, dict_key, dict_value, sort, remark, is_sealed, status, is_deleted)
|
|
||||||
VALUES (2039323244292325377, 0, 'release_version_app_type', '-1', 'app版本控制应用类型', 36, '', 0, 1, 0);
|
|
||||||
INSERT INTO public.blade_dict (id, parent_id, code, dict_key, dict_value, sort, remark, is_sealed, status, is_deleted)
|
|
||||||
VALUES (2039323352345985025, 2039323244292325377, 'release_version_app_type', '1', 'app', 1, '', 0, 1, 0);
|
|
||||||
INSERT INTO public.blade_dict (id, parent_id, code, dict_key, dict_value, sort, remark, is_sealed, status, is_deleted)
|
|
||||||
VALUES (2039323392959430658, 2039323244292325377, 'release_version_app_type', '2', 'market', 2, '', 0, 1, 0);
|
|
||||||
INSERT INTO public.blade_dict (id, parent_id, code, dict_key, dict_value, sort, remark, is_sealed, status, is_deleted)
|
|
||||||
VALUES (2039323732928741377, 0, 'release_version_channel_code', '-1', 'app版本控制渠道标识', 37, '', 0, 1, 0);
|
|
||||||
INSERT INTO public.blade_dict (id, parent_id, code, dict_key, dict_value, sort, remark, is_sealed, status, is_deleted)
|
|
||||||
VALUES (2039323787798626306, 2039323732928741377, 'release_version_channel_code', 'xiaomi', '小米', 1, '', 0, 1, 0);
|
|
||||||
INSERT INTO public.blade_dict (id, parent_id, code, dict_key, dict_value, sort, remark, is_sealed, status, is_deleted)
|
|
||||||
VALUES (2039323843163439106, 2039323732928741377, 'release_version_channel_code', 'huawei', '华为', 2, '', 0, 1, 0);
|
|
||||||
INSERT INTO public.blade_dict (id, parent_id, code, dict_key, dict_value, sort, remark, is_sealed, status, is_deleted)
|
|
||||||
VALUES (2039323945001140225, 2039323732928741377, 'release_version_channel_code', 'honor', '荣耀', 3, '', 0, 1, 0);
|
|
||||||
INSERT INTO public.blade_dict (id, parent_id, code, dict_key, dict_value, sort, remark, is_sealed, status, is_deleted)
|
|
||||||
VALUES (2039323976445837313, 2039323732928741377, 'release_version_channel_code', 'oppo', 'oppo', 4, '', 0, 1, 0);
|
|
||||||
INSERT INTO public.blade_dict (id, parent_id, code, dict_key, dict_value, sort, remark, is_sealed, status, is_deleted)
|
|
||||||
VALUES (2039324008939110402, 2039323732928741377, 'release_version_channel_code', 'vivo', 'vivo', 5, '', 0, 1, 0);
|
|
||||||
INSERT INTO public.blade_dict (id, parent_id, code, dict_key, dict_value, sort, remark, is_sealed, status, is_deleted)
|
|
||||||
VALUES (2039324063599280129, 2039323732928741377, 'release_version_channel_code', 'apple', '苹果', 6, '', 0, 1, 0);
|
|
||||||
INSERT INTO public.blade_dict (id, parent_id, code, dict_key, dict_value, sort, remark, is_sealed, status, is_deleted)
|
|
||||||
VALUES (2039324159019696129, 2039323732928741377, 'release_version_channel_code', 'qihoo', '360手机助手', 7, '', 0, 1,
|
|
||||||
0);
|
|
||||||
INSERT INTO public.blade_dict (id, parent_id, code, dict_key, dict_value, sort, remark, is_sealed, status, is_deleted)
|
|
||||||
VALUES (2039324367988310017, 2039323732928741377, 'release_version_channel_code', 'yingyongbao', '应用宝', 8, '', 0, 1,
|
|
||||||
0);
|
|
||||||
INSERT INTO public.blade_dict (id, parent_id, code, dict_key, dict_value, sort, remark, is_sealed, status, is_deleted)
|
|
||||||
VALUES (2039324445138337793, 2039323732928741377, 'release_version_channel_code', 'pgyer', '蒲公英', 9, '', 0, 1, 0);
|
|
||||||
INSERT INTO public.blade_dict (id, parent_id, code, dict_key, dict_value, sort, remark, is_sealed, status, is_deleted)
|
|
||||||
VALUES (2039324932638097409, 2039323732928741377, 'release_version_channel_code', 'official', 'OSS/官网', 10, '', 0, 1,
|
|
||||||
0);
|
|
||||||
INSERT INTO public.blade_dict (id, parent_id, code, dict_key, dict_value, sort, remark, is_sealed, status, is_deleted)
|
|
||||||
VALUES (2039325301409693698, 0, 'release_version_pack_type', '-1', 'app版本控制包类型', 38, '', 0, 1, 0);
|
|
||||||
INSERT INTO public.blade_dict (id, parent_id, code, dict_key, dict_value, sort, remark, is_sealed, status, is_deleted)
|
|
||||||
VALUES (2039325347425402882, 2039325301409693698, 'release_version_pack_type', '1', '应用市场包', 1, '', 0, 1, 0);
|
|
||||||
INSERT INTO public.blade_dict (id, parent_id, code, dict_key, dict_value, sort, remark, is_sealed, status, is_deleted)
|
|
||||||
VALUES (2039325387288068097, 2039325301409693698, 'release_version_pack_type', '2', 'OSS直连包', 2, '', 0, 1, 0);
|
|
||||||
|
|
||||||
INSERT INTO public.blade_dict ("id","parent_id","code","dict_key","dict_value","sort","remark","is_sealed","status","is_deleted")
|
|
||||||
VALUES (2040296637950734337,2040296304709087233,'release_version_status','3','已过期',3,'',0,1,0);
|
|
||||||
INSERT INTO public.blade_dict ("id","parent_id","code","dict_key","dict_value","sort","remark","is_sealed","status","is_deleted")
|
|
||||||
VALUES (2040296582749499393,2040296304709087233,'release_version_status','2','已上架',2,'',0,1,0);
|
|
||||||
INSERT INTO public.blade_dict ("id","parent_id","code","dict_key","dict_value","sort","remark","is_sealed","status","is_deleted")
|
|
||||||
VALUES (2040296549660635138,2040296304709087233,'release_version_status','1','已启用',1,'',0,1,0);
|
|
||||||
INSERT INTO public.blade_dict ("id","parent_id","code","dict_key","dict_value","sort","remark","is_sealed","status","is_deleted")
|
|
||||||
VALUES (2040296304709087233,0,'release_version_status','-1','app版本控制上架状态',39,'',0,1,0);
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
CREATE INDEX idx_user_order_tptt ON user_order (order_type, payment_type, create_time);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS market_performance_day_log;
|
|
||||||
CREATE TABLE market_performance_day_log
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- 主键ID
|
|
||||||
user_id int8 NOT NULL, -- 用户ID
|
|
||||||
stats_day int4 NOT NULL, -- 统计时间(按天统计)
|
|
||||||
stats_month int4 NOT NULL, -- 统计时间(按月统计)
|
|
||||||
owen_sales decimal(14, 2) default 0, -- 昨日个人消费业绩
|
|
||||||
sales_amount decimal(14, 2) default 0, -- 昨日团队消费业绩
|
|
||||||
owen_benefits decimal(14, 2) default 0, -- 昨日个人福利值业绩
|
|
||||||
benefits_value decimal(14, 2) default 0, -- 昨日团队福利值业绩
|
|
||||||
team_number int4 default 0, -- 昨日团队新增人数
|
|
||||||
benefits_pack int4 default 0, -- 昨日团队兑换福利包数量
|
|
||||||
remarks text, -- 备注
|
|
||||||
create_user int8, -- 创建人
|
|
||||||
create_dept int8, -- 创建部门
|
|
||||||
create_time timestamp(6), -- 创建时间
|
|
||||||
update_user int8, -- 修改人
|
|
||||||
update_time timestamp(6), -- 修改时间
|
|
||||||
status int4, -- 状态
|
|
||||||
is_deleted int4 DEFAULT 0 -- 是否已删除
|
|
||||||
|
|
||||||
);
|
|
||||||
CREATE INDEX idx_mpddl_day_user ON market_performance_day_log (stats_day, user_id);
|
|
||||||
CREATE INDEX idx_mpddl_user_recent ON market_performance_day_log (user_id, stats_day DESC);
|
|
||||||
|
|
||||||
COMMENT ON TABLE market_performance_day_log IS '用户团队业绩统计表';
|
|
||||||
COMMENT ON COLUMN market_performance_day_log.id IS '主键ID';
|
|
||||||
COMMENT ON COLUMN market_performance_day_log.user_id IS '用户ID';
|
|
||||||
COMMENT ON COLUMN market_performance_day_log.stats_day IS '统计时间(按天统计)';
|
|
||||||
COMMENT ON COLUMN market_performance_day_log.stats_month IS '统计时间(按月统计)';
|
|
||||||
COMMENT ON COLUMN market_performance_day_log.owen_sales IS '昨日个人消费业绩';
|
|
||||||
COMMENT ON COLUMN market_performance_day_log.sales_amount IS '昨日团队消费业绩';
|
|
||||||
COMMENT ON COLUMN market_performance_day_log.owen_benefits IS '昨日个人福利值业绩';
|
|
||||||
COMMENT ON COLUMN market_performance_day_log.benefits_value IS '昨日团队福利值业绩';
|
|
||||||
COMMENT ON COLUMN market_performance_day_log.team_number IS '昨日团队新增人数';
|
|
||||||
COMMENT ON COLUMN market_performance_day_log.benefits_pack IS '昨日团队兑换福利包数量';
|
|
||||||
COMMENT ON COLUMN market_performance_day_log.remarks IS '备注';
|
|
||||||
COMMENT ON COLUMN market_performance_day_log.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN market_performance_day_log.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN market_performance_day_log.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN market_performance_day_log.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN market_performance_day_log.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN market_performance_day_log.status IS '状态';
|
|
||||||
COMMENT ON COLUMN market_performance_day_log.is_deleted IS '是否已删除';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS market_team;
|
|
||||||
CREATE TABLE market_team
|
|
||||||
(
|
|
||||||
id int8 NOT NULL PRIMARY KEY, -- 主键ID
|
|
||||||
user_id int8 NOT NULL, -- 用户ID
|
|
||||||
sales_total decimal(14, 2) default 0, -- 团队消费总业绩
|
|
||||||
benefits_total decimal(14, 2) default 0, -- 团队福利值总业绩
|
|
||||||
team_total int4 default 0, -- 团队总数
|
|
||||||
remarks text, -- 备注
|
|
||||||
create_user int8, -- 创建人
|
|
||||||
create_dept int8, -- 创建部门
|
|
||||||
create_time timestamp(6), -- 创建时间
|
|
||||||
update_user int8, -- 修改人
|
|
||||||
update_time timestamp(6), -- 修改时间
|
|
||||||
status int4, -- 状态
|
|
||||||
is_deleted int4 DEFAULT 0 -- 是否已删除
|
|
||||||
|
|
||||||
);
|
|
||||||
CREATE INDEX idx_team_user ON market_team (user_id);
|
|
||||||
|
|
||||||
COMMENT ON TABLE market_team IS '用户团队数据';
|
|
||||||
COMMENT ON COLUMN market_team.id IS '主键ID';
|
|
||||||
COMMENT ON COLUMN market_team.user_id IS '用户ID';
|
|
||||||
COMMENT ON COLUMN market_team.sales_total IS '团队消费总业绩';
|
|
||||||
COMMENT ON COLUMN market_team.benefits_total IS '团队福利值总业绩';
|
|
||||||
COMMENT ON COLUMN market_team.team_total IS '团队总数';
|
|
||||||
COMMENT ON COLUMN market_team.remarks IS '备注';
|
|
||||||
COMMENT ON COLUMN market_team.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN market_team.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN market_team.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN market_team.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN market_team.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN market_team.status IS '状态';
|
|
||||||
COMMENT ON COLUMN market_team.is_deleted IS '是否已删除';
|
|
||||||
@@ -1,108 +0,0 @@
|
|||||||
-- 新增 user_hierarchy
|
|
||||||
drop table if exists user_hierarchy;
|
|
||||||
CREATE TABLE user_hierarchy
|
|
||||||
(
|
|
||||||
id int8 PRIMARY KEY,
|
|
||||||
pid int8 NULL,
|
|
||||||
root_id int8 NULL,
|
|
||||||
level int4 NOT NULL,
|
|
||||||
ancestors int8[] NOT NULL DEFAULT '{}'::int8[],
|
|
||||||
remarks text, -- 备注
|
|
||||||
create_user int8, -- 创建人
|
|
||||||
create_dept int8, -- 创建部门
|
|
||||||
create_time timestamp(6), -- 创建时间
|
|
||||||
update_user int8, -- 修改人
|
|
||||||
update_time timestamp(6), -- 修改时间
|
|
||||||
status int4, -- 状态
|
|
||||||
is_deleted int4 DEFAULT 0 -- 是否已删除
|
|
||||||
);
|
|
||||||
CREATE INDEX idx_ancestors_gin ON user_hierarchy USING GIN (ancestors);
|
|
||||||
|
|
||||||
comment on table user_hierarchy is '用户层级表';
|
|
||||||
|
|
||||||
COMMENT ON COLUMN user_hierarchy.id IS '主键ID';
|
|
||||||
COMMENT ON COLUMN user_hierarchy.pid IS 'pid';
|
|
||||||
COMMENT ON COLUMN user_hierarchy.root_id IS '根节点id';
|
|
||||||
COMMENT ON COLUMN user_hierarchy.level IS '用户层级';
|
|
||||||
COMMENT ON COLUMN user_hierarchy.ancestors IS '族谱父级ID数组(存储从根节点到父级的完整路径)';
|
|
||||||
COMMENT ON COLUMN user_hierarchy.remarks IS '备注';
|
|
||||||
COMMENT ON COLUMN user_hierarchy.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN user_hierarchy.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN user_hierarchy.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN user_hierarchy.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN user_hierarchy.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN user_hierarchy.status IS '状态';
|
|
||||||
COMMENT ON COLUMN user_hierarchy.is_deleted IS '是否已删除';
|
|
||||||
|
|
||||||
|
|
||||||
-- 修改 user_market_info
|
|
||||||
alter table public.user_market_info
|
|
||||||
add gender varchar(10);
|
|
||||||
comment on column public.user_market_info.gender is '性别';
|
|
||||||
alter table public.user_market_info
|
|
||||||
add birthday varchar(10);
|
|
||||||
comment on column public.user_market_info.birthday is '生日';
|
|
||||||
alter table public.user_market_info
|
|
||||||
add address varchar(255);
|
|
||||||
comment on column public.user_market_info.address is '地址';
|
|
||||||
|
|
||||||
|
|
||||||
-- 新增用户银行卡
|
|
||||||
drop table if exists user_bank_card;
|
|
||||||
CREATE TABLE user_bank_card
|
|
||||||
(
|
|
||||||
id int8 PRIMARY KEY,
|
|
||||||
user_id int8 NOT NULL,
|
|
||||||
card_number VARCHAR(32) NOT NULL, -- 支持最长卡号(如 19 位 + 冗余)
|
|
||||||
bank VARCHAR(100), -- 银行名称,如 "中国工商银行"
|
|
||||||
province VARCHAR(50), -- 省份
|
|
||||||
city VARCHAR(50), -- 城市
|
|
||||||
card_name VARCHAR(100), -- 卡类型名称,如 "牡丹信用卡"
|
|
||||||
tel VARCHAR(20), -- 客服电话
|
|
||||||
type VARCHAR(50), -- 卡类型(借记卡/信用卡等)
|
|
||||||
logo TEXT, -- 银行 Logo URL
|
|
||||||
abbreviation VARCHAR(20), -- 银行缩写,如 "ICBC"
|
|
||||||
card_bin VARCHAR(10), -- 卡 BIN(前6位)
|
|
||||||
bin_digits int4, -- BIN 位数(通常为6)
|
|
||||||
card_digits int4, -- 卡号总位数(如16、19)
|
|
||||||
is_luhn int4 DEFAULT 0, -- 是否通过 Luhn 校验(注意字段名用下划线)
|
|
||||||
weburl TEXT, -- 银行官网 URL
|
|
||||||
is_default int4 NOT NULL DEFAULT 0, -- ★ 默认银行卡标识
|
|
||||||
create_user int8, -- 创建人
|
|
||||||
create_dept int8, -- 创建部门
|
|
||||||
create_time timestamp(6), -- 创建时间
|
|
||||||
update_user int8, -- 修改人
|
|
||||||
update_time timestamp(6), -- 修改时间
|
|
||||||
status int4, -- 状态
|
|
||||||
is_deleted int4 DEFAULT 0 -- 是否已删除
|
|
||||||
);
|
|
||||||
CREATE INDEX idx_user_bank_card_user_id ON user_bank_card (user_id, is_deleted);
|
|
||||||
CREATE INDEX idx_user_bank_card_user_id_default ON user_bank_card (user_id, is_default, is_deleted);
|
|
||||||
CREATE INDEX idx_user_bank_card_user_id_card_number ON user_bank_card (user_id, card_number, is_deleted);
|
|
||||||
|
|
||||||
comment on table user_bank_card is '用户银行卡表';
|
|
||||||
|
|
||||||
COMMENT ON COLUMN user_bank_card.id IS '主键ID';
|
|
||||||
COMMENT ON COLUMN user_bank_card.user_id IS 'uid';
|
|
||||||
COMMENT ON COLUMN user_bank_card.card_number IS '银行卡号';
|
|
||||||
COMMENT ON COLUMN user_bank_card.bank IS '银行名称';
|
|
||||||
COMMENT ON COLUMN user_bank_card.province IS '省份';
|
|
||||||
COMMENT ON COLUMN user_bank_card.city IS '城市';
|
|
||||||
COMMENT ON COLUMN user_bank_card.card_name IS '卡类型名称';
|
|
||||||
COMMENT ON COLUMN user_bank_card.tel IS '客服电话';
|
|
||||||
COMMENT ON COLUMN user_bank_card.type IS '卡类型';
|
|
||||||
COMMENT ON COLUMN user_bank_card.logo IS '银行 Logo URL';
|
|
||||||
COMMENT ON COLUMN user_bank_card.abbreviation IS '银行缩写';
|
|
||||||
COMMENT ON COLUMN user_bank_card.card_bin IS '卡 BIN(前6位)';
|
|
||||||
COMMENT ON COLUMN user_bank_card.bin_digits IS 'BIN 位数(通常为6)';
|
|
||||||
COMMENT ON COLUMN user_bank_card.card_digits IS '卡号总位数(如16、19)';
|
|
||||||
COMMENT ON COLUMN user_bank_card.is_luhn IS '是否通过 Luhn 校验';
|
|
||||||
COMMENT ON COLUMN user_bank_card.weburl IS '银行官网 URL';
|
|
||||||
COMMENT ON COLUMN user_bank_card.is_default IS '默认银行卡标识';
|
|
||||||
COMMENT ON COLUMN user_bank_card.create_user IS '创建人';
|
|
||||||
COMMENT ON COLUMN user_bank_card.create_dept IS '创建部门';
|
|
||||||
COMMENT ON COLUMN user_bank_card.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN user_bank_card.update_user IS '修改人';
|
|
||||||
COMMENT ON COLUMN user_bank_card.update_time IS '修改时间';
|
|
||||||
COMMENT ON COLUMN user_bank_card.status IS '状态';
|
|
||||||
COMMENT ON COLUMN user_bank_card.is_deleted IS '是否已删除';
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
alter table market_cash_performance
|
|
||||||
add dividend_amount decimal(14, 2) default 0.00;
|
|
||||||
comment on column market_cash_performance.dividend_amount is '可分红业绩';
|
|
||||||
|
|
||||||
|
|
||||||
alter table market_performance_day_log
|
|
||||||
add dividend_amount decimal(14, 2) default 0.00;
|
|
||||||
comment on column market_performance_day_log.dividend_amount is '昨日可分红业绩';
|
|
||||||
|
|
||||||
alter table user_market_info
|
|
||||||
add merchant_type int4 default 0 not null;
|
|
||||||
comment on column user_market_info.merchant_type is '自营商家类型 0:未审核 1:个人商家 2:企业商家';
|
|
||||||
|
|
||||||
alter table user_market_info
|
|
||||||
add store_name varchar(255) default '' not null;
|
|
||||||
comment on column user_market_info.store_name is '店铺名称';
|
|
||||||
CREATE INDEX idx_market_info_store_name ON user_market_info (store_name) where is_deleted = 0;
|
|
||||||
|
|
||||||
drop table if exists merchant_application;
|
|
||||||
create table merchant_application
|
|
||||||
(
|
|
||||||
id int8 not null primary key,
|
|
||||||
user_id int8 not null,
|
|
||||||
user_account varchar(20) not null,
|
|
||||||
type int4 not null,
|
|
||||||
store_name varchar(255) default '' not null,
|
|
||||||
alipay_account text,
|
|
||||||
wechat_account text,
|
|
||||||
company_name varchar(100),
|
|
||||||
business_license varchar(100),
|
|
||||||
business_license_url TEXT,
|
|
||||||
legal_person varchar(50),
|
|
||||||
remark TEXT,
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4 default 1, -- 1: 待审核 -- 2: 已通过 -- 3: 已拒绝
|
|
||||||
is_deleted int4 default 0
|
|
||||||
);
|
|
||||||
CREATE INDEX idx_merchant_app_type_status ON merchant_application (type, status) where is_deleted = 0;
|
|
||||||
CREATE INDEX idx_merchant_app_user_acc ON merchant_application (user_account) where is_deleted = 0;
|
|
||||||
CREATE INDEX idx_merchant_app_user_id ON merchant_application (user_id) where is_deleted = 0;
|
|
||||||
|
|
||||||
comment on table merchant_application is '商家入驻申请表';
|
|
||||||
comment on column merchant_application.id is '主键';
|
|
||||||
comment on column merchant_application.user_id is '用户id';
|
|
||||||
comment on column merchant_application.user_account is '用户账号';
|
|
||||||
comment on column merchant_application.type is '商家类型: 0-未审核, 1-个人商家, 2-企业商家';
|
|
||||||
comment on column merchant_application.store_name is '店铺名称';
|
|
||||||
comment on column merchant_application.alipay_account is '支付宝账号';
|
|
||||||
comment on column merchant_application.wechat_account is '微信账号';
|
|
||||||
comment on column merchant_application.company_name is '公司名称(企业商家时必填)';
|
|
||||||
comment on column merchant_application.business_license is '营业执照注册号';
|
|
||||||
comment on column merchant_application.business_license_url is '营业执照图片URL';
|
|
||||||
comment on column merchant_application.legal_person is '法人姓名';
|
|
||||||
comment on column merchant_application.remark is '备注';
|
|
||||||
comment on column merchant_application.create_user is '创建人';
|
|
||||||
comment on column merchant_application.create_dept is '创建部门';
|
|
||||||
comment on column merchant_application.create_time is '创建时间';
|
|
||||||
comment on column merchant_application.update_user is '修改人';
|
|
||||||
comment on column merchant_application.update_time is '修改时间';
|
|
||||||
comment on column merchant_application.status is '状态: 1-待审核 2-已通过 3-已拒绝';
|
|
||||||
comment on column merchant_application.is_deleted is '是否已删除';
|
|
||||||
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2046772140345806850', '1123598815738675201', 'application', '商家入驻', 'menu',
|
|
||||||
'/market/marketMerchantApplication', NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2046772140345806851', '2046772140345806850', 'application_add', '新增', 'add',
|
|
||||||
'/market/marketMerchantApplication/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2046772140345806852', '2046772140345806850', 'application_edit', '修改', 'edit',
|
|
||||||
'/market/marketMerchantApplication/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2046772140345806853', '2046772140345806850', 'application_delete', '删除', 'delete',
|
|
||||||
'/api/blade-application/marketMerchantApplication/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2046772140345806854', '2046772140345806850', 'application_view', '查看', 'view',
|
|
||||||
'/market/marketMerchantApplication/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
@@ -1,212 +0,0 @@
|
|||||||
drop table if exists merchant_catalog;
|
|
||||||
create table merchant_catalog
|
|
||||||
(
|
|
||||||
id int8 not null primary key,
|
|
||||||
user_id int8 not null default -1,
|
|
||||||
user_account varchar(20) not null,
|
|
||||||
product_name varchar(255) not null default '',
|
|
||||||
type int4 not null,
|
|
||||||
main_image_urls text[] DEFAULT '{}' NOT NULL,
|
|
||||||
detail_image_urls text[] DEFAULT '{}' NULL,
|
|
||||||
thumb_image_url text NULL,
|
|
||||||
specs JSONB DEFAULT '[]',
|
|
||||||
cost_price DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
|
||||||
remark TEXT,
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4,
|
|
||||||
is_deleted int4 default 0
|
|
||||||
);
|
|
||||||
CREATE INDEX idx_merchant_catalog_type ON merchant_catalog (type) where is_deleted = 0;
|
|
||||||
CREATE INDEX idx_merchant_catalog_user_id ON merchant_catalog (user_id) where is_deleted = 0;
|
|
||||||
CREATE INDEX idx_merchant_catalog_user_id_account ON merchant_catalog (user_account) where is_deleted = 0;
|
|
||||||
|
|
||||||
comment on table merchant_catalog is '自营商家商品表';
|
|
||||||
comment on column merchant_catalog.id is '主键';
|
|
||||||
comment on column merchant_catalog.user_id is '用户id';
|
|
||||||
comment on column merchant_catalog.user_account is '用户账号';
|
|
||||||
comment on column merchant_catalog.type is '商品类型: 1-平台商品, 2-商家商品';
|
|
||||||
comment on column merchant_catalog.product_name is '商品名称';
|
|
||||||
comment on column merchant_catalog.main_image_urls is '商品主图';
|
|
||||||
comment on column merchant_catalog.detail_image_urls is '商品详情图';
|
|
||||||
comment on column merchant_catalog.thumb_image_url is '商品缩略图';
|
|
||||||
comment on column merchant_catalog.specs is '商品型号';
|
|
||||||
comment on column merchant_catalog.cost_price is '成本价(进货价, 单位为现金券)';
|
|
||||||
comment on column merchant_catalog.remark is '备注';
|
|
||||||
comment on column merchant_catalog.create_user is '创建人';
|
|
||||||
comment on column merchant_catalog.create_dept is '创建部门';
|
|
||||||
comment on column merchant_catalog.create_time is '创建时间';
|
|
||||||
comment on column merchant_catalog.update_user is '修改人';
|
|
||||||
comment on column merchant_catalog.update_time is '修改时间';
|
|
||||||
comment on column merchant_catalog.status is '状态';
|
|
||||||
comment on column merchant_catalog.is_deleted is '是否已删除';
|
|
||||||
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2047553982355394562', '1123598815738675201', 'merchantcatalog', '自营商家商品表', 'menu',
|
|
||||||
'/market/merchantCatalog', NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2047553982355394563', '2047553982355394562', 'merchantcatalog_add', '新增', 'add',
|
|
||||||
'/market/merchantCatalog/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2047553982355394564', '2047553982355394562', 'merchantcatalog_edit', '修改', 'edit',
|
|
||||||
'/market/merchantCatalog/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2047553982355394565', '2047553982355394562', 'merchantcatalog_delete', '删除', 'delete',
|
|
||||||
'/api/market/merchantCatalog/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2047553982355394566', '2047553982355394562', 'merchantcatalog_view', '查看', 'view',
|
|
||||||
'/market/merchantCatalog/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
|
|
||||||
drop table if exists merchant_product_inventory;
|
|
||||||
create table merchant_product_inventory
|
|
||||||
(
|
|
||||||
id int8 not null primary key,
|
|
||||||
user_id int8 not null default -1,
|
|
||||||
user_account varchar(20) not null,
|
|
||||||
type int4 not null,
|
|
||||||
product_name varchar(255) not null default '',
|
|
||||||
product_id int8 not null,
|
|
||||||
store_name varchar(255) not null,
|
|
||||||
thumb_image_url text NULL,
|
|
||||||
unit_price decimal(10, 2) default 0.00 not null,
|
|
||||||
gift_type int4 default 0 NOT NULL,
|
|
||||||
unit_gift_amount decimal(10, 2) default 0.00 not null,
|
|
||||||
stock int4 default 0 NOT NULL,
|
|
||||||
remark TEXT,
|
|
||||||
version int4 DEFAULT 0 NULL,
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4,
|
|
||||||
is_deleted int4 default 0
|
|
||||||
);
|
|
||||||
CREATE EXTENSION IF NOT EXISTS pg_trgm;
|
|
||||||
|
|
||||||
CREATE INDEX CONCURRENTLY idx_merch_inv_user_id_is_deleted ON merchant_product_inventory (user_id, is_deleted);
|
|
||||||
CREATE INDEX CONCURRENTLY idx_merch_inv_prodname_trgm ON merchant_product_inventory USING GIN (product_name gin_trgm_ops) WHERE status = 1 AND is_deleted = 0;
|
|
||||||
CREATE INDEX CONCURRENTLY idx_merch_inv_storename_trgm ON merchant_product_inventory USING GIN (store_name gin_trgm_ops) WHERE status = 1 AND is_deleted = 0;
|
|
||||||
|
|
||||||
comment on table merchant_product_inventory is '自营商家库存表';
|
|
||||||
comment on column merchant_product_inventory.id is '主键';
|
|
||||||
comment on column merchant_product_inventory.user_id is '用户id';
|
|
||||||
comment on column merchant_product_inventory.user_account is '用户账号';
|
|
||||||
comment on column merchant_product_inventory.type is '商品类型: 1-平台商品, 2-商家商品';
|
|
||||||
comment on column merchant_product_inventory.product_name is '商品名称';
|
|
||||||
comment on column merchant_product_inventory.product_id is '商品id';
|
|
||||||
comment on column merchant_product_inventory.store_name is '店铺名称';
|
|
||||||
comment on column merchant_product_inventory.thumb_image_url is '缩略图';
|
|
||||||
comment on column merchant_product_inventory.unit_price is '商品单价';
|
|
||||||
comment on column merchant_product_inventory.gift_type is '赠品类型 1-福利积分 2-佣金 3-现金券';
|
|
||||||
comment on column merchant_product_inventory.unit_gift_amount is '赠品数量';
|
|
||||||
comment on column merchant_product_inventory.stock is '库存数量';
|
|
||||||
comment on column merchant_product_inventory.remark is '备注';
|
|
||||||
comment on column merchant_product_inventory.create_user is '创建人';
|
|
||||||
comment on column merchant_product_inventory.create_dept is '创建部门';
|
|
||||||
comment on column merchant_product_inventory.create_time is '创建时间';
|
|
||||||
comment on column merchant_product_inventory.update_user is '修改人';
|
|
||||||
comment on column merchant_product_inventory.update_time is '修改时间';
|
|
||||||
comment on column merchant_product_inventory.status is '状态 1-上架 2-下架';
|
|
||||||
comment on column merchant_product_inventory.is_deleted is '是否已删除';
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2047553982355394567', '1123598815738675201', 'merchantinventory', '自营商家库存表', 'menu',
|
|
||||||
'/market/merchantInventory', NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2047553982355394568', '2047553982355394567', 'merchantinventory_add', '新增', 'add',
|
|
||||||
'/market/merchantInventory/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2047553982355394569', '2047553982355394567', 'merchantinventory_edit', '修改', 'edit',
|
|
||||||
'/market/merchantInventory/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2047553982355394570', '2047553982355394567', 'merchantinventory_delete', '删除', 'delete',
|
|
||||||
'/api/market/merchantInventory/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2047553982355394571', '2047553982355394567', 'merchantinventory_view', '查看', 'view',
|
|
||||||
'/market/merchantInventory/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
drop table if exists merchant_store_favorite;
|
|
||||||
create table merchant_store_favorite
|
|
||||||
(
|
|
||||||
id int8 not null primary key,
|
|
||||||
user_id int8 not null default -1,
|
|
||||||
merchant_id int8 not null default -1,
|
|
||||||
store_name varchar(255) not null default '',
|
|
||||||
remark varchar(255) not null default '',
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4,
|
|
||||||
is_deleted int4 default 0
|
|
||||||
);
|
|
||||||
create index idx_merchant_store_favorite_user_id on merchant_store_favorite (user_id) where is_deleted = 0;
|
|
||||||
create index idx_merchant_store_favorite_merchant_id on merchant_store_favorite (merchant_id) where is_deleted = 0;
|
|
||||||
|
|
||||||
comment on table merchant_store_favorite is '自营商家店铺收藏表';
|
|
||||||
comment on column merchant_store_favorite.id is '主键';
|
|
||||||
comment on column merchant_store_favorite.user_id is '用户id';
|
|
||||||
comment on column merchant_store_favorite.merchant_id is '商家id';
|
|
||||||
comment on column merchant_store_favorite.store_name is '店铺名称';
|
|
||||||
comment on column merchant_store_favorite.remark is '备注';
|
|
||||||
comment on column merchant_store_favorite.create_user is '创建人';
|
|
||||||
comment on column merchant_store_favorite.create_dept is '创建部门';
|
|
||||||
comment on column merchant_store_favorite.create_time is '创建时间';
|
|
||||||
comment on column merchant_store_favorite.update_user is '修改人';
|
|
||||||
comment on column merchant_store_favorite.update_time is '修改时间';
|
|
||||||
comment on column merchant_store_favorite.status is '状态';
|
|
||||||
comment on column merchant_store_favorite.is_deleted is '是否已删除';
|
|
||||||
|
|
||||||
drop table if exists merchant_payout_account;
|
|
||||||
create table merchant_payout_account
|
|
||||||
(
|
|
||||||
id int8 not null primary key,
|
|
||||||
user_id int8 not null default -1,
|
|
||||||
account_type int4 not null default -1,
|
|
||||||
account_number varchar(255) not null default '',
|
|
||||||
account_url text not null default '',
|
|
||||||
remark varchar(255) not null default '',
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4,
|
|
||||||
is_deleted int4 default 0
|
|
||||||
);
|
|
||||||
create index idx_merchant_payout_account_user_id on merchant_payout_account (user_id) where is_deleted = 0;
|
|
||||||
|
|
||||||
|
|
||||||
comment on table merchant_payout_account is '商家收款资料表';
|
|
||||||
comment on column merchant_payout_account.id is '主键';
|
|
||||||
comment on column merchant_payout_account.user_id is '用户id';
|
|
||||||
comment on column merchant_payout_account.account_type is '账号类型 1:支付宝 2:微信';
|
|
||||||
comment on column merchant_payout_account.account_number is '银行卡号';
|
|
||||||
comment on column merchant_payout_account.account_url is '收款码图片';
|
|
||||||
comment on column merchant_payout_account.remark is '备注';
|
|
||||||
comment on column merchant_payout_account.create_user is '创建人';
|
|
||||||
comment on column merchant_payout_account.create_dept is '创建部门';
|
|
||||||
comment on column merchant_payout_account.create_time is '创建时间';
|
|
||||||
comment on column merchant_payout_account.update_user is '修改人';
|
|
||||||
comment on column merchant_payout_account.update_time is '修改时间';
|
|
||||||
comment on column merchant_payout_account.status is '状态';
|
|
||||||
comment on column merchant_payout_account.is_deleted is '是否已删除';
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,332 +0,0 @@
|
|||||||
alter table merchant_application
|
|
||||||
drop column alipay_account;
|
|
||||||
alter table merchant_application
|
|
||||||
drop column wechat_account;
|
|
||||||
alter table merchant_catalog
|
|
||||||
drop column specs;
|
|
||||||
|
|
||||||
|
|
||||||
drop table if exists merchant_payout_account;
|
|
||||||
create table merchant_payout_account
|
|
||||||
(
|
|
||||||
id int8 not null primary key,
|
|
||||||
user_id int8 not null default -1,
|
|
||||||
account_type int4 not null default -1,
|
|
||||||
holder_name varchar(255) default '' not null,
|
|
||||||
account_number varchar(255) not null default '',
|
|
||||||
account_url text not null default '',
|
|
||||||
remark varchar(255) not null default '',
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4,
|
|
||||||
is_deleted int4 default 0
|
|
||||||
);
|
|
||||||
create index idx_merchant_payout_account_user_id on merchant_payout_account (user_id) where is_deleted = 0;
|
|
||||||
comment on table merchant_payout_account is '商家收款资料表';
|
|
||||||
comment on column merchant_payout_account.id is '主键';
|
|
||||||
comment on column merchant_payout_account.user_id is '用户id';
|
|
||||||
comment on column merchant_payout_account.account_type is '账号类型 1:支付宝 2:微信';
|
|
||||||
comment on column merchant_payout_account.holder_name is '账户所有人';
|
|
||||||
comment on column merchant_payout_account.account_number is '银行卡号';
|
|
||||||
comment on column merchant_payout_account.account_url is '收款码图片';
|
|
||||||
comment on column merchant_payout_account.remark is '备注';
|
|
||||||
comment on column merchant_payout_account.create_user is '创建人';
|
|
||||||
comment on column merchant_payout_account.create_dept is '创建部门';
|
|
||||||
comment on column merchant_payout_account.create_time is '创建时间';
|
|
||||||
comment on column merchant_payout_account.update_user is '修改人';
|
|
||||||
comment on column merchant_payout_account.update_time is '修改时间';
|
|
||||||
comment on column merchant_payout_account.status is '状态';
|
|
||||||
comment on column merchant_payout_account.is_deleted is '是否已删除';
|
|
||||||
|
|
||||||
|
|
||||||
drop table if exists market_daily_summary;
|
|
||||||
CREATE TABLE market_daily_summary
|
|
||||||
(
|
|
||||||
-- 主键(可选,用于 ORM)
|
|
||||||
id int8 not null primary key,
|
|
||||||
|
|
||||||
-- 用户基础信息
|
|
||||||
user_id int8 not null,
|
|
||||||
user_account VARCHAR(64) NOT NULL DEFAULT '',
|
|
||||||
user_name VARCHAR(128) NOT NULL DEFAULT '',
|
|
||||||
stat_date DATE NOT NULL, -- 统计日期,如 '2026-04-29'
|
|
||||||
|
|
||||||
-- ===== 个人部分 =====
|
|
||||||
-- === 直推 ===
|
|
||||||
personal_total_invite_count int4 NOT NULL DEFAULT 0, -- 个人直推人数(累计)
|
|
||||||
personal_increase_invite_count int4 NOT NULL DEFAULT 0, -- 个人当日新增直推人数
|
|
||||||
|
|
||||||
-- === 福利值相关 ===
|
|
||||||
personal_total_benefits_value decimal(18, 2) NOT NULL DEFAULT 0.00, -- 个人总福利值(持有有效福利包给予的值)
|
|
||||||
personal_current_benefits_value decimal(18, 2) NOT NULL DEFAULT 0.00, -- 个人有效总福利值(不包含划拨的福利包)
|
|
||||||
personal_increase_benefits_value decimal(18, 2) NOT NULL DEFAULT 0.00, -- 个人当日新增福利值
|
|
||||||
personal_increase_current_benefits_value decimal(18, 2) NOT NULL DEFAULT 0.00, -- 个人当日新增有效福利值
|
|
||||||
personal_increase_benefits_package_detail int8[] NOT NULL DEFAULT '{}', -- 个人当日新增福利包明细
|
|
||||||
personal_benefits_package_speed_up_value decimal(18, 2) NOT NULL DEFAULT 0.00, -- 当日个人福利包加速总值
|
|
||||||
personal_benefits_package_remain_value decimal(18, 2) NOT NULL DEFAULT 0.00, -- 当日个人福利包剩余兑换值
|
|
||||||
personal_invite_benefits_package_holder_count int4 NOT NULL DEFAULT 0, -- 持有福利包的直推人数
|
|
||||||
personal_invite_increase_benefits_package_detail int8[] NOT NULL DEFAULT '{}', -- 当日直推人新增福利包明细
|
|
||||||
personal_benefits_level int4 NOT NULL DEFAULT 0, -- 当日福利包加速动态系统等级
|
|
||||||
|
|
||||||
-- === 消费相关 ===
|
|
||||||
personal_total_amount decimal(18, 2) NOT NULL DEFAULT 0.00, -- 个人总消费(已收货为准)
|
|
||||||
personal_online_amount decimal(18, 2) NOT NULL DEFAULT 0.00, -- 个人线上总消费
|
|
||||||
personal_offline_amount decimal(18, 2) NOT NULL DEFAULT 0.00, -- 个人线下总消费
|
|
||||||
personal_other_amount decimal(18, 2) NOT NULL DEFAULT 0.00, -- 个人其他总消费
|
|
||||||
personal_increase_amount decimal(18, 2) NOT NULL DEFAULT 0.00, -- 当日新增个人消费
|
|
||||||
personal_increase_online_amount decimal(18, 2) NOT NULL DEFAULT 0.00, -- 当日新增线上个人消费
|
|
||||||
personal_increase_offline_amount decimal(18, 2) NOT NULL DEFAULT 0.00, -- 当日新增线下个人消费
|
|
||||||
personal_increase_other_amount decimal(18, 2) NOT NULL DEFAULT 0.00, -- 当日新增其他个人消费
|
|
||||||
personal_invite_order_holder_count int4 NOT NULL DEFAULT 0, -- 有现金消费的直推人数
|
|
||||||
personal_dynamic_rewards_amount decimal(18, 2) NOT NULL DEFAULT 0.00, -- 当日现金动态佣金可获取金额
|
|
||||||
personal_increase_order_detail int8[] NOT NULL DEFAULT '{}',
|
|
||||||
personal_cash_level int4 NOT NULL DEFAULT 0,
|
|
||||||
|
|
||||||
-- === 余额相关 ===
|
|
||||||
personal_benefits_points_balance decimal(18, 2) NOT NULL DEFAULT 0.00, -- 个人福利积分余额
|
|
||||||
personal_commission_balance decimal(18, 2) NOT NULL DEFAULT 0.00, -- 个人佣金账户余额
|
|
||||||
personal_cash_coupon_balance decimal(18, 2) NOT NULL DEFAULT 0.00, -- 个人现金券余额
|
|
||||||
personal_user_points_balance decimal(18, 2) NOT NULL DEFAULT 0.00, -- 个人用户积分余额
|
|
||||||
|
|
||||||
|
|
||||||
-- ===== 团队部分(不含本人) =====
|
|
||||||
-- === 团队人数 ===
|
|
||||||
team_member_count INT DEFAULT 0, -- 团队人数(不含本人)
|
|
||||||
team_increase_count INT DEFAULT 0, -- 当日新增团队人数
|
|
||||||
|
|
||||||
-- === 团队福利值 ===
|
|
||||||
team_total_benefits_value decimal(18, 2) NOT NULL DEFAULT 0.00, -- 团队总福利值
|
|
||||||
team_current_benefits_value decimal(18, 2) NOT NULL DEFAULT 0.00, -- 团队总福有效利值(不包含划拨的福利包)
|
|
||||||
team_increase_benefits_value decimal(18, 2) NOT NULL DEFAULT 0.00, -- 团队当日新增福利值
|
|
||||||
team_benefits_package_holder_count int4 NOT NULL DEFAULT 0, -- 团队持有福利包的人数
|
|
||||||
team_increase_benefits_package_detail int8[] NOT NULL DEFAULT '{}', -- 团队当日新增福利包明细
|
|
||||||
|
|
||||||
|
|
||||||
-- === 团队消费 ===
|
|
||||||
team_total_amount decimal(18, 2) NOT NULL DEFAULT 0.00, -- 团队总消费(已收货为准)
|
|
||||||
team_online_amount decimal(18, 2) NOT NULL DEFAULT 0.00, -- 团队线上总消费
|
|
||||||
team_offline_amount decimal(18, 2) NOT NULL DEFAULT 0.00, -- 团队线下总消费
|
|
||||||
team_other_amount decimal(18, 2) NOT NULL DEFAULT 0.00, -- 团队其他总消费
|
|
||||||
team_increase_amount decimal(18, 2) NOT NULL DEFAULT 0.00, -- 当日新增团队消费
|
|
||||||
team_increase_online_amount decimal(18, 2) NOT NULL DEFAULT 0.00, -- 当日新增线上团队消费
|
|
||||||
team_increase_offline_amount decimal(18, 2) NOT NULL DEFAULT 0.00, -- 当日新增线下团队消费
|
|
||||||
team_increase_other_amount decimal(18, 2) NOT NULL DEFAULT 0.00, -- 当日新增其他团队消费
|
|
||||||
|
|
||||||
remark varchar(255) not null default '',
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4,
|
|
||||||
is_deleted int4 default 0,
|
|
||||||
UNIQUE (user_id, stat_date)
|
|
||||||
);
|
|
||||||
-- 核心索引
|
|
||||||
CREATE INDEX idx_user_daily_summary_stat_date ON market_daily_summary (stat_date) where is_deleted = 0;
|
|
||||||
CREATE INDEX idx_user_daily_summary_user_id ON market_daily_summary (user_id) where is_deleted = 0;
|
|
||||||
CREATE INDEX idx_market_daily_summary_user_date_desc ON market_daily_summary (user_id, stat_date DESC);
|
|
||||||
|
|
||||||
comment on table market_daily_summary is '用户日汇总表';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.id IS '主键';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.user_id IS '用户ID';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.user_account IS '用户账号';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.user_name IS '用户姓名';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.stat_date IS '统计日期,如 ''2026-04-29''';
|
|
||||||
|
|
||||||
-- ===== 个人部分 - 直推 =====
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_total_invite_count IS '个人直推人数(累计有效邀请人数)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_increase_invite_count IS '当日新增直推人数';
|
|
||||||
|
|
||||||
-- ===== 个人部分 - 福利值相关 =====
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_total_benefits_value IS '个人总福利值(由持有的有效福利包赋予的累计值)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_current_benefits_value IS '个人有效总福利值(不包含划拨的福利包)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_increase_benefits_value IS '当日新增个人福利值';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_increase_current_benefits_value IS '当日新增个人有效福利值';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_increase_benefits_package_detail IS '个人当日新增福利包明细(存储福利包主键ID数组)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_benefits_package_speed_up_value IS '当日个人福利包加速总值';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_benefits_package_remain_value IS '当日个人福利包剩余可兑换值';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_invite_benefits_package_holder_count IS '持有福利包的直推人数(即下级中持有福利包的人数)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_invite_increase_benefits_package_detail IS '当日直推人新增的福利包明细(存储其下级新增福利包的主键ID数组)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_benefits_level IS '当日福利包加速动态系统等级';
|
|
||||||
|
|
||||||
-- ===== 个人部分 - 消费相关 =====
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_total_amount IS '个人总消费金额(以订单已收货为准,累计值)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_online_amount IS '个人线上总消费金额(累计)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_offline_amount IS '个人线下总消费金额(累计)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_other_amount IS '个人其他渠道总消费金额(累计)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_increase_amount IS '当日新增个人消费金额';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_increase_online_amount IS '当日新增线上个人消费金额';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_increase_offline_amount IS '当日新增线下个人消费金额';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_increase_other_amount IS '当日新增其他渠道个人消费金额';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_dynamic_rewards_amount IS '当日现金动态佣金可获取金额';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_invite_order_holder_count IS '有订单的直推人数';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_increase_order_detail IS '当日个人新增消费订单明细(存储订单主键ID数组)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_cash_level IS '当日现金动态系统等级';
|
|
||||||
|
|
||||||
-- ===== 个人部分 - 余额相关 =====
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_benefits_points_balance IS '个人福利积分余额';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_commission_balance IS '个人佣金账户余额';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_cash_coupon_balance IS '个人现金券余额';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.personal_user_points_balance IS '个人用户积分余额';
|
|
||||||
|
|
||||||
-- ===== 团队部分(不含本人)=====
|
|
||||||
-- 团队人数
|
|
||||||
COMMENT ON COLUMN market_daily_summary.team_member_count IS '团队总人数(不含本人,累计有效下级人数)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.team_increase_count IS '当日新增团队人数(不含本人)';
|
|
||||||
|
|
||||||
-- 团队福利值
|
|
||||||
COMMENT ON COLUMN market_daily_summary.team_total_benefits_value IS '团队总福利值(不含本人,累计)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.team_current_benefits_value IS '团队总福有效利值(不包含划拨的福利包)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.team_increase_benefits_value IS '当日新增团队福利值(不含本人)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.team_benefits_package_holder_count IS '团队中持有福利包的人数(不含本人)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.team_increase_benefits_package_detail IS '团队当日新增福利包明细(不含本人,存储福利包主键ID数组)';
|
|
||||||
|
|
||||||
-- 团队消费
|
|
||||||
COMMENT ON COLUMN market_daily_summary.team_total_amount IS '团队总消费金额(不含本人,以已收货为准,累计)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.team_online_amount IS '团队线上总消费金额(不含本人,累计)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.team_offline_amount IS '团队线下总消费金额(不含本人,累计)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.team_other_amount IS '团队其他渠道总消费金额(不含本人,累计)';
|
|
||||||
|
|
||||||
COMMENT ON COLUMN market_daily_summary.team_increase_amount IS '当日新增团队消费金额(不含本人)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.team_increase_online_amount IS '当日新增线上团队消费金额(不含本人)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.team_increase_offline_amount IS '当日新增线下团队消费金额(不含本人)';
|
|
||||||
COMMENT ON COLUMN market_daily_summary.team_increase_other_amount IS '当日新增其他渠道团队消费金额(不含本人)';
|
|
||||||
|
|
||||||
-- 时间戳
|
|
||||||
comment on column market_daily_summary.remark is '备注';
|
|
||||||
comment on column market_daily_summary.create_user is '创建人';
|
|
||||||
comment on column market_daily_summary.create_dept is '创建部门';
|
|
||||||
comment on column market_daily_summary.create_time is '创建时间';
|
|
||||||
comment on column market_daily_summary.update_user is '修改人';
|
|
||||||
comment on column market_daily_summary.update_time is '修改时间';
|
|
||||||
comment on column market_daily_summary.status is '状态';
|
|
||||||
comment on column market_daily_summary.is_deleted is '是否已删除';
|
|
||||||
|
|
||||||
|
|
||||||
drop table if exists market_merchant_order;
|
|
||||||
CREATE TABLE market_merchant_order
|
|
||||||
(
|
|
||||||
id int8 not null primary key,
|
|
||||||
user_id int8 not null,
|
|
||||||
seller_id int8 not null,
|
|
||||||
product_name varchar(255) not null default '',
|
|
||||||
product_id int8 not null,
|
|
||||||
thumb_image_url text not null,
|
|
||||||
inventory_id int8 not null,
|
|
||||||
store_name varchar(255) not null,
|
|
||||||
unit_price decimal(10, 2) default 0.00 not null,
|
|
||||||
gift_type int4 default 0 NOT NULL,
|
|
||||||
unit_gift_amount decimal(10, 2) default 0.00 not null,
|
|
||||||
quantity int2 default 0 not null,
|
|
||||||
total_amount decimal(10, 2) default 0.00 not null,
|
|
||||||
total_gift_amount decimal(10, 2) default 0.00 not null,
|
|
||||||
payout_account_id int8 not null,
|
|
||||||
account_type int4 not null default -1,
|
|
||||||
account_number varchar(255) not null default '',
|
|
||||||
account_url text not null default '',
|
|
||||||
account_holder_name varchar(255) default '' not null,
|
|
||||||
consignee_phone varchar(128) NOT NULL,
|
|
||||||
consignee varchar(128) NOT NULL,
|
|
||||||
delivery_address text not null,
|
|
||||||
payment_voucher_url text not null default '',
|
|
||||||
express_no VARCHAR(100) not null default '',
|
|
||||||
remark varchar(255) not null default '',
|
|
||||||
version int4 not null default 0,
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4,
|
|
||||||
is_deleted int4 default 0
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX idx_market_merchant_order_user_id ON market_merchant_order (user_id) where is_deleted = 0;
|
|
||||||
CREATE INDEX idx_market_merchant_order_seller_id ON market_merchant_order (seller_id) where is_deleted = 0;
|
|
||||||
CREATE INDEX idx_market_merchant_order_product_id ON market_merchant_order (product_id) where is_deleted = 0;
|
|
||||||
CREATE INDEX idx_market_merchant_order_inventory_id ON market_merchant_order (inventory_id) where is_deleted = 0;
|
|
||||||
|
|
||||||
|
|
||||||
COMMENT ON TABLE market_merchant_order IS '自营商家订单';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.id IS '主键';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.user_id IS '下单用户ID';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.seller_id IS '商家ID';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.product_name IS '商品名称';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.product_id IS '商品ID';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.thumb_image_url IS '商品缩略图URL';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.inventory_id IS '库存ID(或SKU ID)';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.store_name IS '店铺名称';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.unit_price IS '商品单价';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.gift_type IS '赠品类型(1:福利积分, 2:现金券, 3:佣金)';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.unit_gift_amount IS '单件商品附带的赠品金额(如红包或福利值)';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.quantity IS '购买数量';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.total_amount IS '订单总金额';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.total_gift_amount IS '赠品总金额';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.payout_account_id IS '上架收款账户ID';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.account_type IS '收款账户类型(1:支付宝, 2:微信, 3:银行卡)';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.account_number IS '收款账号(银行卡号)';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.account_url IS '收款账户二维码或链接';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.account_holder_name IS '收款人姓名';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.consignee_phone IS '收货人手机号';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.consignee IS '收货人姓名';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.delivery_address IS '收货地址';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.payment_voucher_url IS '付款凭证截图URL';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.express_no IS '快递单号';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.remark IS '订单备注';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.create_user IS '创建人用户ID';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.create_dept IS '创建部门ID';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.create_time IS '创建时间';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.update_user IS '更新人用户ID';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.update_time IS '更新时间';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.status IS '订单状态(0=待支付 1=已支付(待发货/待使用)2=已取消 3=已发货/已出票(进行中)4=已完成 5=已关闭(超时未支付)6=退款中 7: 已退款)';
|
|
||||||
COMMENT ON COLUMN market_merchant_order.is_deleted IS '逻辑删除标志(0:未删除, 1:已删除)';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2049669598012903425', '1123598815738675201', 'dailySummary', '用户日汇总表', 'menu', '/market/daily-summary',
|
|
||||||
NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2049669598012903426', '2049669598012903425', 'dailySummary_add', '新增', 'add', '/market/daily-summary/add',
|
|
||||||
'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2049669598012903427', '2049669598012903425', 'dailySummary_edit', '修改', 'edit', '/market/daily-summary/edit',
|
|
||||||
'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2049669598012903428', '2049669598012903425', 'dailySummary_delete', '删除', 'delete',
|
|
||||||
'/api/blade-dailysummary/dailySummary/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2049669598012903429', '2049669598012903425', 'dailySummary_view', '查看', 'view', '/market/daily-summary/view',
|
|
||||||
'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2049669574994563074', '1123598815738675201', 'merchantOrder', '自营商家订单', 'menu', '/market/merchant-order',
|
|
||||||
NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2049669574994563075', '2049669574994563074', 'merchantOrder_add', '新增', 'add', '/market/merchant-order/add',
|
|
||||||
'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2049669574994563076', '2049669574994563074', 'merchantOrder_edit', '修改', 'edit',
|
|
||||||
'/market/merchant-order/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2049669574994563077', '2049669574994563074', 'merchantOrder_delete', '删除', 'delete',
|
|
||||||
'/api/blade-merchantorder/merchantOrder/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
|
|
||||||
is_deleted)
|
|
||||||
VALUES ('2049669574994563078', '2049669574994563074', 'merchantOrder_view', '查看', 'view',
|
|
||||||
'/market/merchant-order/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
CREATE INDEX CONCURRENTLY idx_market_daily_summary_user_id_id
|
|
||||||
ON market_daily_summary (user_id, id DESC)
|
|
||||||
WHERE is_deleted = 0;
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
alter table merchant_catalog
|
|
||||||
add sale_price decimal(10, 2) default 0 not null;
|
|
||||||
|
|
||||||
comment on column public.merchant_catalog.sale_price is '销售价格';
|
|
||||||
@@ -1,113 +0,0 @@
|
|||||||
-- merchant_catalog
|
|
||||||
alter table merchant_catalog add stock int4 default 0 not null;
|
|
||||||
alter table merchant_catalog add version int4 default 0 not null;
|
|
||||||
|
|
||||||
comment on column merchant_catalog.stock is '库存';
|
|
||||||
comment on column merchant_catalog.version is '乐观锁';
|
|
||||||
|
|
||||||
|
|
||||||
-- merchant_catalog_operate_log
|
|
||||||
DROP TABLE IF EXISTS merchant_catalog_operate_log;
|
|
||||||
create table merchant_catalog_operate_log
|
|
||||||
(
|
|
||||||
id int8 not null primary key,
|
|
||||||
merchant_id int8 not null default -1,
|
|
||||||
merchant_account varchar(20) not null default '',
|
|
||||||
product_id int8 not null,
|
|
||||||
product_name varchar(255) not null default '',
|
|
||||||
type int4 default 1, -- 1-扣减 2-增加 3-下架
|
|
||||||
affected_stock int4 not null,
|
|
||||||
remark text,
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4 default 1,
|
|
||||||
is_deleted int4 default 0
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX idx_merchant_catalog_log_merchant_id_create_time ON merchant_catalog_operate_log (merchant_id, create_time DESC) WHERE is_deleted = 0;
|
|
||||||
CREATE INDEX idx_merchant_catalog_log_product_id_create_time ON merchant_catalog_operate_log (product_id, create_time DESC) WHERE is_deleted = 0;
|
|
||||||
CREATE INDEX idx_merchant_catalog_log_create_time ON merchant_catalog_operate_log (create_time DESC) WHERE is_deleted = 0;
|
|
||||||
|
|
||||||
COMMENT ON TABLE merchant_catalog_operate_log IS '自营商家产品目录操作日志';
|
|
||||||
COMMENT ON COLUMN merchant_catalog_operate_log.id IS '主键';
|
|
||||||
COMMENT ON COLUMN merchant_catalog_operate_log.merchant_id IS '商家id';
|
|
||||||
COMMENT ON COLUMN merchant_catalog_operate_log.merchant_account IS '商家账号';
|
|
||||||
COMMENT ON COLUMN merchant_catalog_operate_log.product_id IS '商品id';
|
|
||||||
COMMENT ON COLUMN merchant_catalog_operate_log.product_name IS '商品名称';
|
|
||||||
COMMENT ON COLUMN merchant_catalog_operate_log.type IS '操作类型:1-扣减 2-增加 3-下架';
|
|
||||||
COMMENT ON COLUMN merchant_catalog_operate_log.affected_stock IS '受影响数量';
|
|
||||||
COMMENT ON COLUMN merchant_catalog_operate_log.remark IS '备注';
|
|
||||||
comment on column merchant_catalog_operate_log.create_user is '创建人';
|
|
||||||
comment on column merchant_catalog_operate_log.create_dept is '创建部门';
|
|
||||||
comment on column merchant_catalog_operate_log.create_time is '创建时间';
|
|
||||||
comment on column merchant_catalog_operate_log.update_user is '修改人';
|
|
||||||
comment on column merchant_catalog_operate_log.update_time is '修改时间';
|
|
||||||
comment on column merchant_catalog_operate_log.status is '状态';
|
|
||||||
comment on column merchant_catalog_operate_log.is_deleted is '是否已删除';
|
|
||||||
|
|
||||||
|
|
||||||
-- market_daily_summary
|
|
||||||
alter table market_daily_summary rename column personal_benefits_level to personal_benefits_level_id;
|
|
||||||
alter table market_daily_summary rename column personal_cash_level to personal_cash_level_id;
|
|
||||||
alter table market_daily_summary add personal_benefits_level_name varchar(255);
|
|
||||||
alter table market_daily_summary add personal_cash_level_name varchar(255);
|
|
||||||
|
|
||||||
comment on column market_daily_summary.personal_benefits_level_name is '福利等级名称';
|
|
||||||
comment on column market_daily_summary.personal_cash_level_name is '现金等级名称';
|
|
||||||
|
|
||||||
|
|
||||||
-- market_upgrade_config
|
|
||||||
alter table market_upgrade_config add level integer default 0 not null;
|
|
||||||
|
|
||||||
comment on column market_upgrade_config.level is '等级';
|
|
||||||
|
|
||||||
|
|
||||||
-- merchant_whitelist
|
|
||||||
DROP TABLE IF EXISTS merchant_whitelist;
|
|
||||||
create table merchant_whitelist
|
|
||||||
(
|
|
||||||
id int8 not null primary key,
|
|
||||||
user_id int8 not null default -1,
|
|
||||||
user_account varchar(20) not null default '',
|
|
||||||
type int4 default 1, -- 1-自营商家
|
|
||||||
remark text,
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4 null,
|
|
||||||
is_deleted int4 default 0
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX idx_merchant_whitelist_user_id_type ON merchant_whitelist (user_id, type) WHERE is_deleted = 0;
|
|
||||||
CREATE INDEX idx_merchant_whitelist_user_account_type ON merchant_whitelist (user_account, type) WHERE is_deleted = 0;
|
|
||||||
|
|
||||||
COMMENT ON TABLE merchant_whitelist IS '自营商家白名单';
|
|
||||||
COMMENT ON COLUMN merchant_whitelist.id IS '主键';
|
|
||||||
COMMENT ON COLUMN merchant_whitelist.user_id IS '用户id';
|
|
||||||
COMMENT ON COLUMN merchant_whitelist.user_account IS '用户账号';
|
|
||||||
COMMENT ON COLUMN merchant_whitelist.type IS '作用类型:1-自营商家';
|
|
||||||
COMMENT ON COLUMN merchant_whitelist.remark IS '备注';
|
|
||||||
comment on column merchant_whitelist.create_user is '创建人';
|
|
||||||
comment on column merchant_whitelist.create_dept is '创建部门';
|
|
||||||
comment on column merchant_whitelist.create_time is '创建时间';
|
|
||||||
comment on column merchant_whitelist.update_user is '修改人';
|
|
||||||
comment on column merchant_whitelist.update_time is '修改时间';
|
|
||||||
comment on column merchant_whitelist.status is '状态';
|
|
||||||
comment on column merchant_whitelist.is_deleted is '是否已删除';
|
|
||||||
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2058049305280409601', '1123598815738675201', 'whitelist', '自营商家白名单', 'menu', '/market/whitelist', NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2058049305280409602', '2058049305280409601', 'whitelist_add', '新增', 'add', '/market/whitelist/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2058049305280409603', '2058049305280409601', 'whitelist_edit', '修改', 'edit', '/market/whitelist/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2058049305280409604', '2058049305280409601', 'whitelist_delete', '删除', 'delete', '/api/market/merchant-whitelist/whitelist/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2058049305280409605', '2058049305280409601', 'whitelist_view', '查看', 'view', '/market/whitelist/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
-- 开启事务
|
|
||||||
BEGIN;
|
|
||||||
|
|
||||||
-- 1. 创建临时表来存储需要更新的数据 (ID 和 对应的增加金额)
|
|
||||||
DROP TABLE IF EXISTS temp_update_list;
|
|
||||||
CREATE
|
|
||||||
TEMP TABLE temp_update_list (
|
|
||||||
p_id int8,
|
|
||||||
p_amount numeric(14,2)
|
|
||||||
);
|
|
||||||
|
|
||||||
-- 2. 将你提供的 SQL 数据插入到临时表中
|
|
||||||
INSERT INTO temp_update_list (p_id, p_amount)
|
|
||||||
VALUES (2019627287355547649, 48661.74),
|
|
||||||
(2019629871822757890, 398.38),
|
|
||||||
(2019632314006593537, 1388.78),
|
|
||||||
(2019634332775440386, 1368.78),
|
|
||||||
(2019723108054949890, 3708.78);
|
|
||||||
|
|
||||||
-- 3. 声明变量用于循环处理
|
|
||||||
DO
|
|
||||||
$$
|
|
||||||
DECLARE
|
|
||||||
rec RECORD;
|
|
||||||
|
|
||||||
v_last_amount
|
|
||||||
numeric(14,2);
|
|
||||||
v_current_version
|
|
||||||
int4;
|
|
||||||
v_updated_rows
|
|
||||||
int;
|
|
||||||
BEGIN
|
|
||||||
-- 循环遍历临时表中的每一行
|
|
||||||
FOR rec IN
|
|
||||||
SELECT *
|
|
||||||
FROM temp_update_list LOOP
|
|
||||||
|
|
||||||
-- 3.1 先查:获取当前的版本号和余额
|
|
||||||
-- 使用 FOR UPDATE 锁定这一行,防止并发冲突
|
|
||||||
SELECT version, amount
|
|
||||||
INTO v_current_version, v_last_amount
|
|
||||||
FROM benefit_point
|
|
||||||
WHERE id = rec.p_id
|
|
||||||
FOR UPDATE;
|
|
||||||
|
|
||||||
-- 检查记录是否存在
|
|
||||||
IF
|
|
||||||
NOT FOUND THEN
|
|
||||||
RAISE NOTICE 'ID % 不存在,跳过', rec.p_id;
|
|
||||||
CONTINUE;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
-- 3.2 再改:执行更新 (使用 version 乐观锁逻辑)
|
|
||||||
-- 注意:这里假设你的 benefit_point 表有 version 字段
|
|
||||||
UPDATE benefit_point
|
|
||||||
SET amount = amount + rec.p_amount,
|
|
||||||
version = version + 1, -- 版本号+1
|
|
||||||
update_time = NOW()
|
|
||||||
WHERE id = rec.p_id
|
|
||||||
AND version = v_current_version; -- 乐观锁检查
|
|
||||||
|
|
||||||
GET DIAGNOSTICS v_updated_rows = ROW_COUNT;
|
|
||||||
|
|
||||||
-- 检查是否更新成功
|
|
||||||
IF
|
|
||||||
v_updated_rows = 0 THEN
|
|
||||||
RAISE EXCEPTION '乐观锁失败:ID % 的数据在查询后被修改了,当前版本 %', rec.p_id, v_current_version;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
-- 3.3 插日志:插入到 benefit_point_log 表
|
|
||||||
INSERT INTO benefit_point_log (id, user_id, amount, last_amount, fee,
|
|
||||||
source_type, source_id, source_detail, type,
|
|
||||||
is_complete, statistical_date, remark,
|
|
||||||
create_time, update_time, status, is_deleted)
|
|
||||||
VALUES (
|
|
||||||
-- ID 生成策略:这里使用随机数模拟雪花算法,实际请替换为你的 ID 生成器
|
|
||||||
-- 或者如果你的日志表 ID 是自增的,这里可以直接写 nextval('seq_name')
|
|
||||||
(floor(random() * 9223372036854775807))::int8,
|
|
||||||
rec.p_id, -- user_id (题目要求 ID 相同)
|
|
||||||
rec.p_amount, -- 本次变动金额
|
|
||||||
v_last_amount, -- 变动前的旧金额
|
|
||||||
0.00, -- fee = 0
|
|
||||||
|
|
||||||
'welfare_acceleration', -- source_type
|
|
||||||
rec.p_id, -- source_id (题目要求 ID 相同)
|
|
||||||
'自动修复脚本', -- source_detail
|
|
||||||
1, -- type = 1 (收入)
|
|
||||||
|
|
||||||
1, -- is_complete = 1
|
|
||||||
CURRENT_DATE, -- statistical_date
|
|
||||||
'2026-05-24福利积分修复 , 修复的福利积分 : ' || rec.p_amount, -- remark
|
|
||||||
|
|
||||||
NOW(), NOW(), -- create/update time
|
|
||||||
1, 0 -- status, is_deleted
|
|
||||||
);
|
|
||||||
|
|
||||||
END LOOP;
|
|
||||||
END $$;
|
|
||||||
|
|
||||||
-- 4. 提交事务 (如果上面任何一步报错,事务会自动回滚,保证数据一致性)
|
|
||||||
COMMIT;
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
-- 可选:加速正数查询
|
|
||||||
CREATE INDEX idx_user_point_log_amount_positive ON user_point_log (amount) WHERE amount > 0;
|
|
||||||
|
|
||||||
-- 可选:加速负数查询
|
|
||||||
CREATE INDEX idx_user_point_log_amount_negative ON user_point_log (amount) WHERE amount < 0;
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
-- after_sales_request
|
|
||||||
DROP TABLE IF EXISTS after_sales_request;
|
|
||||||
create table after_sales_request
|
|
||||||
(
|
|
||||||
id int8 not null primary key,
|
|
||||||
order_id int8 not null default -1,
|
|
||||||
order_type VARCHAR(100) not null default '',
|
|
||||||
product_name VARCHAR(500) not null default '',
|
|
||||||
image_url VARCHAR(512) NULL,
|
|
||||||
user_id int8 not null default -1,
|
|
||||||
user_account VARCHAR(100) not null default '',
|
|
||||||
type int4 not null default -1, -- 1=退货退款, 2=换货
|
|
||||||
contact_info VARCHAR(100) NOT NULL,
|
|
||||||
message VARCHAR(500),
|
|
||||||
remark text,
|
|
||||||
create_user int8,
|
|
||||||
create_dept int8,
|
|
||||||
create_time timestamp(6),
|
|
||||||
update_user int8,
|
|
||||||
update_time timestamp(6),
|
|
||||||
status int4 default 0, -- 0=待处理, 1=已处理
|
|
||||||
is_deleted int4 default 0
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX idx_after_sales_request_order_id ON after_sales_request (order_id);
|
|
||||||
CREATE INDEX idx_after_sales_request_user_account ON after_sales_request (user_account);
|
|
||||||
CREATE INDEX idx_after_sales_request_order_type ON after_sales_request (order_type);
|
|
||||||
CREATE INDEX idx_after_sales_request_status ON after_sales_request (status);
|
|
||||||
|
|
||||||
COMMENT ON TABLE after_sales_request IS '用户售后申请表';
|
|
||||||
COMMENT ON COLUMN after_sales_request.id IS '主键ID';
|
|
||||||
COMMENT ON COLUMN after_sales_request.order_id IS '关联的原始订单ID';
|
|
||||||
COMMENT ON COLUMN after_sales_request.order_type IS '订单类型';
|
|
||||||
COMMENT ON COLUMN after_sales_request.product_name IS '商品名称';
|
|
||||||
COMMENT ON COLUMN after_sales_request.image_url IS '缩略图';
|
|
||||||
COMMENT ON COLUMN after_sales_request.user_id IS '用户ID';
|
|
||||||
COMMENT ON COLUMN after_sales_request.user_account IS '用户账号';
|
|
||||||
COMMENT ON COLUMN after_sales_request.type IS '售后类型:1=退货退款,2=换货';
|
|
||||||
COMMENT ON COLUMN after_sales_request.contact_info IS '用户联系方式(如手机号、微信号等)';
|
|
||||||
COMMENT ON COLUMN after_sales_request.message IS '用户留言/问题描述';
|
|
||||||
comment on column after_sales_request.create_user is '创建人';
|
|
||||||
comment on column after_sales_request.create_dept is '创建部门';
|
|
||||||
comment on column after_sales_request.create_time is '创建时间';
|
|
||||||
comment on column after_sales_request.update_user is '修改人';
|
|
||||||
comment on column after_sales_request.update_time is '修改时间';
|
|
||||||
COMMENT ON COLUMN after_sales_request.status IS '处理状态:0=待处理,1=已处理';
|
|
||||||
comment on column after_sales_request.is_deleted is '是否已删除';
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2062430469260800001', '1123598815738675201', 'afterSalesRequest', '用户售后申请表', 'menu', '/mall/afterSalesRequest', NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2062430469260800002', '2062430469260800001', 'afterSalesRequest_add', '新增', 'add', '/mall/afterSalesRequest/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2062430469260800003', '2062430469260800001', 'afterSalesRequest_edit', '修改', 'edit', '/mall/afterSalesRequest/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2062430469260800004', '2062430469260800001', 'afterSalesRequest_delete', '删除', 'delete', '/api/mall/after-sales/afterSalesRequest/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2062430469260800005', '2062430469260800001', 'afterSalesRequest_view', '查看', 'view', '/mall/afterSalesRequest/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
--INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2020763647899787265, 2019338015981219841, 'userNotice', '用户通知', 'menu', '/common/commonUserNotice', 'iconfont iconicon_voipphone', 1, 1, 0, 1, '', '', 0);
|
|
||||||
--INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2020763647899787266, 2020763647899787265, 'userNotice_add', '新增', 'add', '/common/commonUserNotice/add', 'plus', 1, 2, 1, 1, null, null, 0);
|
|
||||||
--INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2020763647899787267, 2020763647899787265, 'userNotice_edit', '修改', 'edit', '/common/commonUserNotice/edit', 'form', 2, 2, 2, 1, null, null, 0);
|
|
||||||
--INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2020763647899787268, 2020763647899787265, 'userNotice_delete', '删除', 'delete', '/common/notice/remove', 'delete', 3, 2, 3, 1, null, null, 0);
|
|
||||||
--INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2020763647899787269, 2020763647899787265, 'userNotice_view', '查看', 'view', '/common/commonUserNotice/view', 'file-text', 4, 2, 2, 1, null, null, 0);
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
INSERT INTO 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 blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2019338015981219841, 0, 'common', '公共信息', 'menu', '/common', 'iconfont iconicon_message', 8, 1, null, 1, null, '', 0);
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019341061003980801', '2016445919294554113', 'mallCategory', '商品分类', 'menu', '/mall/mallCategory', NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019341061003980802', '2019341061003980801', 'mallCategory_add', '新增', 'add', '/mall/mallCategory/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019341061003980803', '2019341061003980801', 'mallCategory_edit', '修改', 'edit', '/mall/mallCategory/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019341061003980804', '2019341061003980801', 'mallCategory_delete', '删除', 'delete', '/api/blade-mallcategory/mallCategory/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019341061003980805', '2019341061003980801', 'mallCategory_view', '查看', 'view', '/mall/mallCategory/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019341061775732737', '2016445919294554113', 'mallProduct', '商城商品', 'menu', '/mall/mallProduct', NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019341061775732738', '2019341061775732737', 'mallProduct_add', '新增', 'add', '/mall/mallProduct/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019341061775732739', '2019341061775732737', 'mallProduct_edit', '修改', 'edit', '/mall/mallProduct/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019341061775732740', '2019341061775732737', 'mallProduct_delete', '删除', 'delete', '/api/blade-mallproduct/mallProduct/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019341061775732741', '2019341061775732737', 'mallProduct_view', '查看', 'view', '/mall/mallProduct/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
INSERT INTO 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, -1, 1, '', '', 0);
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517579878402', '2016446332399943682', 'userMarketBenefitPackage', '用户福利包信息', 'menu', '/userPackage/userMarketBenefitPackage', NULL, 2, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517579878403', '2019438517579878402', 'userMarketBenefitPackage_add', '新增', 'add', '/userPackage/userMarketBenefitPackage/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517579878404', '2019438517579878402', 'userMarketBenefitPackage_edit', '修改', 'edit', '/userPackage/userMarketBenefitPackage/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517579878405', '2019438517579878402', 'userMarketBenefitPackage_delete', '删除', 'delete', '/api/blade-usermarketbenefitpackage/userMarketBenefitPackage/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517579878406', '2019438517579878402', 'userMarketBenefitPackage_view', '查看', 'view', '/userPackage/userMarketBenefitPackage/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517974142978', '2016446332399943682', 'userMarketBenefitPackageLog', '划拨福利包记录', 'menu', '/userPackage/userMarketBenefitPackageLog', NULL, 3, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517974142979', '2019438517974142978', 'userMarketBenefitPackageLog_add', '新增', 'add', '/userPackage/userMarketBenefitPackageLog/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517974142980', '2019438517974142978', 'userMarketBenefitPackageLog_edit', '修改', 'edit', '/userPackage/userMarketBenefitPackageLog/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517974142981', '2019438517974142978', 'userMarketBenefitPackageLog_delete', '删除', 'delete', '/api/blade-usermarketbenefitpackagelog/userMarketBenefitPackageLog/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517974142982', '2019438517974142978', 'userMarketBenefitPackageLog_view', '查看', 'view', '/userPackage/userMarketBenefitPackageLog/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517080756225', '2016446332399943682', 'userMarketBenefitPackageTemplate', '福利包信息', 'menu', '/userPackage/userMarketBenefitPackageTemplate', NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517080756226', '2019438517080756225', 'userMarketBenefitPackageTemplate_add', '新增', 'add', '/userPackage/userMarketBenefitPackageTemplate/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517080756227', '2019438517080756225', 'userMarketBenefitPackageTemplate_edit', '修改', 'edit', '/userPackage/userMarketBenefitPackageTemplate/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517080756228', '2019438517080756225', 'userMarketBenefitPackageTemplate_delete', '删除', 'delete', '/api/blade-usermarketbenefitpackagetemplate/userMarketBenefitPackageTemplate/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019438517080756229', '2019438517080756225', 'userMarketBenefitPackageTemplate_view', '查看', 'view', '/userPackage/userMarketBenefitPackageTemplate/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019329745643835393', '1123598815738675201', 'marketInfo', '用户拓展信息表', 'menu', '/market/marketInfo', NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019329745643835394', '2019329745643835393', 'marketInfo_add', '新增', 'add', '/market/marketInfo/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019329745643835395', '2019329745643835393', 'marketInfo_edit', '修改', 'edit', '/market/marketInfo/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019329745643835396', '2019329745643835393', 'marketInfo_delete', '删除', 'delete', '/api/blade-marketinfo/marketInfo/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019329745643835397', '2019329745643835393', 'marketInfo_view', '查看', 'view', '/market/marketInfo/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019446499472781314', '1123598815738675201', 'order', '用户订单', 'menu', '/common/order', NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019446499472781315', '2019446499472781314', 'order_add', '新增', 'add', '/common/order/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019446499472781316', '2019446499472781314', 'order_edit', '修改', 'edit', '/common/order/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019446499472781317', '2019446499472781314', 'order_delete', '删除', 'delete', '/api/user-order/order/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019446499472781318', '2019446499472781314', 'order_view', '查看', 'view', '/common/order/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019341060219645953', '2019338015981219841', 'regionsInfo', '省市区信息', 'menu', '/common/commonRegionsInfo', NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019341060219645954', '2019341060219645953', 'regionsInfo_add', '新增', 'add', '/common/commonRegionsInfo/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019341060219645955', '2019341060219645953', 'regionsInfo_edit', '修改', 'edit', '/common/commonRegionsInfo/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019341060219645956', '2019341060219645953', 'regionsInfo_delete', '删除', 'delete', '/api/blade-regionsinfo/regionsInfo/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019341060219645957', '2019341060219645953', 'regionsInfo_view', '查看', 'view', '/common/regionsInfo/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
CREATE INDEX idx_user_order_search ON user_order (payment_status, order_status, payment_type, create_time);
|
|
||||||
|
|
||||||
update user_order set payment_status = 0 , order_status = 0 where payment_status = 2 and order_status = 5 and payment_type = 99;
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019341062694285314', '2019338015981219841', 'userAddress', '用户收货地址', 'menu', '/common/userAddress', NULL, 1, 1, 0, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019341062694285315', '2019341062694285314', 'userAddress_add', '新增', 'add', '/common/userAddress/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019341062694285316', '2019341062694285314', 'userAddress_edit', '修改', 'edit', '/common/userAddress/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019341062694285317', '2019341062694285314', 'userAddress_delete', '删除', 'delete', '/api/blade-useraddress/userAddress/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
|
||||||
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
|
|
||||||
VALUES ('2019341062694285318', '2019341062694285314', 'userAddress_view', '查看', 'view', '/common/userAddress/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
|
||||||
3565
doc/sql/flowable.postgres.all.create.sql
Normal file
3565
doc/sql/flowable.postgres.all.create.sql
Normal file
File diff suppressed because one or more lines are too long
4
doc/sql/insert_data/insert_ads.sql
Normal file
4
doc/sql/insert_data/insert_ads.sql
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
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);
|
||||||
2
doc/sql/insert_data/insert_blade_client.sql
Normal file
2
doc/sql/insert_data/insert_blade_client.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
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);
|
||||||
36
doc/sql/insert_data/insert_blade_dict.sql
Normal file
36
doc/sql/insert_data/insert_blade_dict.sql
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
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);
|
||||||
|
|
||||||
245
doc/sql/insert_data/insert_blade_menu.sql
Normal file
245
doc/sql/insert_data/insert_blade_menu.sql
Normal file
@@ -0,0 +1,245 @@
|
|||||||
|
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
doc/sql/insert_data/insert_blade_oss.sql
Normal file
1
doc/sql/insert_data/insert_blade_oss.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
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);
|
||||||
18
doc/sql/insert_data/insert_blade_param.sql
Normal file
18
doc/sql/insert_data/insert_blade_param.sql
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
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">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
商城app用户隐私政策
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
', '商城app用户隐私政策', NULL, NULL, '2026-01-30 00:57:52.597', NULL, '2026-01-30 00:57:52.597', 1, 0);
|
||||||
5
doc/sql/insert_data/insert_level_info.sql
Normal file
5
doc/sql/insert_data/insert_level_info.sql
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
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);
|
||||||
4
doc/sql/insert_data/insert_package_info.sql
Normal file
4
doc/sql/insert_data/insert_package_info.sql
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
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);
|
||||||
8
doc/sql/insert_data/insert_user_commission_account.sql
Normal file
8
doc/sql/insert_data/insert_user_commission_account.sql
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
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);
|
||||||
50850
doc/sql/insert_data/regions_info_insert_postgres.sql
Normal file
50850
doc/sql/insert_data/regions_info_insert_postgres.sql
Normal file
File diff suppressed because it is too large
Load Diff
100
pom.xml
100
pom.xml
@@ -19,10 +19,10 @@
|
|||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
|
||||||
<!-- Docker仓库服务配置 -->
|
<!-- Docker仓库服务配置 -->
|
||||||
<docker.registry.url>192.168.31.132:8888</docker.registry.url>
|
<docker.registry.url>192.168.0.188</docker.registry.url>
|
||||||
<docker.username>admin</docker.username>
|
<docker.username>admin</docker.username>
|
||||||
<docker.password>Harbor11aabc</docker.password>
|
<docker.password>admin12345</docker.password>
|
||||||
<docker.namespace>yicha1lu</docker.namespace>
|
<docker.namespace>blade</docker.namespace>
|
||||||
<docker.fabric.version>0.42.0</docker.fabric.version>
|
<docker.fabric.version>0.42.0</docker.fabric.version>
|
||||||
<mapstruct.version>1.6.3</mapstruct.version>
|
<mapstruct.version>1.6.3</mapstruct.version>
|
||||||
</properties>
|
</properties>
|
||||||
@@ -233,10 +233,10 @@
|
|||||||
<artifactId>blade-starter-powerjob</artifactId>
|
<artifactId>blade-starter-powerjob</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- 工作流 -->
|
<!-- 工作流 -->
|
||||||
<!-- <dependency>-->
|
<dependency>
|
||||||
<!-- <groupId>org.springblade</groupId>-->
|
<groupId>org.springblade</groupId>
|
||||||
<!-- <artifactId>blade-starter-flowable</artifactId>-->
|
<artifactId>blade-starter-flowable</artifactId>
|
||||||
<!-- </dependency>-->
|
</dependency>
|
||||||
<!-- auto -->
|
<!-- auto -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
@@ -264,6 +264,24 @@
|
|||||||
<version>2.0.0</version>
|
<version>2.0.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-all</artifactId>
|
||||||
|
<version>5.8.40</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.xuxueli</groupId>
|
||||||
|
<artifactId>xxl-job-core</artifactId>
|
||||||
|
<version>3.3.2</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>io.netty</groupId>
|
||||||
|
<artifactId>netty-codec-http</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mapstruct</groupId>
|
<groupId>org.mapstruct</groupId>
|
||||||
<artifactId>mapstruct</artifactId>
|
<artifactId>mapstruct</artifactId>
|
||||||
@@ -277,59 +295,6 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.locationtech.jts</groupId>
|
|
||||||
<artifactId>jts-core</artifactId>
|
|
||||||
<version>1.19.0</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!--blade-pay插件相关-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.javen205</groupId>
|
|
||||||
<artifactId>IJPay-WxPay</artifactId>
|
|
||||||
<version>2.9.12</version>
|
|
||||||
</dependency>
|
|
||||||
<!--blade-pay插件相关 二维码生成-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>cn.hutool</groupId>
|
|
||||||
<artifactId>hutool-extra</artifactId>
|
|
||||||
<version>5.8.29</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.zxing</groupId>
|
|
||||||
<artifactId>core</artifactId>
|
|
||||||
<version>3.3.3</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!--支付宝SDK-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alipay.sdk</groupId>
|
|
||||||
<artifactId>alipay-sdk-java</artifactId>
|
|
||||||
<version>4.39.134.ALL</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!--YunGouOS聚合支付相关-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.yungouos.pay</groupId>
|
|
||||||
<artifactId>yungouos-pay-sdk</artifactId>
|
|
||||||
<version>2.0.38</version>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>cn.hutool</groupId>
|
|
||||||
<artifactId>hutool-all</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- Source: https://mvnrepository.com/artifact/org.semver4j/semver4j -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.semver4j</groupId>
|
|
||||||
<artifactId>semver4j</artifactId>
|
|
||||||
<version>6.0.0</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@@ -413,21 +378,6 @@
|
|||||||
</compilerArgs>
|
</compilerArgs>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>com.google.cloud.tools</groupId>
|
|
||||||
<artifactId>jib-maven-plugin</artifactId>
|
|
||||||
<version>3.4.0</version>
|
|
||||||
<configuration>
|
|
||||||
<allowInsecureRegistries>true</allowInsecureRegistries>
|
|
||||||
<to>
|
|
||||||
<image>192.168.31.132:8888/yicha1lu/blade-api:4.8.0.RELEASE</image>
|
|
||||||
<auth>
|
|
||||||
<username>${docker.username}</username>
|
|
||||||
<password>${docker.password}</password>
|
|
||||||
</auth>
|
|
||||||
</to>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|||||||
@@ -28,8 +28,6 @@ package org.springblade;
|
|||||||
import org.springblade.common.constant.CommonConstant;
|
import org.springblade.common.constant.CommonConstant;
|
||||||
import org.springblade.core.launch.BladeApplication;
|
import org.springblade.core.launch.BladeApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
|
||||||
import org.springframework.retry.annotation.EnableRetry;
|
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
|
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
|
||||||
|
|
||||||
@@ -41,8 +39,6 @@ import org.springframework.session.data.redis.config.annotation.web.http.EnableR
|
|||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
@EnableRedisHttpSession
|
@EnableRedisHttpSession
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@EnableRetry //重试机制
|
|
||||||
@EnableAspectJAutoProxy(exposeProxy = true)
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
package org.springblade.common.cache;
|
|
||||||
|
|
||||||
import org.springblade.core.cache.utils.CacheUtil;
|
|
||||||
import org.springblade.core.tool.utils.SpringUtil;
|
|
||||||
import org.springblade.modules.market.service.IMarketBankCardService;
|
|
||||||
import org.springblade.modules.market.service.IMarketInfoService;
|
|
||||||
import org.springblade.modules.market.service.IMarketMerchantApplicationService;
|
|
||||||
|
|
||||||
import static org.springblade.common.constant.MarketInfoConstant.MARKET_INFO_CONFIG_CACHE;
|
|
||||||
|
|
||||||
public class MarketInfoCache {
|
|
||||||
|
|
||||||
public final static String REAL_NAME = "realName:";
|
|
||||||
|
|
||||||
public static final String BANK_CARD = "bankCard:";
|
|
||||||
|
|
||||||
public static final String MERCHANT = "merchant:";
|
|
||||||
|
|
||||||
private static final IMarketInfoService marketInfoService;
|
|
||||||
|
|
||||||
private static final IMarketBankCardService bankCardService;
|
|
||||||
|
|
||||||
public static final IMarketMerchantApplicationService merchantService;
|
|
||||||
|
|
||||||
static {
|
|
||||||
marketInfoService = SpringUtil.getBean(IMarketInfoService.class);
|
|
||||||
bankCardService = SpringUtil.getBean(IMarketBankCardService.class);
|
|
||||||
merchantService = SpringUtil.getBean(IMarketMerchantApplicationService.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean hasVerifyRealName(Long userId) {
|
|
||||||
return Boolean.TRUE.equals(CacheUtil.get(MARKET_INFO_CONFIG_CACHE, REAL_NAME, userId, () -> marketInfoService.hasVerifyRealName(userId)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean hasVerifyBankCard(Long userId) {
|
|
||||||
return Boolean.TRUE.equals(CacheUtil.get(MARKET_INFO_CONFIG_CACHE, BANK_CARD, userId, () -> bankCardService.hasVerifyBankCard(userId)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Integer checkMerchantType(Long userId) {
|
|
||||||
return CacheUtil.get(MARKET_INFO_CONFIG_CACHE, MERCHANT, userId, () -> merchantService.checkMerchantType(userId));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
package org.springblade.common.cache;
|
|
||||||
|
|
||||||
import org.springblade.core.cache.utils.CacheUtil;
|
|
||||||
import org.springblade.core.tool.utils.SpringUtil;
|
|
||||||
import org.springblade.modules.common.eums.PaymentType;
|
|
||||||
import org.springblade.plugin.pay.entity.AliPayAccountConfig;
|
|
||||||
import org.springblade.plugin.pay.entity.WxPayAccountConfig;
|
|
||||||
import org.springblade.plugin.pay.service.IAliPayAccountConfigService;
|
|
||||||
import org.springblade.plugin.pay.service.IWxPayAccountConfigService;
|
|
||||||
|
|
||||||
import static org.springblade.plugin.pay.constant.PayConstant.PAYMENT_CONFIG_CACHE;
|
|
||||||
|
|
||||||
public class PaymentCache {
|
|
||||||
|
|
||||||
private static final String PAYMENT_TYPE = "payment:type:";
|
|
||||||
|
|
||||||
private static final IAliPayAccountConfigService alipayAccountConfigService;
|
|
||||||
|
|
||||||
private static final IWxPayAccountConfigService wxpayAccountConfigService;
|
|
||||||
|
|
||||||
static {
|
|
||||||
alipayAccountConfigService = SpringUtil.getBean(IAliPayAccountConfigService.class);
|
|
||||||
wxpayAccountConfigService = SpringUtil.getBean(IWxPayAccountConfigService.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static AliPayAccountConfig getAliConfig() {
|
|
||||||
return CacheUtil.get(PAYMENT_CONFIG_CACHE, PAYMENT_TYPE, PaymentType.ALI.getCode(), alipayAccountConfigService::getDefault);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static WxPayAccountConfig getWxConfig() {
|
|
||||||
return CacheUtil.get(PAYMENT_CONFIG_CACHE, PAYMENT_TYPE, PaymentType.WECHAT.getCode(), wxpayAccountConfigService::getDefault);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,53 +1,121 @@
|
|||||||
package org.springblade.common.config;
|
package org.springblade.common.config;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.scheduling.annotation.EnableAsync;
|
import org.springframework.core.task.AsyncTaskExecutor;
|
||||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||||
|
|
||||||
import java.util.concurrent.ThreadPoolExecutor;
|
import java.util.concurrent.ThreadPoolExecutor;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableAsync
|
@Slf4j
|
||||||
public class AsyncConfiguration {
|
public class AsyncConfiguration {
|
||||||
|
|
||||||
|
private static final int CORE_POOL_SIZE = Runtime.getRuntime().availableProcessors();
|
||||||
|
private static final int MAX_POOL_SIZE = CORE_POOL_SIZE * 2;
|
||||||
|
private static final int QUEUE_CAPACITY = 500;
|
||||||
|
private static final int KEEP_ALIVE_SECONDS = 60;
|
||||||
|
private static final int AWAIT_TERMINATION_SECONDS = 60;
|
||||||
|
|
||||||
// 通知类:短信、邮件、站内信
|
@Bean("common")
|
||||||
@Bean("notificationExecutor")
|
public AsyncTaskExecutor commonAsyncExecutor() {
|
||||||
public ThreadPoolTaskExecutor notificationExecutor() {
|
|
||||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||||
executor.setCorePoolSize(6);
|
//核心线程数 cpuNum:线程池创建时候初始化的线程数
|
||||||
executor.setMaxPoolSize(12);
|
executor.setCorePoolSize(CORE_POOL_SIZE);
|
||||||
executor.setQueueCapacity(200);
|
//核心线程数 cpuNum:线程池创建时候初始化的线程数
|
||||||
executor.setThreadNamePrefix("notify-");
|
executor.setMaxPoolSize(MAX_POOL_SIZE);
|
||||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
//缓冲队列500:用来缓冲执行任务的队列
|
||||||
executor.initialize();
|
executor.setQueueCapacity(QUEUE_CAPACITY);
|
||||||
return executor;
|
//允许线程的空闲时间60秒:当超过了核心线程出之外的线程在空闲时间到达之后会被销毁
|
||||||
}
|
executor.setKeepAliveSeconds(KEEP_ALIVE_SECONDS);
|
||||||
|
// CallerRunsPolicy策略:如果添加到线程池失败,那么主线程会自己去执行该任务,不会等待线程池中的线程去执行。
|
||||||
@Bean("paymentAsyncExecutor")
|
//当提交的任务个数大于QueueCapacity,就需要设置该参数,但spring提供的都不太满足业务场景,可以自定义一个,也可以注意不要超过QueueCapacity即可
|
||||||
public ThreadPoolTaskExecutor paymentAsyncExecutor() {
|
|
||||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
|
||||||
executor.setCorePoolSize(6);
|
|
||||||
executor.setMaxPoolSize(12);
|
|
||||||
executor.setQueueCapacity(200);
|
|
||||||
executor.setThreadNamePrefix("pay-");
|
|
||||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||||
|
//调度器shutdown被调用时等待当前被调度的任务完成
|
||||||
|
executor.setWaitForTasksToCompleteOnShutdown(true);
|
||||||
|
//等待时长
|
||||||
|
executor.setAwaitTerminationSeconds(AWAIT_TERMINATION_SECONDS);
|
||||||
|
//线程池名的前缀:设置好了之后可以方便我们定位处理任务所在的线程池
|
||||||
|
executor.setThreadNamePrefix("common-Async-");
|
||||||
executor.initialize();
|
executor.initialize();
|
||||||
return executor;
|
return executor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Bean("statsCommissionAsyncExecutor")
|
|
||||||
public ThreadPoolTaskExecutor statsCommissionAsyncExecutor() {
|
|
||||||
|
@Bean("appRegisterExecutor")
|
||||||
|
public AsyncTaskExecutor appRegisterExecutor() {
|
||||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||||
executor.setCorePoolSize(6);
|
//核心线程数 cpuNum:线程池创建时候初始化的线程数
|
||||||
executor.setMaxPoolSize(12);
|
executor.setCorePoolSize(CORE_POOL_SIZE);
|
||||||
executor.setQueueCapacity(200);
|
//核心线程数 cpuNum:线程池创建时候初始化的线程数
|
||||||
executor.setThreadNamePrefix("stats-commission-");
|
executor.setMaxPoolSize(MAX_POOL_SIZE);
|
||||||
|
//缓冲队列500:用来缓冲执行任务的队列
|
||||||
|
executor.setQueueCapacity(QUEUE_CAPACITY);
|
||||||
|
//允许线程的空闲时间60秒:当超过了核心线程出之外的线程在空闲时间到达之后会被销毁
|
||||||
|
executor.setKeepAliveSeconds(KEEP_ALIVE_SECONDS);
|
||||||
|
// CallerRunsPolicy策略:如果添加到线程池失败,那么主线程会自己去执行该任务,不会等待线程池中的线程去执行。
|
||||||
|
//当提交的任务个数大于QueueCapacity,就需要设置该参数,但spring提供的都不太满足业务场景,可以自定义一个,也可以注意不要超过QueueCapacity即可
|
||||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||||
|
//调度器shutdown被调用时等待当前被调度的任务完成
|
||||||
|
executor.setWaitForTasksToCompleteOnShutdown(true);
|
||||||
|
//等待时长
|
||||||
|
executor.setAwaitTerminationSeconds(AWAIT_TERMINATION_SECONDS);
|
||||||
|
//线程池名的前缀:设置好了之后可以方便我们定位处理任务所在的线程池
|
||||||
|
executor.setThreadNamePrefix("appRegister-Async-");
|
||||||
executor.initialize();
|
executor.initialize();
|
||||||
return executor;
|
return executor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean("appRevokedExecutor")
|
||||||
|
public AsyncTaskExecutor appRevokedExecutor() {
|
||||||
|
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||||
|
//核心线程数 cpuNum:线程池创建时候初始化的线程数
|
||||||
|
executor.setCorePoolSize(CORE_POOL_SIZE);
|
||||||
|
//核心线程数 cpuNum:线程池创建时候初始化的线程数
|
||||||
|
executor.setMaxPoolSize(MAX_POOL_SIZE);
|
||||||
|
//缓冲队列500:用来缓冲执行任务的队列
|
||||||
|
executor.setQueueCapacity(QUEUE_CAPACITY);
|
||||||
|
//允许线程的空闲时间60秒:当超过了核心线程出之外的线程在空闲时间到达之后会被销毁
|
||||||
|
executor.setKeepAliveSeconds(KEEP_ALIVE_SECONDS);
|
||||||
|
// CallerRunsPolicy策略:如果添加到线程池失败,那么主线程会自己去执行该任务,不会等待线程池中的线程去执行。
|
||||||
|
//当提交的任务个数大于QueueCapacity,就需要设置该参数,但spring提供的都不太满足业务场景,可以自定义一个,也可以注意不要超过QueueCapacity即可
|
||||||
|
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||||
|
//调度器shutdown被调用时等待当前被调度的任务完成
|
||||||
|
executor.setWaitForTasksToCompleteOnShutdown(true);
|
||||||
|
//等待时长
|
||||||
|
executor.setAwaitTerminationSeconds(AWAIT_TERMINATION_SECONDS);
|
||||||
|
//线程池名的前缀:设置好了之后可以方便我们定位处理任务所在的线程池
|
||||||
|
executor.setThreadNamePrefix("appRevoked-Async-");
|
||||||
|
executor.initialize();
|
||||||
|
return executor;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Bean("appUserOrderrExecutor")
|
||||||
|
public AsyncTaskExecutor appUserOrderrExecutor() {
|
||||||
|
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||||
|
//核心线程数 cpuNum:线程池创建时候初始化的线程数
|
||||||
|
executor.setCorePoolSize(CORE_POOL_SIZE);
|
||||||
|
//核心线程数 cpuNum:线程池创建时候初始化的线程数
|
||||||
|
executor.setMaxPoolSize(MAX_POOL_SIZE);
|
||||||
|
//缓冲队列500:用来缓冲执行任务的队列
|
||||||
|
executor.setQueueCapacity(QUEUE_CAPACITY);
|
||||||
|
//允许线程的空闲时间60秒:当超过了核心线程出之外的线程在空闲时间到达之后会被销毁
|
||||||
|
executor.setKeepAliveSeconds(KEEP_ALIVE_SECONDS);
|
||||||
|
// CallerRunsPolicy策略:如果添加到线程池失败,那么主线程会自己去执行该任务,不会等待线程池中的线程去执行。
|
||||||
|
//当提交的任务个数大于QueueCapacity,就需要设置该参数,但spring提供的都不太满足业务场景,可以自定义一个,也可以注意不要超过QueueCapacity即可
|
||||||
|
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||||
|
//调度器shutdown被调用时等待当前被调度的任务完成
|
||||||
|
executor.setWaitForTasksToCompleteOnShutdown(true);
|
||||||
|
//等待时长
|
||||||
|
executor.setAwaitTerminationSeconds(AWAIT_TERMINATION_SECONDS);
|
||||||
|
//线程池名的前缀:设置好了之后可以方便我们定位处理任务所在的线程池
|
||||||
|
executor.setThreadNamePrefix("appUserOrderr-Async-");
|
||||||
|
executor.initialize();
|
||||||
|
return executor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ public class BladeConfiguration implements WebMvcConfigurer {
|
|||||||
"/blade-flow/process/resource-view",
|
"/blade-flow/process/resource-view",
|
||||||
"/blade-flow/process/diagram-view",
|
"/blade-flow/process/diagram-view",
|
||||||
"/blade-flow/manager/check-upload",
|
"/blade-flow/manager/check-upload",
|
||||||
|
"/blade-resource/sms/endpoint/send-validate",
|
||||||
"/doc.html",
|
"/doc.html",
|
||||||
"/swagger-ui.html",
|
"/swagger-ui.html",
|
||||||
"/static/**",
|
"/static/**",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.springblade.common.config;
|
package org.springblade.common.config;
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.DbType;
|
import com.baomidou.mybatisplus.annotation.DbType;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
|
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
|
||||||
@@ -9,17 +10,15 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
public class MybatisPlusConfig {
|
public class MybatisPlusConfig {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mybatis-plus.分页插件
|
||||||
|
* @return interceptor
|
||||||
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
||||||
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||||
|
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.POSTGRE_SQL));
|
||||||
PaginationInnerInterceptor paginationInterceptor = new PaginationInnerInterceptor();
|
|
||||||
paginationInterceptor.setDbType(DbType.POSTGRE_SQL);
|
|
||||||
// 可选:设置最大单页限制(防止恶意请求)
|
|
||||||
paginationInterceptor.setMaxLimit(1000L);
|
|
||||||
interceptor.addInnerInterceptor(paginationInterceptor);
|
|
||||||
|
|
||||||
// 2. 乐观锁插件
|
|
||||||
interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
|
interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
|
||||||
return interceptor;
|
return interceptor;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,22 +67,4 @@ public class SwaggerConfiguration {
|
|||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
|
||||||
public GroupedOpenApi appApi() {
|
|
||||||
// 创建并返回GroupedOpenApi对象
|
|
||||||
return GroupedOpenApi.builder()
|
|
||||||
.group("亿茶一路模块")
|
|
||||||
.packagesToScan("org.springblade.modules.api.app")
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public GroupedOpenApi marketApi() {
|
|
||||||
// 创建并返回GroupedOpenApi对象
|
|
||||||
return GroupedOpenApi.builder()
|
|
||||||
.group("硒茶商汇模块")
|
|
||||||
.packagesToScan("org.springblade.modules.api.market")
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package org.springblade.common.config;
|
||||||
|
|
||||||
|
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Configuration
|
||||||
|
public class XxlJobConfig {
|
||||||
|
|
||||||
|
@Value("${xxl.job.admin.addresses}")
|
||||||
|
private String adminAddresses;
|
||||||
|
|
||||||
|
@Value("${xxl.job.accessToken}")
|
||||||
|
private String accessToken;
|
||||||
|
|
||||||
|
@Value("${xxl.job.executor.appname}")
|
||||||
|
private String appname;
|
||||||
|
|
||||||
|
@Value("${xxl.job.executor.address}")
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
@Value("${xxl.job.executor.ip}")
|
||||||
|
private String ip;
|
||||||
|
|
||||||
|
@Value("${xxl.job.executor.port}")
|
||||||
|
private int port;
|
||||||
|
|
||||||
|
@Value("${xxl.job.executor.logpath}")
|
||||||
|
private String logPath;
|
||||||
|
|
||||||
|
@Value("${xxl.job.executor.logretentiondays}")
|
||||||
|
private int logRetentionDays;
|
||||||
|
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public XxlJobSpringExecutor xxlJobExecutor() {
|
||||||
|
XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
|
||||||
|
xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
|
||||||
|
xxlJobSpringExecutor.setAppname(appname);
|
||||||
|
xxlJobSpringExecutor.setAddress(address);
|
||||||
|
xxlJobSpringExecutor.setIp(ip);
|
||||||
|
xxlJobSpringExecutor.setPort(port);
|
||||||
|
xxlJobSpringExecutor.setAccessToken(accessToken);
|
||||||
|
xxlJobSpringExecutor.setLogPath(logPath);
|
||||||
|
xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
|
||||||
|
return xxlJobSpringExecutor;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -90,9 +90,4 @@ public interface CommonConstant {
|
|||||||
Integer API_SCOPE_CATEGORY = 2;
|
Integer API_SCOPE_CATEGORY = 2;
|
||||||
|
|
||||||
|
|
||||||
String USER_DEFAULT_DEPT = "user.default.dept";
|
|
||||||
String USER_DEFAULT_POST = "user.default.post";
|
|
||||||
String USER_DEFAULT_ROLE = "user.default.role";
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
package org.springblade.common.constant;
|
|
||||||
|
|
||||||
public interface MarketInfoConstant {
|
|
||||||
String MARKET_INFO_CONFIG_CACHE = "market:info:";
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
package org.springblade.common.exception;
|
|
||||||
|
|
||||||
public class OptimisticLockException extends RuntimeException{
|
|
||||||
public OptimisticLockException(String message) {
|
|
||||||
super(message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
package org.springblade.common.handler;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import org.apache.ibatis.type.BaseTypeHandler;
|
|
||||||
import org.apache.ibatis.type.JdbcType;
|
|
||||||
import org.apache.ibatis.type.MappedJdbcTypes;
|
|
||||||
import org.apache.ibatis.type.MappedTypes;
|
|
||||||
import org.postgresql.util.PGobject;
|
|
||||||
|
|
||||||
import java.sql.CallableStatement;
|
|
||||||
import java.sql.PreparedStatement;
|
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用于 PostgreSQL JSONB 与 Java 对象(如 List<Map>、Map 等)的双向转换
|
|
||||||
*/
|
|
||||||
@MappedJdbcTypes(JdbcType.OTHER)
|
|
||||||
@MappedTypes({List.class, Map.class})
|
|
||||||
public class PgJsonbTypeHandler extends BaseTypeHandler<Object> {
|
|
||||||
|
|
||||||
private static final ObjectMapper objectMapper = new ObjectMapper();
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setNonNullParameter(PreparedStatement ps, int i, Object parameter, JdbcType jdbcType) throws SQLException {
|
|
||||||
PGobject jsonObject = new PGobject();
|
|
||||||
jsonObject.setType("jsonb");
|
|
||||||
try {
|
|
||||||
jsonObject.setValue(objectMapper.writeValueAsString(parameter));
|
|
||||||
} catch (JsonProcessingException e) {
|
|
||||||
throw new SQLException("Error converting object to JSON", e);
|
|
||||||
}
|
|
||||||
ps.setObject(i, jsonObject);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object getNullableResult(ResultSet rs, String columnName) throws SQLException {
|
|
||||||
return parseJson(rs.getString(columnName));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
|
|
||||||
return parseJson(rs.getString(columnIndex));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
|
|
||||||
return parseJson(cs.getString(columnIndex));
|
|
||||||
}
|
|
||||||
|
|
||||||
private Object parseJson(String json) throws SQLException {
|
|
||||||
if (json == null || json.isEmpty()) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
// 根据实际泛型类型反序列化(此处简化为返回 Object)
|
|
||||||
// 更精确的做法是使用 ParameterizedType,但 MyBatis 不支持泛型擦除后的还原
|
|
||||||
// 所以通常在 Service 层做二次转换,或使用 JsonNode
|
|
||||||
return objectMapper.readValue(json, Object.class);
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new SQLException("Error parsing JSON", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
package org.springblade.common.handler;
|
|
||||||
|
|
||||||
import org.apache.ibatis.type.BaseTypeHandler;
|
|
||||||
import org.apache.ibatis.type.JdbcType;
|
|
||||||
import org.apache.ibatis.type.MappedJdbcTypes;
|
|
||||||
import org.apache.ibatis.type.MappedTypes;
|
|
||||||
import org.locationtech.jts.geom.Coordinate;
|
|
||||||
import org.locationtech.jts.geom.GeometryFactory;
|
|
||||||
import org.locationtech.jts.geom.Point;
|
|
||||||
import org.locationtech.jts.io.ParseException;
|
|
||||||
import org.locationtech.jts.io.WKTReader;
|
|
||||||
|
|
||||||
import java.sql.*;
|
|
||||||
|
|
||||||
@MappedJdbcTypes(JdbcType.OTHER) // 对应 PG 的 point 类型
|
|
||||||
@MappedTypes(Point.class)
|
|
||||||
public class PgJtsPointTypeHandler extends BaseTypeHandler<Point> {
|
|
||||||
|
|
||||||
private static final GeometryFactory FACTORY = new GeometryFactory();
|
|
||||||
private static final WKTReader WKT_READER = new WKTReader(FACTORY);
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setNonNullParameter(PreparedStatement ps, int i, Point parameter, JdbcType jdbcType) throws SQLException {
|
|
||||||
if (parameter == null) {
|
|
||||||
ps.setNull(i, java.sql.Types.OTHER);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
double x = parameter.getX(); // 经度
|
|
||||||
double y = parameter.getY(); // 纬度
|
|
||||||
|
|
||||||
// 【修正】使用 WKT 格式:POINT(经度 纬度)
|
|
||||||
// 注意:中间是空格,不是逗号;必须有 POINT 前缀
|
|
||||||
String wkt = String.format("POINT(%f %f)", x, y);
|
|
||||||
|
|
||||||
// 打印日志方便调试(可选)
|
|
||||||
// System.out.println("Inserting WKT: " + wkt);
|
|
||||||
|
|
||||||
// 将 WKT 字符串传入,PostGIS 会自动识别并转换
|
|
||||||
ps.setObject(i, wkt, java.sql.Types.OTHER);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Point getNullableResult(ResultSet rs, String columnName) throws SQLException {
|
|
||||||
// 关键:获取字符串并解析
|
|
||||||
return parse(rs.getString(columnName));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Point getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
|
|
||||||
return parse(rs.getString(columnIndex));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Point getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
|
|
||||||
return parse(cs.getString(columnIndex));
|
|
||||||
}
|
|
||||||
|
|
||||||
private Point parse(String value) throws SQLException {
|
|
||||||
if (value == null || value.trim().isEmpty()) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 1. 尝试直接作为 WKT 解析 (兼容 "POINT(x y)")
|
|
||||||
try {
|
|
||||||
return (Point) WKT_READER.read(value);
|
|
||||||
} catch (ParseException e) {
|
|
||||||
// 2. 如果失败,尝试解析 PG 原生格式 "(x,y)"
|
|
||||||
// PG 原生格式不是标准 WKT,WKTReader 会报错,进入这里
|
|
||||||
if (value.startsWith("(") && value.endsWith(")")) {
|
|
||||||
try {
|
|
||||||
String content = value.substring(1, value.length() - 1);
|
|
||||||
String[] parts = content.split(",");
|
|
||||||
if (parts.length == 2) {
|
|
||||||
double x = Double.parseDouble(parts[0].trim());
|
|
||||||
double y = Double.parseDouble(parts[1].trim());
|
|
||||||
return FACTORY.createPoint(new Coordinate(x, y));
|
|
||||||
}
|
|
||||||
} catch (NumberFormatException ex) {
|
|
||||||
throw new SQLException("Invalid Point format: " + value, ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
throw new SQLException("Failed to parse Point: " + value, e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
package org.springblade.common.handler;
|
|
||||||
|
|
||||||
import org.apache.ibatis.type.BaseTypeHandler;
|
|
||||||
import org.apache.ibatis.type.JdbcType;
|
|
||||||
import org.apache.ibatis.type.MappedJdbcTypes;
|
|
||||||
import org.apache.ibatis.type.MappedTypes;
|
|
||||||
|
|
||||||
import java.sql.*;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@MappedJdbcTypes(JdbcType.ARRAY)
|
|
||||||
@MappedTypes(List.class)
|
|
||||||
public class PgLongArrayToListTypeHandler extends BaseTypeHandler<List<Long>> {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setNonNullParameter(PreparedStatement ps, int i, List<Long> parameter, JdbcType jdbcType) throws SQLException {
|
|
||||||
// 将 List<Long> 转换为 PostgreSQL 的 bigint[]
|
|
||||||
Array array = ps.getConnection().createArrayOf("bigint", parameter.toArray());
|
|
||||||
ps.setArray(i, array);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<Long> getNullableResult(ResultSet rs, String columnName) throws SQLException {
|
|
||||||
// 从 ResultSet 中读取数组并转换为 List<Long>
|
|
||||||
Array array = rs.getArray(columnName);
|
|
||||||
if (array == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return Arrays.asList((Long[]) array.getArray());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<Long> getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
|
|
||||||
// 从 ResultSet 中按列索引读取数组并转换为 List<Long>
|
|
||||||
Array array = rs.getArray(columnIndex);
|
|
||||||
if (array == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return Arrays.asList((Long[]) array.getArray());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<Long> getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
|
|
||||||
// 从 CallableStatement 中读取数组并转换为 List<Long>
|
|
||||||
Array array = cs.getArray(columnIndex);
|
|
||||||
if (array == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return Arrays.asList((Long[]) array.getArray());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
package org.springblade.common.handler;
|
|
||||||
|
|
||||||
import org.apache.ibatis.type.BaseTypeHandler;
|
|
||||||
import org.apache.ibatis.type.JdbcType;
|
|
||||||
import org.apache.ibatis.type.MappedJdbcTypes;
|
|
||||||
import org.apache.ibatis.type.MappedTypes;
|
|
||||||
|
|
||||||
import java.sql.*;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
@MappedJdbcTypes(JdbcType.ARRAY)
|
|
||||||
@MappedTypes(List.class)
|
|
||||||
public class PgStringArrayToListTypeHandler extends BaseTypeHandler<List<String>> {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setNonNullParameter(PreparedStatement ps, int i, List<String> parameter, JdbcType jdbcType) throws SQLException {
|
|
||||||
Array array = ps.getConnection().createArrayOf("text", parameter.toArray());
|
|
||||||
ps.setArray(i, array);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<String> getNullableResult(ResultSet rs, String columnName) throws SQLException {
|
|
||||||
Array array = rs.getArray(columnName);
|
|
||||||
if (array == null) return Collections.emptyList(); // 返回空列表而非 null
|
|
||||||
return Arrays.asList((String[]) array.getArray());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<String> getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
|
|
||||||
return parseArray(rs.getArray(columnIndex));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<String> getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
|
|
||||||
return parseArray(cs.getArray(columnIndex));
|
|
||||||
}
|
|
||||||
|
|
||||||
private List<String> parseArray(Array array) throws SQLException {
|
|
||||||
if (array == null) return null;
|
|
||||||
Object[] objects = (Object[]) array.getArray();
|
|
||||||
return Arrays.stream(objects)
|
|
||||||
.map(Object::toString)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
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,94 +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.utils;
|
|
||||||
|
|
||||||
import org.springblade.core.tool.utils.RegexUtil;
|
|
||||||
import org.springblade.core.tool.utils.StringUtil;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通用工具类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
public class CommonUtil {
|
|
||||||
|
|
||||||
public static boolean isValidChineseName(String name) {
|
|
||||||
if (StringUtil.isBlank(name)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
String trimmed = name.trim();
|
|
||||||
// 长度限制:2-20个字符(覆盖绝大多数姓名)
|
|
||||||
if (trimmed.length() < 2 || trimmed.length() > 20) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return RegexUtil.match("^[\\u4e00-\\u9fa5]+(?:[·\\u00B7\\u2027][\\u4e00-\\u9fa5]+)*$", trimmed);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isValidIdCard(String idCard) {
|
|
||||||
if (StringUtil.isBlank(idCard)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
String trimmed = idCard.trim();
|
|
||||||
return RegexUtil.match(RegexUtil.ID_CARD, trimmed);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isValidMobile(String mobile) {
|
|
||||||
if (StringUtil.isBlank(mobile)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
String trimmed = mobile.trim();
|
|
||||||
return RegexUtil.match(RegexUtil.PHONE, trimmed);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isValidBankCard(String cardNo) {
|
|
||||||
String clean = cardNo.replaceAll("[\\s-]", "");
|
|
||||||
if (!clean.matches("^[1-9]\\d{12,18}$")) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return luhnCheck(clean);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String currentCardNumber(String cardNo) {
|
|
||||||
return cardNo.replaceAll("[\\s-]", "");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private static boolean luhnCheck(String cardNo) {
|
|
||||||
int sum = 0;
|
|
||||||
boolean doubleDigit = false; // 从右往左,第二位开始标记
|
|
||||||
for (int i = cardNo.length() - 1; i >= 0; i--) {
|
|
||||||
int digit = Character.getNumericValue(cardNo.charAt(i));
|
|
||||||
if (doubleDigit) {
|
|
||||||
digit *= 2;
|
|
||||||
digit = digit > 9 ? digit - 9 : digit;
|
|
||||||
}
|
|
||||||
sum += digit;
|
|
||||||
doubleDigit = !doubleDigit; // 切换标记
|
|
||||||
}
|
|
||||||
return sum % 10 == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
package org.springblade.common.utils;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
public class IdCardValidatorUtil {
|
|
||||||
|
|
||||||
private static final Pattern REGEX_18 = Pattern.compile("^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[\\dXx]$");
|
|
||||||
|
|
||||||
// 加权因子
|
|
||||||
private static final int[] WEIGHTS = {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2};
|
|
||||||
// 校验码映射
|
|
||||||
private static final String[] CHECK_CODES = {"1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"};
|
|
||||||
|
|
||||||
public static Boolean validateIdCard(String idCard) {
|
|
||||||
if (StringUtils.isBlank(idCard)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 1. 格式初筛 (15位直接淘汰,只留18位)
|
|
||||||
if (!REGEX_18.matcher(idCard).matches()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2. 核心算法校验 (校验最后一位是否正确)
|
|
||||||
return verifyCheckSum(idCard.toUpperCase());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ISO 7064:1983.MOD 11-2 校验算法
|
|
||||||
*/
|
|
||||||
private static boolean verifyCheckSum(String idCard) {
|
|
||||||
int sum = 0;
|
|
||||||
// 只取前17位进行计算
|
|
||||||
for (int i = 0; i < 17; i++) {
|
|
||||||
int digit = Character.getNumericValue(idCard.charAt(i));
|
|
||||||
if (digit < 0 || digit > 9) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
sum += digit * WEIGHTS[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
int mod = sum % 11;
|
|
||||||
String expectedCheckCode = CHECK_CODES[mod];
|
|
||||||
String actualCheckCode = String.valueOf(idCard.charAt(17));
|
|
||||||
|
|
||||||
return expectedCheckCode.equals(actualCheckCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
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,7 +1,6 @@
|
|||||||
package org.springblade.common.utils.date;
|
package org.springblade.common.utils.date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
@@ -22,6 +21,9 @@ public class DateUtil {
|
|||||||
private static final ThreadLocal<SimpleDateFormat> SIMPLE_DATE_FORMAT = ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
|
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 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";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算天数
|
* 计算天数
|
||||||
@@ -433,5 +435,4 @@ public class DateUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
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";
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,155 @@
|
|||||||
|
/**
|
||||||
|
* 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("删除任务成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user