13 Commits

Author SHA1 Message Date
lzqadmin
0d4beedb1d 1 2026-02-05 09:40:40 +08:00
lzqadmin
225b8cabee 1 2026-02-04 16:52:00 +08:00
lzqadmin
c0acba8180 1 2026-02-03 22:05:39 +08:00
lzqadmin
d53e286b7e 1 2026-02-03 21:39:29 +08:00
lzqadmin
b0fd44e8e1 去除blade_user 新增的字段 2026-02-03 20:55:13 +08:00
lzqadmin
2aa351e43c 将bigint 修改成 int8 2026-02-03 20:46:49 +08:00
a22f698620 Merge remote-tracking branch 'origin/main' 2026-02-03 20:15:49 +08:00
9a4fb743a7 update:
1. modify application.yml
2026-02-03 20:15:40 +08:00
lzqadmin
84b0c166f2 优化sql脚本执行顺序 2026-02-03 19:59:03 +08:00
lzqadmin
e4dfe062d5 优化sql脚本执行顺序 2026-02-03 19:58:34 +08:00
lzqadmin
849cf4c03e 轮播图和用户消息 2026-02-03 18:09:03 +08:00
lzqadmin
8efaf2e92f boot代码 2026-02-02 13:59:15 +08:00
lzqadmin
cd88956a43 boot代码 2026-02-02 13:59:06 +08:00
609 changed files with 45673 additions and 487 deletions

View File

@@ -1,8 +1,8 @@
create table aliyun_certify create table aliyun_certify
( (
id bigint not null primary key, id int8 not null primary key,
user_id bigint not null, user_id int8 not null,
user_phone bigint, user_phone int8,
name varchar(128) null, name varchar(128) null,
id_card varchar(128) null, id_card varchar(128) null,
certify_id varchar(64) null, certify_id varchar(64) null,

View 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 '是否已删除';

View File

@@ -1,6 +1,6 @@
CREATE TABLE mall_spu CREATE TABLE mall_spu
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
spu_sn VARCHAR(255) DEFAULT '' NOT NULL, spu_sn VARCHAR(255) DEFAULT '' NOT NULL,
spu_name VARCHAR(255) DEFAULT '' NOT NULL, spu_name VARCHAR(255) DEFAULT '' NOT NULL,
main_img VARCHAR(255) DEFAULT '' NOT NULL, main_img VARCHAR(255) DEFAULT '' NOT NULL,
@@ -53,27 +53,47 @@ COMMENT ON COLUMN mall_spu.is_deleted IS '是否已删除';
CREATE TABLE ys_category CREATE TABLE ys_category
( (
id BIGINT NOT NULL PRIMARY KEY, id INTEGER NOT NULL PRIMARY KEY,
cname VARCHAR(100) DEFAULT '' NOT NULL, cname VARCHAR(100) DEFAULT '' NOT NULL,
pid BIGINT DEFAULT 0 NOT NULL, pid int8 DEFAULT 0 NOT NULL,
level INTEGER 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 TABLE ys_category IS '商品分类';
COMMENT ON COLUMN ys_category.id IS '主键'; COMMENT ON COLUMN ys_category.id IS '主键';
COMMENT ON COLUMN ys_category.cname IS '分类名称'; COMMENT ON COLUMN ys_category.cname IS '分类名称';
COMMENT ON COLUMN ys_category.pid IS 'pid'; COMMENT ON COLUMN ys_category.pid IS 'pid';
COMMENT ON COLUMN ys_category.level IS 'level'; 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 CREATE TABLE mall_cart
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
user_id BIGINT DEFAULT 0 NOT NULL, user_id int8 DEFAULT 0 NOT NULL,
title VARCHAR(200) DEFAULT '' NOT NULL, title VARCHAR(200) DEFAULT '' NOT NULL,
spu_id INTEGER DEFAULT 0 NOT NULL, spu_id int8 DEFAULT 0 NOT NULL,
quantity INTEGER 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_user int8 NULL,
create_dept int8 NULL, create_dept int8 NULL,
create_time TIMESTAMP NULL, create_time TIMESTAMP NULL,
@@ -90,6 +110,9 @@ COMMENT ON COLUMN mall_cart.user_id IS '用户id';
COMMENT ON COLUMN mall_cart.title IS '商品名称'; COMMENT ON COLUMN mall_cart.title IS '商品名称';
COMMENT ON COLUMN mall_cart.spu_id IS 'spuId'; COMMENT ON COLUMN mall_cart.spu_id IS 'spuId';
COMMENT ON COLUMN mall_cart.quantity IS '数量'; 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_user IS '创建人';
COMMENT ON COLUMN mall_cart.create_dept IS '创建部门'; COMMENT ON COLUMN mall_cart.create_dept IS '创建部门';
COMMENT ON COLUMN mall_cart.create_time IS '创建时间'; COMMENT ON COLUMN mall_cart.create_time IS '创建时间';
@@ -103,9 +126,9 @@ CREATE INDEX idx_user_id ON mall_cart (user_id);
CREATE TABLE user_address CREATE TABLE user_address
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
user_id BIGINT NULL, user_id int8 NULL,
regions_info_id BIGINT NULL, regions_info_id int8 NULL,
province VARCHAR(200) NULL, province VARCHAR(200) NULL,
city VARCHAR(200) NULL, city VARCHAR(200) NULL,
district VARCHAR(200) NULL, district VARCHAR(200) NULL,

View File

@@ -1,9 +1,11 @@
CREATE TABLE user_order CREATE TABLE user_order
( (
id BIGINT DEFAULT 0 NOT NULL PRIMARY KEY, id int8 DEFAULT 0 NOT NULL PRIMARY KEY,
user_id BIGINT DEFAULT 0 NOT NULL, user_id int8 DEFAULT 0 NOT NULL,
user_phone int8,
user_name varchar(128),
order_type INTEGER DEFAULT 0 NOT NULL, order_type INTEGER DEFAULT 0 NOT NULL,
order_id BIGINT DEFAULT 0 NOT NULL, order_id int8 DEFAULT 0 NOT NULL,
title VARCHAR(256) DEFAULT '' NOT NULL, title VARCHAR(256) DEFAULT '' NOT NULL,
images VARCHAR(512) NULL, images VARCHAR(512) NULL,
quantity INTEGER NULL, quantity INTEGER NULL,
@@ -27,6 +29,8 @@ CREATE TABLE user_order
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.user_phone IS '用户手机号';
COMMENT ON COLUMN user_order.user_name IS '用户名称';
COMMENT ON COLUMN user_order.order_type IS '订单类型'; COMMENT ON COLUMN user_order.order_type IS '订单类型';
COMMENT ON COLUMN user_order.order_id IS '订单id'; COMMENT ON COLUMN user_order.order_id IS '订单id';
COMMENT ON COLUMN user_order.title IS '订单名称'; COMMENT ON COLUMN user_order.title IS '订单名称';
@@ -72,13 +76,15 @@ CREATE INDEX user_order_index ON user_order (user_id, order_type);
CREATE TABLE mall_summary_order CREATE TABLE mall_summary_order
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
user_id BIGINT DEFAULT 0 NOT NULL, user_id int8 DEFAULT 0 NOT NULL,
user_phone int8,
user_name varchar(128),
products_info text NULL, products_info text NULL,
order_info text NULL, order_info text NULL,
confirm_info text NULL, confirm_info text NULL,
vendor_regions_id BIGINT NOT NULL, vendor_regions_id int8 NOT NULL,
address_id BIGINT NOT NULL, address_id int8 NOT NULL,
delivery_info text NULL, delivery_info text NULL,
freight_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL, freight_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
cost_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL, cost_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
@@ -96,8 +102,10 @@ CREATE TABLE mall_summary_order
give_token DECIMAL(10, 2) NULL, give_token DECIMAL(10, 2) NULL,
actual_give_token DECIMAL(10, 2) NULL, actual_give_token DECIMAL(10, 2) NULL,
is_royalty INTEGER DEFAULT 0 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 BIGINT DEFAULT 0 NULL, version int8 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,
@@ -111,6 +119,8 @@ CREATE TABLE mall_summary_order
COMMENT ON TABLE mall_summary_order IS '商城汇总订单'; COMMENT ON TABLE mall_summary_order IS '商城汇总订单';
COMMENT ON COLUMN mall_summary_order.id IS '主键'; COMMENT ON COLUMN mall_summary_order.id IS '主键';
COMMENT ON COLUMN mall_summary_order.user_id IS '用户id'; COMMENT ON COLUMN mall_summary_order.user_id IS '用户id';
COMMENT ON COLUMN mall_summary_order.user_phone IS '用户手机号';
COMMENT ON COLUMN mall_summary_order.user_name IS '用户名称';
COMMENT ON COLUMN mall_summary_order.products_info IS '商品信息'; COMMENT ON COLUMN mall_summary_order.products_info IS '商品信息';
COMMENT ON COLUMN mall_summary_order.order_info IS '订单信息'; COMMENT ON COLUMN mall_summary_order.order_info IS '订单信息';
COMMENT ON COLUMN mall_summary_order.confirm_info IS '订单确认信息'; COMMENT ON COLUMN mall_summary_order.confirm_info IS '订单确认信息';
@@ -136,7 +146,9 @@ 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.give_token IS '赠送积分';
COMMENT ON COLUMN mall_summary_order.actual_give_token IS '实际赠送扣分'; COMMENT ON COLUMN mall_summary_order.actual_give_token IS '实际赠送扣分';
COMMENT ON COLUMN mall_summary_order.is_royalty IS '是否已经给上级分红'; COMMENT ON COLUMN mall_summary_order.is_royalty IS '是否已经给上级分红 0=否,1=是';
COMMENT ON COLUMN mall_summary_order.is_recorded IS '是否记录资金账户里 0=否,1=是';
COMMENT ON COLUMN mall_summary_order.is_statistics IS '是否统计到用户现金业绩里 0=否,1=是';
COMMENT ON COLUMN mall_summary_order.remarks IS '备注'; COMMENT ON COLUMN mall_summary_order.remarks IS '备注';
COMMENT ON COLUMN mall_summary_order.status IS '状态'; COMMENT ON COLUMN mall_summary_order.status IS '状态';
COMMENT ON COLUMN mall_summary_order.is_deleted IS '是否已删除'; COMMENT ON COLUMN mall_summary_order.is_deleted IS '是否已删除';
@@ -144,15 +156,19 @@ COMMENT ON COLUMN mall_summary_order.is_deleted IS '是否已删除';
CREATE INDEX mso_index ON mall_summary_order (user_id); CREATE INDEX mso_index ON mall_summary_order (user_id);
CREATE INDEX mso_status_index ON mall_summary_order (payment_status, status); CREATE INDEX mso_status_index ON mall_summary_order (payment_status, status);
CREATE INDEX mso_recorded_index ON mall_summary_order (payment_status, is_recorded);
CREATE INDEX mso_statistics_index ON mall_summary_order (payment_status, is_statistics);
CREATE TABLE mall_detail_order CREATE TABLE mall_detail_order
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
user_id BIGINT DEFAULT 0 NOT NULL, user_id int8 DEFAULT 0 NOT NULL,
summary_order_id BIGINT DEFAULT 0 NOT NULL, user_phone int8,
spu_id BIGINT DEFAULT 0 NOT NULL, user_name varchar(128),
summary_order_id int8 DEFAULT 0 NOT NULL,
spu_id int8 DEFAULT 0 NOT NULL,
quantity INTEGER DEFAULT 0 NOT NULL, quantity INTEGER DEFAULT 0 NOT NULL,
sku_snapshot text NULL, sku_snapshot text NULL,
actual_cost_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL, actual_cost_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
@@ -162,6 +178,10 @@ CREATE TABLE mall_detail_order
given_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 INTEGER DEFAULT 0 NOT NULL, order_status INTEGER DEFAULT 0 NOT NULL,
freight VARCHAR(200) DEFAULT 0.00 NOT NULL,
logistics VARCHAR(200) DEFAULT 0.00 NOT NULL,
delivery_time timestamp(6),
products_info text NULL,
version integer DEFAULT 0 NULL, version integer DEFAULT 0 NULL,
create_user int8 NULL, create_user int8 NULL,
create_dept int8 NULL, create_dept int8 NULL,
@@ -175,10 +195,11 @@ CREATE TABLE mall_detail_order
COMMENT ON TABLE mall_detail_order IS '商城详情订单'; COMMENT ON TABLE mall_detail_order IS '商城详情订单';
COMMENT ON COLUMN mall_detail_order.id IS '主键'; COMMENT ON COLUMN mall_detail_order.id IS '主键';
COMMENT ON COLUMN mall_detail_order.user_id IS '用户id'; COMMENT ON COLUMN mall_detail_order.user_id IS '用户id';
COMMENT ON COLUMN mall_detail_order.user_phone IS '用户手机号';
COMMENT ON COLUMN mall_detail_order.user_name IS '用户名称';
COMMENT ON COLUMN mall_detail_order.summary_order_id IS '主订单id'; COMMENT ON COLUMN mall_detail_order.summary_order_id IS '主订单id';
COMMENT ON COLUMN mall_detail_order.spu_id IS '商品id'; COMMENT ON COLUMN mall_detail_order.spu_id IS '商品id';
COMMENT ON COLUMN mall_detail_order.quantity IS '数量'; COMMENT ON COLUMN mall_detail_order.quantity IS '数量';
COMMENT ON COLUMN mall_detail_order.summary_order_id IS '主订单id';
COMMENT ON COLUMN mall_detail_order.spu_id IS '商品id'; COMMENT ON COLUMN mall_detail_order.spu_id IS '商品id';
COMMENT ON COLUMN mall_detail_order.quantity IS '数量'; COMMENT ON COLUMN mall_detail_order.quantity IS '数量';
COMMENT ON COLUMN mall_detail_order.sku_snapshot IS '商品快照'; COMMENT ON COLUMN mall_detail_order.sku_snapshot IS '商品快照';
@@ -189,9 +210,9 @@ 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.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.given_amount IS '赠送积分'; COMMENT ON COLUMN mall_detail_order.logistics IS '物流';
COMMENT ON COLUMN mall_detail_order.remarks IS '备注'; COMMENT ON COLUMN mall_detail_order.products_info IS '商品信息';
COMMENT ON COLUMN mall_detail_order.remarks IS '备注'; COMMENT ON COLUMN mall_detail_order.freight IS '运费';
COMMENT ON COLUMN mall_detail_order.order_status IS '订单状态 0=失败,1=待确认,2=待发货,3=待收货,4=已完成,5=已取消,6=售后中,7=已完结'; COMMENT ON COLUMN mall_detail_order.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.status IS '状态';
COMMENT ON COLUMN mall_detail_order.is_deleted IS '是否已删除'; COMMENT ON COLUMN mall_detail_order.is_deleted IS '是否已删除';
@@ -204,11 +225,13 @@ CREATE INDEX mdo_uid_index ON mall_detail_order (user_id);
CREATE TABLE mall_summary_order_after CREATE TABLE mall_summary_order_after
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
user_id BIGINT DEFAULT -1 NOT NULL, user_id int8 DEFAULT -1 NOT NULL,
summary_order_id BIGINT DEFAULT -1 NOT NULL, user_phone int8,
goods_id BIGINT DEFAULT -1 NOT NULL, user_name varchar(128),
sku_id BIGINT NOT NULL, summary_order_id int8 DEFAULT -1 NOT NULL,
goods_id int8 DEFAULT -1 NOT NULL,
sku_id int8 NOT NULL,
goods_name VARCHAR(256) NOT NULL, goods_name VARCHAR(256) NOT NULL,
third_plat_order_no VARCHAR(32) NOT NULL, third_plat_order_no VARCHAR(32) NOT NULL,
third_plat_after_no VARCHAR(32) NOT NULL, third_plat_after_no VARCHAR(32) NOT NULL,
@@ -238,6 +261,8 @@ CREATE TABLE mall_summary_order_after
COMMENT ON TABLE mall_summary_order_after IS '商品售后订单表'; COMMENT ON TABLE mall_summary_order_after IS '商品售后订单表';
COMMENT ON COLUMN mall_summary_order_after.id IS '售后订单号'; COMMENT ON COLUMN mall_summary_order_after.id IS '售后订单号';
COMMENT ON COLUMN mall_summary_order_after.user_id IS '用户id'; COMMENT ON COLUMN mall_summary_order_after.user_id IS '用户id';
COMMENT ON COLUMN mall_summary_order_after.user_phone IS '用户手机号';
COMMENT ON COLUMN mall_summary_order_after.user_name IS '用户名称';
COMMENT ON COLUMN mall_summary_order_after.summary_order_id IS '总订单id'; COMMENT ON COLUMN mall_summary_order_after.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 '商品订单号';

View File

@@ -1,8 +1,8 @@
CREATE TABLE registration_order CREATE TABLE registration_order
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
spu_id BIGINT NULL, spu_id int8 NULL,
sku_id BIGINT NULL, sku_id int8 NULL,
title VARCHAR(100) NOT NULL, title VARCHAR(100) NOT NULL,
transaction_type INTEGER NOT NULL, transaction_type INTEGER NOT NULL,
thumbnail VARCHAR(500) NOT NULL, thumbnail VARCHAR(500) NOT NULL,
@@ -12,7 +12,7 @@ CREATE TABLE registration_order
points DECIMAL(10, 2) NOT NULL, points DECIMAL(10, 2) NOT NULL,
quantity INTEGER NOT NULL, quantity INTEGER NOT NULL,
remaining INTEGER NOT NULL, remaining INTEGER NOT NULL,
user_id BIGINT NOT NULL, user_id int8 NOT NULL,
user_nickname VARCHAR(100) NULL, user_nickname VARCHAR(100) NULL,
in_transaction INTEGER DEFAULT 0 NOT NULL, in_transaction INTEGER DEFAULT 0 NOT NULL,
is_full_package INTEGER DEFAULT 0 NOT NULL, is_full_package INTEGER DEFAULT 0 NOT NULL,
@@ -76,9 +76,9 @@ COMMENT ON COLUMN registration_order.is_priority IS '是否优先';
CREATE TABLE transaction_order CREATE TABLE transaction_order
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
registration_id BIGINT NOT NULL, registration_id int8 NOT NULL,
sku_id BIGINT NULL, sku_id int8 NULL,
title VARCHAR(100) NOT NULL, title VARCHAR(100) NOT NULL,
transaction_type INTEGER NOT NULL, transaction_type INTEGER NOT NULL,
thumbnail VARCHAR(500) NOT NULL, thumbnail VARCHAR(500) NOT NULL,
@@ -87,7 +87,7 @@ CREATE TABLE transaction_order
quantity INTEGER NOT NULL, quantity INTEGER NOT NULL,
total_amount DECIMAL(10, 2) NOT NULL, total_amount DECIMAL(10, 2) NOT NULL,
total_points DECIMAL(10, 2) NOT NULL, total_points DECIMAL(10, 2) NOT NULL,
user_id BIGINT NOT NULL, user_id int8 NOT NULL,
user_nickname VARCHAR(500) NULL, user_nickname VARCHAR(500) NULL,
payment_voucher VARCHAR(500) NULL, payment_voucher VARCHAR(500) NULL,
delivery_voucher VARCHAR(500) NULL, delivery_voucher VARCHAR(500) NULL,
@@ -97,7 +97,7 @@ CREATE TABLE transaction_order
receiver_address VARCHAR(100) NULL, receiver_address VARCHAR(100) NULL,
contact VARCHAR(100) NULL, contact VARCHAR(100) NULL,
contact_number VARCHAR(100) NULL, contact_number VARCHAR(100) NULL,
counterparty_order_id BIGINT DEFAULT 0 NOT NULL, counterparty_order_id int8 DEFAULT 0 NOT NULL,
is_virtual INTEGER DEFAULT 0 NOT NULL, is_virtual INTEGER DEFAULT 0 NOT NULL,
supplier_order_sn VARCHAR(100) NULL, supplier_order_sn VARCHAR(100) NULL,
expire_time TIMESTAMP NULL, expire_time TIMESTAMP NULL,
@@ -146,16 +146,16 @@ COMMENT ON COLUMN transaction_order.is_deleted IS '是否已删除';
CREATE TABLE user_inventory CREATE TABLE user_inventory
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
user_id BIGINT NOT NULL, user_id int8 NOT NULL,
sku_id BIGINT NOT NULL, sku_id int8 NOT NULL,
title VARCHAR(100) NOT NULL, title VARCHAR(100) NOT NULL,
thumbnail VARCHAR(500) NOT NULL, thumbnail VARCHAR(500) NOT NULL,
price DECIMAL(10, 2) NOT NULL, price DECIMAL(10, 2) NOT NULL,
quantity INTEGER NOT NULL, quantity INTEGER NOT NULL,
is_virtual INTEGER DEFAULT 0 NOT NULL, is_virtual INTEGER DEFAULT 0 NOT NULL,
attribute JSON NULL, attribute JSON NULL,
version BIGINT DEFAULT 0 NOT NULL, version int8 DEFAULT 0 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,
@@ -187,7 +187,7 @@ COMMENT ON COLUMN user_inventory.is_deleted IS '是否已删除';
CREATE TABLE calendar_non_working CREATE TABLE calendar_non_working
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
off_date DATE NOT NULL, off_date DATE NOT NULL,
remark VARCHAR(200) NULL, remark VARCHAR(200) NULL,
create_user int8 NULL, create_user int8 NULL,
@@ -215,8 +215,8 @@ COMMENT ON COLUMN calendar_non_working.is_deleted IS '是否已删除';
CREATE TABLE user_otc_info CREATE TABLE user_otc_info
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
user_id BIGINT NOT NULL, user_id int8 NOT NULL,
alipay_account VARCHAR(200) NULL, alipay_account VARCHAR(200) NULL,
wechat_account VARCHAR(200) NULL, wechat_account VARCHAR(200) NULL,
alipay_qr_code VARCHAR(200) NULL, alipay_qr_code VARCHAR(200) NULL,

View File

@@ -8,12 +8,19 @@ CREATE TABLE regions_info
lat DECIMAL(10, 6) NULL, lat DECIMAL(10, 6) NULL,
region_code VARCHAR(128) NULL, region_code VARCHAR(128) NULL,
full_name VARCHAR(200) NULL, full_name VARCHAR(200) NULL,
vendor_region_id BIGINT NULL, vendor_region_id int8 NULL,
store_city_id BIGINT NULL, store_city_id int8 NULL,
hotel_city_code VARCHAR(128) NULL, hotel_city_code VARCHAR(128) NULL,
hotel_city_pinyin VARCHAR(128) NULL, hotel_city_pinyin VARCHAR(128) NULL,
hotel_city_initials VARCHAR(4) NULL, hotel_city_initials VARCHAR(4) NULL,
sight_city_name VARCHAR(32) 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 TABLE regions_info IS '地区详情表';
@@ -31,4 +38,11 @@ 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_pinyin IS '酒店地区拼音';
COMMENT ON COLUMN regions_info.hotel_city_initials IS '酒店地区拼音首字母'; COMMENT ON COLUMN regions_info.hotel_city_initials IS '酒店地区拼音首字母';
COMMENT ON COLUMN regions_info.sight_city_name 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 '状态';

View File

@@ -1,20 +1,21 @@
CREATE TABLE user_daily_sign CREATE TABLE user_daily_sign
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
user_id BIGINT NULL, user_id int8 NULL,
user_phone bigint, user_phone int8,
user_name varchar(128), user_name varchar(128),
statistics_date DATE NULL, statistics_date DATE NULL,
sign_count INTEGER NULL, sign_count INTEGER NULL,
type INTEGER DEFAULT 1 NULL, type INTEGER DEFAULT 1 NULL,
remarks TEXT NULL, remarks TEXT NULL,
is_complete INTEGER DEFAULT 0 NULL,
is_deleted INTEGER DEFAULT 0 NULL, is_deleted INTEGER DEFAULT 0 NULL,
create_time TIMESTAMP(6) NULL, create_time TIMESTAMP(6) NULL,
create_user int8 NULL, create_user int8 NULL,
update_time TIMESTAMP(6) NULL, update_time TIMESTAMP(6) NULL,
update_user int8 NULL, update_user int8 NULL,
status INTEGER NULL, status INTEGER NULL,
create_dept BIGINT NULL create_dept int8 NULL
); );
COMMENT ON TABLE user_daily_sign IS '用户看广告记录表'; COMMENT ON TABLE user_daily_sign IS '用户看广告记录表';
@@ -24,6 +25,7 @@ COMMENT ON COLUMN user_daily_sign.user_name IS '用户名称';
COMMENT ON COLUMN user_daily_sign.statistics_date 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.sign_count IS '看广告统计';
COMMENT ON COLUMN user_daily_sign.type IS '广告类型 1-积分分产出'; 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.remarks IS '备注';
comment on column user_daily_sign.create_user 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_dept is '创建部门';
@@ -36,6 +38,9 @@ comment on column user_daily_sign.is_deleted is '是否已删除';
CREATE INDEX uds_date_index CREATE INDEX uds_date_index
ON user_daily_sign (is_deleted, type, statistics_date); 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 CREATE INDEX uds_uid_index
ON user_daily_sign (is_deleted, type, user_id, statistics_date); ON user_daily_sign (is_deleted, type, user_id, statistics_date);
@@ -43,7 +48,7 @@ CREATE INDEX uds_uid_index
CREATE TABLE ads CREATE TABLE ads
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
name VARCHAR(255) NULL, name VARCHAR(255) NULL,
url VARCHAR(255) NULL, url VARCHAR(255) NULL,
sort INTEGER DEFAULT 1, sort INTEGER DEFAULT 1,

View File

@@ -1,16 +1,21 @@
create table user_genealogy create table user_genealogy
( (
id bigint not null primary key, id int8 not null primary key,
name varchar(128), name varchar(128),
phone bigint, phone int8,
level integer default 1, --当前层数 level integer default 1, --当前层数
pid bigint, pid int8,
root_id bigint, --遍历当前树 p_name varchar(128),
group_id bigint, --树内最近团队长的id p_phone int8,
genealogy_list bigint[], -- 往上所有父级 root_id int8, --遍历当前树
group_id int8, --树内最近团队长的id
genealogy_list int8[], -- 往上所有父级
user_child_number int, --用户下线总人数 user_child_number int, --用户下线总人数
user_direct_number int, --用户直推总人数 user_direct_number int, --用户直推总人数
user_direct_list bigint[], --直推列表 user_direct_list int8[], --直推列表
is_revoked integer default 0, --是否注销 0-否 1-是
register_date date, -- 注册时间
remark text,
create_user int8, create_user int8,
create_dept int8, create_dept int8,
create_time timestamp(6), create_time timestamp(6),
@@ -26,13 +31,18 @@ CREATE INDEX user_direct_list_gin_idx
ON user_genealogy USING gin (user_direct_list); ON user_genealogy USING gin (user_direct_list);
create index user_genealogy_phone_index create index user_genealogy_phone_index
on user_genealogy (is_deleted, phone); on user_genealogy (is_deleted, phone , is_revoked);
create index user_genealogy_register_date_index
on user_genealogy (is_deleted, register_date);
comment on table user_genealogy is '用户族谱表'; comment on table user_genealogy is '用户族谱表';
comment on column user_genealogy.id is '主键'; comment on column user_genealogy.id is '主键';
comment on column user_genealogy.pid is '上级id'; comment on column user_genealogy.pid is '上级id';
comment on column user_genealogy.name is '用户名'; comment on column user_genealogy.name is '用户名';
comment on column user_genealogy.phone is '手机号'; comment on column user_genealogy.phone is '手机号';
comment on column user_genealogy.p_name is '上级用户名';
comment on column user_genealogy.p_phone is '上级用户手机号';
comment on column user_genealogy.level is '层级'; comment on column user_genealogy.level is '层级';
comment on column user_genealogy.root_id is '根节点id'; comment on column user_genealogy.root_id is '根节点id';
comment on column user_genealogy.group_id is '团队长id'; comment on column user_genealogy.group_id is '团队长id';
@@ -40,6 +50,8 @@ comment on column user_genealogy.genealogy_list is '族谱列表';
comment on column user_genealogy.user_child_number is '用户下线总人数'; comment on column user_genealogy.user_child_number is '用户下线总人数';
comment on column user_genealogy.user_direct_number is '用户直推总人数'; comment on column user_genealogy.user_direct_number is '用户直推总人数';
comment on column user_genealogy.user_direct_list is '直推列表'; comment on column user_genealogy.user_direct_list is '直推列表';
comment on column user_genealogy.is_revoked is '是否注销 0-否 1-是';
comment on column user_genealogy.register_date is '注册时间';
comment on column user_genealogy.create_user is '创建人'; comment on column user_genealogy.create_user is '创建人';
comment on column user_genealogy.create_dept is '创建部门'; comment on column user_genealogy.create_dept is '创建部门';
comment on column user_genealogy.create_time is '创建时间'; comment on column user_genealogy.create_time is '创建时间';
@@ -54,14 +66,17 @@ alter table user_genealogy
create table user_tree create table user_tree
( (
id bigint not null primary key, id int8 not null primary key,
name varchar(128), name varchar(128),
phone bigint, phone int8,
level integer default 1, level integer default 1,
pid bigint, pid int8,
p_name varchar(128), p_name varchar(128),
p_phone bigint, p_phone int8,
p_level integer default 1, p_level integer default 1,
is_revoked integer default 0, --是否撤销 0-否 1-是
is_sync_genealogy integer default 0, --是否同步族谱 0-否 1-是
register_date date, -- 注册时间
create_user int8, create_user int8,
create_dept int8, create_dept int8,
create_time timestamp(6), create_time timestamp(6),
@@ -75,6 +90,13 @@ create table user_tree
create index user_tree_phone_index create index user_tree_phone_index
on user_tree (is_deleted, phone); on user_tree (is_deleted, phone);
create index user_tree_sync_genealogy_index
on user_tree (is_deleted, is_sync_genealogy);
create index user_tree_register_date_index
on user_tree (is_deleted, register_date);
comment on table user_tree is '用户树结构表'; comment on table user_tree is '用户树结构表';
comment on column user_tree.id is '主键'; comment on column user_tree.id is '主键';
comment on column user_tree.pid is '上级id'; comment on column user_tree.pid is '上级id';
@@ -84,6 +106,9 @@ comment on column user_tree.level is '层级';
comment on column user_tree.p_name is '上级用户名'; comment on column user_tree.p_name is '上级用户名';
comment on column user_tree.p_phone is '上级用户手机号'; comment on column user_tree.p_phone is '上级用户手机号';
comment on column user_tree.p_level is '上级用户层级'; comment on column user_tree.p_level is '上级用户层级';
comment on column user_tree.is_revoked is '是否注销 0-否 1-是';
comment on column user_tree.is_sync_genealogy is '是否同步族谱 0-否 1-是';
comment on column user_tree.register_date is '注册时间';
comment on column user_tree.create_user is '创建人'; comment on column user_tree.create_user is '创建人';
comment on column user_tree.create_dept is '创建部门'; comment on column user_tree.create_dept is '创建部门';
comment on column user_tree.create_time is '创建时间'; comment on column user_tree.create_time is '创建时间';
@@ -96,18 +121,21 @@ alter table user_tree
create table user_increase_day create table user_increase_day
( (
id bigint not null primary key, id int8 not null primary key,
name varchar(128), name varchar(128),
phone bigint, phone int8,
number integer default 1, -- 新增人数
direct_number integer default 1, -- 新增人数
user_benefit decimal(14, 4) default 0, --福利值
order_amount decimal(14, 4) default 0, --订单金额(整个团队)
current_level_id int, --用户当前等级 current_level_id int, --用户当前等级
current_level_name varchar(12), --用户当前等级 current_level_name varchar(12), --用户当前等级
pid int8,
p_name varchar(128), p_name varchar(128),
p_phone bigint, p_phone int8,
p_level integer default 1, p_level integer default 1,
is_real integer default 0, -- 是否实名用户 0-否 1-是
real_date timestamp(6), -- 实名时间
real_name varchar(128), -- 实名姓名
real_id_card varchar(128), -- 实名身份证
is_revoked integer default 0, --是否撤销 0-否 1-是
register_date date, -- 注册时间
create_user int8, create_user int8,
create_dept int8, create_dept int8,
create_time timestamp(6), create_time timestamp(6),
@@ -118,16 +146,26 @@ create table user_increase_day
); );
create index user_increase_day_phone_index create index user_increase_day_phone_index
on user_increase_day (is_deleted, phone); on user_increase_day (is_deleted, phone);
create index uid_register_date_index
on user_increase_day (is_deleted, register_date);
comment on table user_increase_day is '用户增加天数表'; comment on table user_increase_day is '用户增加天数表';
comment on column user_increase_day.id is '主键'; comment on column user_increase_day.id is '主键';
comment on column user_increase_day.number is '新增人数';
comment on column user_increase_day.direct_number is '新增人数';
comment on column user_increase_day.current_level_id is '用户当前等级'; comment on column user_increase_day.current_level_id is '用户当前等级';
comment on column user_increase_day.current_level_name is '用户当前等级'; comment on column user_increase_day.current_level_name is '用户当前等级';
comment on column user_increase_day.name is '用户名';
comment on column user_increase_day.p_name is '上级用户名'; comment on column user_increase_day.p_name is '上级用户名';
comment on column user_increase_day.p_phone is '上级用户手机号'; comment on column user_increase_day.p_phone is '上级用户手机号';
comment on column user_increase_day.p_level is '上级用户层级'; comment on column user_increase_day.p_level is '上级用户层级';
comment on column user_increase_day.is_real is '是否实名用户 0-否 1-是';
comment on column user_increase_day.real_date is '实名时间';
comment on column user_increase_day.real_name is '实名姓名';
comment on column user_increase_day.real_id_card is '实名身份证';
comment on column user_increase_day.register_date is '注册时间';
comment on column user_increase_day.is_revoked is '是否注销 0-否 1-是';
comment on column user_increase_day.register_date is '注册时间';
comment on column user_increase_day.create_user is '创建人'; comment on column user_increase_day.create_user is '创建人';
comment on column user_increase_day.create_dept is '创建部门'; comment on column user_increase_day.create_dept is '创建部门';
comment on column user_increase_day.create_time is '创建时间'; comment on column user_increase_day.create_time is '创建时间';
@@ -142,12 +180,12 @@ alter table user_increase_day
CREATE TABLE level_info CREATE TABLE level_info
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
name VARCHAR(128) NULL, name VARCHAR(128) NULL,
child_qty INTEGER NULL, child_qty INTEGER NULL,
performance DECIMAL(16, 4) NULL, performance DECIMAL(16, 4) NULL,
performance_benefit DECIMAL(16, 4) NULL, performance_benefit DECIMAL(16, 4) NULL,
next_level_id BIGINT, --晋升等级id next_level_id int8, --晋升等级id
is_lowest int DEFAULT 0, --是否最低等级 is_lowest int DEFAULT 0, --是否最低等级
is_highest int DEFAULT 0, --是否最高等级 is_highest int DEFAULT 0, --是否最高等级
bonus_cash_day DECIMAL(16, 4) NULL, bonus_cash_day DECIMAL(16, 4) NULL,
@@ -188,12 +226,12 @@ alter table level_info
create table user_level_log create table user_level_log
( (
id bigint not null primary key, id int8 not null primary key,
statistical_date timestamp(6), statistical_date timestamp(6),
user_id bigint, user_id int8,
user_phone bigint, user_phone int8,
user_name varchar(128), user_name varchar(128),
level_id bigint, level_id int8,
level_name varchar(128), level_name varchar(128),
is_lowest int, --是否最低等级 is_lowest int, --是否最低等级
is_highest int, --是否最高等级 is_highest int, --是否最高等级
@@ -244,15 +282,15 @@ alter table user_level_log
CREATE TABLE package_info CREATE TABLE package_info
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
name VARCHAR(128) NULL, name VARCHAR(128) NULL,
buy_qty INTEGER default 0, -- 最大购买数量 buy_qty INTEGER default 0, -- 最大购买数量
day_total decimal(16, 4) default 0, -- 产出总天数 day_total integer default 0, -- 产出总天数
amount_total decimal(14, 4) default 0, -- 总产出福利积分 amount_total decimal(14, 2) default 0, -- 总产出福利积分
give_amount decimal(14, 4) default 0, -- 购买赠与福利值 give_amount decimal(14, 2) default 0, -- 购买赠与福利值
bonus decimal(16, 4) default 0, -- 激活比率 bonus decimal(16, 4) default 0, -- 激活比率
user_benefit decimal(14, 4) default 0, --兑换包需要的福利积分 user_benefit decimal(14, 2) default 0, --兑换包需要的福利积分
user_cash decimal(14, 4) default 0, --兑换包需要的现金券 user_cash decimal(14, 2) default 0, --兑换包需要的现金券
is_need_benefit int DEFAULT 0, --是否需要福利积分 is_need_benefit int DEFAULT 0, --是否需要福利积分
is_need_cash int DEFAULT 0, --是否需要现金券 is_need_cash int DEFAULT 0, --是否需要现金券
max_exchange_qty integer default 0, -- 全网最大兑换数量 max_exchange_qty integer default 0, -- 全网最大兑换数量
@@ -293,25 +331,72 @@ comment on column package_info.is_deleted is '是否已删除';
alter table package_info alter table package_info
owner to postgres; owner to postgres;
create table give_pack_log
(
id int8 not null primary key,
statistical_date date,
user_id int8,
phone int8,
user_name varchar(128),
package_id int8,
package_name varchar(128),
package_detail text,
give_number integer default 1,
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 gpl_date_index
on give_pack_log (is_deleted, statistical_date ,user_id);
COMMENT ON TABLE give_pack_log IS '划拨积分记录';
COMMENT ON COLUMN give_pack_log.id IS '主键';
COMMENT ON COLUMN give_pack_log.statistical_date IS '统计日期';
COMMENT ON COLUMN give_pack_log.user_id IS '用户id';
COMMENT ON COLUMN give_pack_log.phone IS '用户手机号';
COMMENT ON COLUMN give_pack_log.user_name IS '用户名';
COMMENT ON COLUMN give_pack_log.package_id IS '积分包id';
COMMENT ON COLUMN give_pack_log.package_name IS '积分包名称';
COMMENT ON COLUMN give_pack_log.package_detail IS '积分包信息快照';
COMMENT ON COLUMN give_pack_log.give_number IS '赠送数量';
COMMENT ON COLUMN give_pack_log.remark IS '备注';
comment on column give_pack_log.create_user is '创建人';
comment on column give_pack_log.create_dept is '创建部门';
comment on column give_pack_log.create_time is '创建时间';
comment on column give_pack_log.update_user is '修改人';
comment on column give_pack_log.update_time is '修改时间';
comment on column give_pack_log.status is '状态';
comment on column give_pack_log.is_deleted is '是否已删除';
alter table give_pack_log
owner to postgres;
create table user_package_info create table user_package_info
( (
id bigint not null primary key, id int8 not null primary key,
statistical_date timestamp(6), statistical_date timestamp(6),
user_id bigint, user_id int8,
phone bigint, phone int8,
user_name varchar(128), user_name varchar(128),
package_id bigint, package_id int8,
package_name varchar(128), package_name varchar(128),
user_benefit decimal(14, 4) default 0, --兑换包需要的福利积分 type integer default 1, -- 1-积分兑换 2-后台划拨
user_cash decimal(14, 4) default 0, --兑换包需要的现金券 user_benefit decimal(14, 2) default 0, --兑换包需要的福利积分
give_amount decimal(14, 4) default 0, -- 购买赠与福利值 user_cash decimal(14, 2) default 0, --兑换包需要的现金券
day_total decimal(16, 4) default 0, -- 产出总天数 give_amount decimal(14, 2) default 0, -- 购买赠与福利值
amount_total decimal(14, 4) default 0, -- 总产出福利积分 day_total integer default 0, -- 产出总天数
amount_day decimal(14, 4) default 0, -- 每日产出福利积分 = 总产出 / 总产出 amount_total decimal(14, 2) default 0, -- 总产出福利积分
amount_day decimal(14, 2) default 0, -- 每日产出福利积分 = 总产出 / 总产出
amount_out decimal(16, 4) default 0, -- 已产出福利积分 amount_out decimal(16, 4) default 0, -- 已产出福利积分
out_day decimal(16, 4) default 0, -- 已产出天数 out_day integer default 0, -- 已产出天数
is_complete integer default 0, -- 是否完成 0未完成 1完成 is_complete integer default 0, -- 是否完成 0未完成 1完成
expired_date timestamp(6), expired_date timestamp(6),
is_expired integer default 0, is_expired integer default 0,
@@ -325,6 +410,9 @@ create table user_package_info
is_deleted integer default 0 is_deleted integer default 0
); );
create index upi_complete_index create index upi_complete_index
on user_package_info (is_deleted, user_id , is_complete , is_expired); on user_package_info (is_deleted, user_id , is_complete , is_expired);
@@ -341,6 +429,7 @@ COMMENT ON COLUMN user_package_info.phone IS '用户手机号';
COMMENT ON COLUMN user_package_info.user_name IS '用户名'; COMMENT ON COLUMN user_package_info.user_name IS '用户名';
COMMENT ON COLUMN user_package_info.package_id IS '积分包id'; COMMENT ON COLUMN user_package_info.package_id IS '积分包id';
COMMENT ON COLUMN user_package_info.package_name IS '积分包名称'; COMMENT ON COLUMN user_package_info.package_name IS '积分包名称';
COMMENT ON COLUMN user_package_info.type IS '1-积分兑换 2-后台划拨';
COMMENT ON COLUMN user_package_info.user_benefit IS '兑换包需要的福利积分'; COMMENT ON COLUMN user_package_info.user_benefit IS '兑换包需要的福利积分';
COMMENT ON COLUMN user_package_info.user_cash IS '兑换包需要的现金券'; COMMENT ON COLUMN user_package_info.user_cash IS '兑换包需要的现金券';
COMMENT ON COLUMN user_package_info.give_amount IS '购买赠与福利值'; COMMENT ON COLUMN user_package_info.give_amount IS '购买赠与福利值';
@@ -364,33 +453,38 @@ comment on column user_package_info.is_deleted is '是否已删除';
alter table user_package_info alter table user_package_info
owner to postgres; owner to postgres;
create table user_package_info_copy create table user_package_info_copy
( (
id bigint not null primary key, id int8 not null primary key,
statistical_date timestamp(6), statistical_date timestamp(6),
user_id bigint, user_id int8,
phone bigint, phone int8,
user_name varchar(128), user_name varchar(128),
user_package_info bigint, --user_package_info id user_package_info_Id int8, --user_package_info id
package_id bigint, package_id int8,
package_name varchar(128), package_name varchar(128),
user_benefit decimal(14, 4) default 0, --兑换包需要的福利积分 type integer default 1, -- 1-积分兑换 2-后台划拨
user_cash decimal(14, 4) default 0, --兑换包需要的现金券 user_benefit decimal(14, 2) default 0, --兑换包需要的福利积分
give_amount decimal(14, 4) default 0, -- 购买赠与福利值 user_cash decimal(14, 2) default 0, --兑换包需要的现金券
day_total decimal(16, 4) default 0, -- 产出总天数 give_amount decimal(14, 2) default 0, -- 购买赠与福利值
amount_total decimal(14, 4) default 0, -- 总产出福利积分 day_total integer default 0, -- 产出总天数
amount_day decimal(14, 4) default 0, -- 每日产出福利积分 = 总产出 / 总产出 amount_total decimal(14, 2) default 0, -- 总产出福利积分
amount_day decimal(14, 2) default 0, -- 每日产出福利积分 = 总产出 / 总产出
amount_out decimal(16, 4) default 0, -- 已产出多少福利积分 amount_out decimal(16, 4) default 0, -- 已产出多少福利积分
remaining_amount decimal(16, 4) default 0, -- 剩余可产出福利积分 (总计 - 已经经历多少天 * 每天产出 - 加速积分) remaining_amount decimal(16, 4) default 0, -- 剩余可产出福利积分 (总计 - 已经经历多少天 * 每天产出 - 加速积分)
accelerated_amount decimal(16, 4) default 0, -- 已加速多少福利积分 accelerated_amount decimal(16, 4) default 0, -- 已加速多少福利积分
parent_id bigint, -- 给到谁10%积分,到用户id parent_id int8, -- 给到谁10%积分,到用户id
parent_amount decimal(16, 4) default 0, -- 给到谁10%积分,到积分账户(福利积分) parent_amount decimal(16, 4) default 0, -- 给到谁10%积分,到积分账户(福利积分)
out_day decimal(16, 4) default 0, -- 产出天数 当前包已经产出天数 out_day integer default 0, -- 产出天数 当前包已经产出天数
experience_day decimal(16, 4) default 0, -- 当前包已经经历的天数 experience_day integer default 0, -- 当前包已经经历的天数
not_sign_list bigint[], -- 未签到日期详情 (数组) not_sign_list int8[], -- 未签到日期详情 (数组)
is_complete integer default 0, -- 是否完成 0未完成 1完成 is_complete integer default 0, -- 是否完成 0未完成 1完成
active_time timestamp(6), -- 当前包激活时间
start_time timestamp(6), -- 当前包生效时间 start_time timestamp(6), -- 当前包生效时间
sign_bitmap bigint default 0, -- 位图将包的签到时间360天二进制转成十进制 sign_bitmap int8 default 0, -- 位图将包的签到时间360天二进制转成十进制
expired_date timestamp(6), expired_date timestamp(6),
is_expired integer default 0, is_expired integer default 0,
version integer default 1, version integer default 1,
@@ -405,7 +499,7 @@ create table user_package_info_copy
); );
create index upi_copy_complete_index create index upi_copy_complete_index
on user_package_info_copy (is_deleted, user_id , is_complete , is_expired); on user_package_info_copy (is_deleted, is_complete , is_expired ,user_id );
create index upi_copy_date_index create index upi_copy_date_index
on user_package_info_copy (is_deleted, statistical_date ,user_id); on user_package_info_copy (is_deleted, statistical_date ,user_id);
create index upi_copy_expired_index create index upi_copy_expired_index
@@ -419,6 +513,7 @@ COMMENT ON COLUMN user_package_info_copy.user_name IS '用户名';
COMMENT ON COLUMN user_package_info_copy.user_package_info IS '用户积分包id'; COMMENT ON COLUMN user_package_info_copy.user_package_info IS '用户积分包id';
COMMENT ON COLUMN user_package_info_copy.package_id IS '积分包id'; COMMENT ON COLUMN user_package_info_copy.package_id IS '积分包id';
COMMENT ON COLUMN user_package_info_copy.package_name IS '积分包名称'; COMMENT ON COLUMN user_package_info_copy.package_name IS '积分包名称';
COMMENT ON COLUMN user_package_info_copy.type IS '1-积分兑换 2-后台划拨';
COMMENT ON COLUMN user_package_info_copy.user_benefit IS '兑换包需要的福利积分'; COMMENT ON COLUMN user_package_info_copy.user_benefit IS '兑换包需要的福利积分';
COMMENT ON COLUMN user_package_info_copy.user_cash IS '兑换包需要的现金券'; COMMENT ON COLUMN user_package_info_copy.user_cash IS '兑换包需要的现金券';
COMMENT ON COLUMN user_package_info_copy.give_amount IS '购买赠与福利值'; COMMENT ON COLUMN user_package_info_copy.give_amount IS '购买赠与福利值';
@@ -435,6 +530,7 @@ COMMENT ON COLUMN user_package_info_copy.experience_day IS '当前包已经经
COMMENT ON COLUMN user_package_info_copy.not_sign_list IS '未签到日期详情 (数组)'; COMMENT ON COLUMN user_package_info_copy.not_sign_list IS '未签到日期详情 (数组)';
COMMENT ON COLUMN user_package_info_copy.is_complete IS '是否完成 0-未完成 1-完成'; COMMENT ON COLUMN user_package_info_copy.is_complete IS '是否完成 0-未完成 1-完成';
COMMENT ON COLUMN user_package_info_copy.start_time IS '当前包生效时间'; COMMENT ON COLUMN user_package_info_copy.start_time IS '当前包生效时间';
COMMENT ON COLUMN user_package_info_copy.active_time IS '当前包激活时间';
COMMENT ON COLUMN user_package_info_copy.sign_bitmap IS '位图将包的签到时间360天二进制转成十进制'; COMMENT ON COLUMN user_package_info_copy.sign_bitmap IS '位图将包的签到时间360天二进制转成十进制';
COMMENT ON COLUMN user_package_info_copy.expired_date IS '过期时间'; COMMENT ON COLUMN user_package_info_copy.expired_date IS '过期时间';
COMMENT ON COLUMN user_package_info_copy.is_expired IS '是否过期 0-未过期 1-已过期'; COMMENT ON COLUMN user_package_info_copy.is_expired IS '是否过期 0-未过期 1-已过期';
@@ -453,11 +549,11 @@ COMMENT ON COLUMN user_package_info_copy.is_deleted IS '是否已删除';
-- 佣金账户表 -- 佣金账户表
create table user_commission_account create table user_commission_account
( (
id bigint not null primary key, id int8 not null primary key,
account_name varchar(128), -- 账户名称 account_name varchar(128), -- 账户名称
account_number varchar(64), -- 账户编号 account_number varchar(64), -- 账户编号
account_code varchar(64), -- 账户代码 account_code varchar(64), -- 账户代码
amount decimal(14, 4) default 0, -- 账户总余额 amount decimal(14, 2) default 0, -- 账户总余额
version int default 1, version int default 1,
create_user int8, create_user int8,
create_dept int8, create_dept int8,
@@ -492,23 +588,21 @@ alter table user_commission_account
-- 25%商品成本佣金流水表 -- 25%商品成本佣金流水表
create table user_commission_goods_cost_log create table user_commission_goods_cost_log
( (
id bigint not null primary key, id int8 not null primary key,
account_id bigint, -- 账户id account_id int8, -- 账户id
account_name varchar(128), -- 账户名称 account_name varchar(128), -- 账户名称
account_number varchar(64), -- 账户编号 account_number varchar(64), -- 账户编号
account_code varchar(64), -- 账户代码 account_code varchar(64), -- 账户代码
user_id bigint, user_id int8,
user_phone bigint, user_phone int8,
user_name varchar(128), user_name varchar(128),
amount decimal(14, 4) default 0, -- 变动金额 amount decimal(14, 2) default 0, -- 变动金额
source_id bigint, -- 来源id source_id int8, -- 来源id
source_detail text, -- 来源详情 source_detail text, -- 来源详情
order_id bigint, -- 订单id order_id int8, -- 订单id
order_detail text, -- 订单详情 order_detail text, -- 订单详情
type int default 1, -- 类型 1-收入 2-支出 type int default 1, -- 类型 1-收入 2-支出
statistical_date timestamp(6), -- 统计时间 statistical_date timestamp(6), -- 统计时间
channel varchar(64), -- 渠道
channel_detail text, -- 渠道详情
remark text, -- 备注 remark text, -- 备注
create_user int8, create_user int8,
create_dept int8, create_dept int8,
@@ -538,8 +632,6 @@ comment on column user_commission_goods_cost_log.order_id is '订单id';
comment on column user_commission_goods_cost_log.order_detail is '订单详情'; comment on column user_commission_goods_cost_log.order_detail is '订单详情';
comment on column user_commission_goods_cost_log.type is '类型 1-收入 2-支出'; comment on column user_commission_goods_cost_log.type is '类型 1-收入 2-支出';
comment on column user_commission_goods_cost_log.statistical_date is '统计时间'; comment on column user_commission_goods_cost_log.statistical_date is '统计时间';
comment on column user_commission_goods_cost_log.channel is '渠道';
comment on column user_commission_goods_cost_log.channel_detail is '渠道详情';
comment on column user_commission_goods_cost_log.remark is '备注'; comment on column user_commission_goods_cost_log.remark is '备注';
comment on column user_commission_goods_cost_log.create_user is '创建人'; comment on column user_commission_goods_cost_log.create_user is '创建人';
comment on column user_commission_goods_cost_log.create_dept is '创建部门'; comment on column user_commission_goods_cost_log.create_dept is '创建部门';
@@ -555,23 +647,21 @@ alter table user_commission_goods_cost_log
-- 30%购买人获取用户积分佣金流水表 -- 30%购买人获取用户积分佣金流水表
create table user_commission_user_point_log create table user_commission_user_point_log
( (
id bigint not null primary key, id int8 not null primary key,
account_id bigint, -- 账户id account_id int8, -- 账户id
account_name varchar(128), -- 账户名称 account_name varchar(128), -- 账户名称
account_number varchar(64), -- 账户编号 account_number varchar(64), -- 账户编号
account_code varchar(64), -- 账户代码 account_code varchar(64), -- 账户代码
user_id bigint, user_id int8,
user_phone bigint, user_phone int8,
user_name varchar(128), user_name varchar(128),
amount decimal(14, 4) default 0, -- 变动金额 amount decimal(14, 2) default 0, -- 变动金额
source_id bigint, -- 来源id source_id int8, -- 来源id
source_detail text, -- 来源详情 source_detail text, -- 来源详情
order_id bigint, -- 订单id order_id int8, -- 订单id
order_detail text, -- 订单详情 order_detail text, -- 订单详情
type int default 1, -- 类型 1-收入 2-支出 type int default 1, -- 类型 1-收入 2-支出
statistical_date timestamp(6), -- 统计时间 statistical_date timestamp(6), -- 统计时间
channel varchar(64), -- 渠道
channel_detail text, -- 渠道详情
remark text, -- 备注 remark text, -- 备注
create_user int8, create_user int8,
create_dept int8, create_dept int8,
@@ -601,8 +691,6 @@ comment on column user_commission_user_point_log.order_id is '订单id';
comment on column user_commission_user_point_log.order_detail is '订单详情'; comment on column user_commission_user_point_log.order_detail is '订单详情';
comment on column user_commission_user_point_log.type is '类型 1-收入 2-支出'; comment on column user_commission_user_point_log.type is '类型 1-收入 2-支出';
comment on column user_commission_user_point_log.statistical_date is '统计时间'; comment on column user_commission_user_point_log.statistical_date is '统计时间';
comment on column user_commission_user_point_log.channel is '渠道';
comment on column user_commission_user_point_log.channel_detail is '渠道详情';
comment on column user_commission_user_point_log.remark is '备注'; comment on column user_commission_user_point_log.remark is '备注';
comment on column user_commission_user_point_log.create_user is '创建人'; comment on column user_commission_user_point_log.create_user is '创建人';
comment on column user_commission_user_point_log.create_dept is '创建部门'; comment on column user_commission_user_point_log.create_dept is '创建部门';
@@ -618,23 +706,21 @@ alter table user_commission_user_point_log
-- 10%直推人佣金流水表 -- 10%直推人佣金流水表
create table user_commission_direct_push_log create table user_commission_direct_push_log
( (
id bigint not null primary key, id int8 not null primary key,
account_id bigint, -- 账户id account_id int8, -- 账户id
account_name varchar(128), -- 账户名称 account_name varchar(128), -- 账户名称
account_number varchar(64), -- 账户编号 account_number varchar(64), -- 账户编号
account_code varchar(64), -- 账户代码 account_code varchar(64), -- 账户代码
user_id bigint, user_id int8,
user_phone bigint, user_phone int8,
user_name varchar(128), user_name varchar(128),
amount decimal(14, 4) default 0, -- 变动金额 amount decimal(14, 2) default 0, -- 变动金额
source_id bigint, -- 来源id source_id int8, -- 来源id
source_detail text, -- 来源详情 source_detail text, -- 来源详情
order_id bigint, -- 订单id order_id int8, -- 订单id
order_detail text, -- 订单详情 order_detail text, -- 订单详情
type int default 1, -- 类型 1-收入 2-支出 type int default 1, -- 类型 1-收入 2-支出
statistical_date timestamp(6), -- 统计时间 statistical_date timestamp(6), -- 统计时间
channel varchar(64), -- 渠道
channel_detail text, -- 渠道详情
remark text, -- 备注 remark text, -- 备注
create_user int8, create_user int8,
create_dept int8, create_dept int8,
@@ -664,8 +750,6 @@ comment on column user_commission_direct_push_log.order_id is '订单id';
comment on column user_commission_direct_push_log.order_detail is '订单详情'; comment on column user_commission_direct_push_log.order_detail is '订单详情';
comment on column user_commission_direct_push_log.type is '类型 1-收入 2-支出'; comment on column user_commission_direct_push_log.type is '类型 1-收入 2-支出';
comment on column user_commission_direct_push_log.statistical_date is '统计时间'; comment on column user_commission_direct_push_log.statistical_date is '统计时间';
comment on column user_commission_direct_push_log.channel is '渠道';
comment on column user_commission_direct_push_log.channel_detail is '渠道详情';
comment on column user_commission_direct_push_log.remark is '备注'; comment on column user_commission_direct_push_log.remark is '备注';
comment on column user_commission_direct_push_log.create_user is '创建人'; comment on column user_commission_direct_push_log.create_user is '创建人';
comment on column user_commission_direct_push_log.create_dept is '创建部门'; comment on column user_commission_direct_push_log.create_dept is '创建部门';
@@ -681,25 +765,23 @@ alter table user_commission_direct_push_log
-- 5%运营佣金流水表 -- 5%运营佣金流水表
create table user_commission_operation_log create table user_commission_operation_log
( (
id bigint not null primary key, id int8 not null primary key,
account_id bigint, -- 账户id account_id int8, -- 账户id
account_name varchar(128), -- 账户名称 account_name varchar(128), -- 账户名称
account_number varchar(64), -- 账户编号 account_number varchar(64), -- 账户编号
account_code varchar(64), -- 账户代码 account_code varchar(64), -- 账户代码
user_id bigint, user_id int8,
user_phone bigint, user_phone int8,
user_name varchar(128), user_name varchar(128),
amount decimal(14, 4) default 0, -- 变动金额 amount decimal(14, 2) default 0, -- 变动金额
source_id bigint, -- 来源id source_id int8, -- 来源id
source_detail text, -- 来源详情 source_detail text, -- 来源详情
order_id bigint, -- 订单id order_id int8, -- 订单id
order_detail text, -- 订单详情 order_detail text, -- 订单详情
type int default 1, -- 类型 1-收入 2-支出 type int default 1, -- 类型 1-收入 2-支出
statistical_date timestamp(6), -- 统计时间 statistical_date timestamp(6), -- 统计时间
channel varchar(64), -- 渠道
channel_detail text, -- 渠道详情
remark text, -- 备注 remark text, -- 备注
random_deduction decimal(14, 4) default 0, -- 随机立减金额 random_deduction decimal(14, 2) default 0, -- 随机立减金额
random_deduction_desc text, -- 随机立减说明 random_deduction_desc text, -- 随机立减说明
create_user int8, create_user int8,
create_dept int8, create_dept int8,
@@ -729,8 +811,6 @@ comment on column user_commission_operation_log.source_detail is '来源详情';
comment on column user_commission_operation_log.order_id is '订单id'; comment on column user_commission_operation_log.order_id is '订单id';
comment on column user_commission_operation_log.type is '类型 1-收入 2-支出'; comment on column user_commission_operation_log.type is '类型 1-收入 2-支出';
comment on column user_commission_operation_log.statistical_date is '统计时间'; comment on column user_commission_operation_log.statistical_date is '统计时间';
comment on column user_commission_operation_log.channel is '渠道';
comment on column user_commission_operation_log.channel_detail is '渠道详情';
comment on column user_commission_operation_log.remark is '备注'; comment on column user_commission_operation_log.remark is '备注';
comment on column user_commission_operation_log.random_deduction is '随机立减金额'; comment on column user_commission_operation_log.random_deduction is '随机立减金额';
comment on column user_commission_operation_log.random_deduction_desc is '随机立减说明'; comment on column user_commission_operation_log.random_deduction_desc is '随机立减说明';
@@ -748,20 +828,18 @@ alter table user_commission_operation_log
-- 5%广告补贴佣金流水表 -- 5%广告补贴佣金流水表
create table user_commission_advertising_log create table user_commission_advertising_log
( (
id bigint not null primary key, id int8 not null primary key,
account_id bigint, -- 账户id account_id int8, -- 账户id
account_name varchar(128), -- 账户名称 account_name varchar(128), -- 账户名称
account_number varchar(64), -- 账户编号 account_number varchar(64), -- 账户编号
account_code varchar(64), -- 账户代码 account_code varchar(64), -- 账户代码
amount decimal(14, 4) default 0, -- 变动金额 amount decimal(14, 2) default 0, -- 变动金额
source_id bigint, -- 来源id source_id int8, -- 来源id
source_detail text, -- 来源详情 source_detail text, -- 来源详情
order_id bigint, -- 订单id order_id int8, -- 订单id
order_detail text, -- 订单详情 order_detail text, -- 订单详情
type int default 1, -- 类型 1-收入 2-支出 type int default 1, -- 类型 1-收入 2-支出
statistical_date timestamp(6), -- 统计时间 statistical_date timestamp(6), -- 统计时间
channel varchar(64), -- 渠道
channel_detail text, -- 渠道详情
remark text, -- 备注 remark text, -- 备注
daily_statistics_date timestamp(6), -- 每日统计日期 daily_statistics_date timestamp(6), -- 每日统计日期
statistics_cycle varchar(32), -- 统计周期 statistics_cycle varchar(32), -- 统计周期
@@ -790,8 +868,6 @@ comment on column user_commission_advertising_log.order_id is '订单id';
comment on column user_commission_advertising_log.order_detail is '订单详情'; comment on column user_commission_advertising_log.order_detail is '订单详情';
comment on column user_commission_advertising_log.type is '类型 1-收入 2-支出'; comment on column user_commission_advertising_log.type is '类型 1-收入 2-支出';
comment on column user_commission_advertising_log.statistical_date is '统计时间'; comment on column user_commission_advertising_log.statistical_date is '统计时间';
comment on column user_commission_advertising_log.channel is '渠道';
comment on column user_commission_advertising_log.channel_detail is '渠道详情';
comment on column user_commission_advertising_log.remark is '备注'; comment on column user_commission_advertising_log.remark is '备注';
comment on column user_commission_advertising_log.daily_statistics_date is '每日统计日期'; comment on column user_commission_advertising_log.daily_statistics_date is '每日统计日期';
comment on column user_commission_advertising_log.statistics_cycle is '统计周期'; comment on column user_commission_advertising_log.statistics_cycle is '统计周期';
@@ -809,26 +885,26 @@ alter table user_commission_advertising_log
-- 5%服务商佣金流水表 -- 5%服务商佣金流水表
create table user_commission_service_provider_log create table user_commission_service_provider_log
( (
id bigint not null primary key, id int8 not null primary key,
account_id bigint, -- 账户id account_id int8, -- 账户id
account_name varchar(128), -- 账户名称 account_name varchar(128), -- 账户名称
account_number varchar(64), -- 账户编号 account_number varchar(64), -- 账户编号
account_code varchar(64), -- 账户代码 account_code varchar(64), -- 账户代码
user_id bigint, user_id int8,
user_phone bigint, user_phone int8,
user_name varchar(128), user_name varchar(128),
amount decimal(14, 4) default 0, -- 变动金额 amount decimal(14, 2) default 0, -- 变动金额
source_id bigint, -- 来源id source_id int8, -- 来源id
source_detail text, -- 来源详情 source_detail text, -- 来源详情
order_id bigint, -- 订单id order_id int8, -- 订单id
order_detail text, -- 订单详情 order_detail text, -- 订单详情
type int default 1, -- 类型 1-收入 2-支出 type int default 1, -- 类型 1-收入 2-支出
statistical_date timestamp(6), -- 统计时间 statistical_date timestamp(6), -- 统计时间
channel varchar(64), -- 渠道
channel_detail text, -- 渠道详情
remark text, -- 备注 remark text, -- 备注
service_type varchar(64), -- 服务类型 service_type varchar(64), -- 服务类型
service_provider_id bigint, -- 服务商ID service_provider_id int8, -- 服务商ID
address_id int8,
region_id int8,
create_user int8, create_user int8,
create_dept int8, create_dept int8,
create_time timestamp(6), create_time timestamp(6),
@@ -854,11 +930,11 @@ comment on column user_commission_service_provider_log.source_detail is '来源
comment on column user_commission_service_provider_log.order_id is '订单id'; comment on column user_commission_service_provider_log.order_id is '订单id';
comment on column user_commission_service_provider_log.type is '类型 1-收入 2-支出'; comment on column user_commission_service_provider_log.type is '类型 1-收入 2-支出';
comment on column user_commission_service_provider_log.statistical_date is '统计时间'; comment on column user_commission_service_provider_log.statistical_date is '统计时间';
comment on column user_commission_service_provider_log.channel is '渠道';
comment on column user_commission_service_provider_log.channel_detail is '渠道详情';
comment on column user_commission_service_provider_log.remark is '备注'; comment on column user_commission_service_provider_log.remark is '备注';
comment on column user_commission_service_provider_log.service_type is '服务类型'; comment on column user_commission_service_provider_log.service_type is '服务类型';
comment on column user_commission_service_provider_log.service_provider_id is '服务商ID'; comment on column user_commission_service_provider_log.service_provider_id is '服务商ID';
comment on column user_commission_service_provider_log.address_id is '收货地址id';
comment on column user_commission_service_provider_log.region_id is '省市区id';
comment on column user_commission_service_provider_log.create_user is '创建人'; comment on column user_commission_service_provider_log.create_user is '创建人';
comment on column user_commission_service_provider_log.create_dept is '创建部门'; comment on column user_commission_service_provider_log.create_dept is '创建部门';
comment on column user_commission_service_provider_log.create_time is '创建时间'; comment on column user_commission_service_provider_log.create_time is '创建时间';
@@ -873,26 +949,24 @@ alter table user_commission_service_provider_log
-- 15%极差代理佣金流水表 -- 15%极差代理佣金流水表
create table user_commission_agency_log create table user_commission_agency_log
( (
id bigint not null primary key, id int8 not null primary key,
account_id bigint, -- 账户id account_id int8, -- 账户id
account_name varchar(128), -- 账户名称 account_name varchar(128), -- 账户名称
account_number varchar(64), -- 账户编号 account_number varchar(64), -- 账户编号
account_code varchar(64), -- 账户代码 account_code varchar(64), -- 账户代码
user_id bigint, user_id int8,
user_phone bigint, user_phone int8,
user_name varchar(128), user_name varchar(128),
amount decimal(14, 4) default 0, -- 变动金额 amount decimal(14, 2) default 0, -- 变动金额
source_id bigint, -- 来源id source_id int8, -- 来源id
source_detail text, -- 来源详情 source_detail text, -- 来源详情
order_id bigint, -- 订单id order_id int8, -- 订单id
order_detail text, -- 订单详情 order_detail text, -- 订单详情
type int default 1, -- 类型 1-收入 2-支出 type int default 1, -- 类型 1-收入 2-支出
statistical_date timestamp(6), -- 统计时间 statistical_date timestamp(6), -- 统计时间
channel varchar(64), -- 渠道
channel_detail text, -- 渠道详情
remark text, -- 备注 remark text, -- 备注
agency_level varchar(32), -- 代理级别 agency_level varchar(32), -- 代理级别
agency_parent_id bigint, -- 上级代理ID agency_parent_id int8, -- 上级代理ID
create_user int8, create_user int8,
create_dept int8, create_dept int8,
create_time timestamp(6), create_time timestamp(6),
@@ -921,8 +995,6 @@ comment on column user_commission_agency_log.source_detail is '来源详情';
comment on column user_commission_agency_log.order_id is '订单id'; comment on column user_commission_agency_log.order_id is '订单id';
comment on column user_commission_agency_log.type is '类型 1-收入 2-支出'; comment on column user_commission_agency_log.type is '类型 1-收入 2-支出';
comment on column user_commission_agency_log.statistical_date is '统计时间'; comment on column user_commission_agency_log.statistical_date is '统计时间';
comment on column user_commission_agency_log.channel is '渠道';
comment on column user_commission_agency_log.channel_detail is '渠道详情';
comment on column user_commission_agency_log.remark is '备注'; comment on column user_commission_agency_log.remark is '备注';
comment on column user_commission_agency_log.agency_level is '代理级别'; comment on column user_commission_agency_log.agency_level is '代理级别';
comment on column user_commission_agency_log.agency_parent_id is '上级代理ID'; comment on column user_commission_agency_log.agency_parent_id is '上级代理ID';
@@ -940,26 +1012,22 @@ alter table user_commission_agency_log
-- 5%联创佣金流水表 -- 5%联创佣金流水表
create table user_commission_co_creator_log create table user_commission_co_creator_log
( (
id bigint not null primary key, id int8 not null primary key,
account_id bigint, -- 账户id account_id int8, -- 账户id
account_name varchar(128), -- 账户名称 account_name varchar(128), -- 账户名称
account_number varchar(64), -- 账户编号 account_number varchar(64), -- 账户编号
account_code varchar(64), -- 账户代码 account_code varchar(64), -- 账户代码
user_id bigint, user_id int8,
user_phone bigint, user_phone int8,
user_name varchar(128), user_name varchar(128),
amount decimal(14, 4) default 0, -- 变动金额 amount decimal(14, 2) default 0, -- 变动金额
source_id bigint, -- 来源id source_id int8, -- 来源id
source_detail text, -- 来源详情 source_detail text, -- 来源详情
order_id bigint, -- 订单id order_id int8, -- 订单id
order_detail text, -- 订单详情 order_detail text, -- 订单详情
type int default 1, -- 类型 1-收入 2-支出 type int default 1, -- 类型 1-收入 2-支出
statistical_date timestamp(6), -- 统计时间 statistical_date timestamp(6), -- 统计时间
channel varchar(64), -- 渠道
channel_detail text, -- 渠道详情
remark text, -- 备注 remark text, -- 备注
co_creator_type varchar(64), -- 联创类型
co_creator_rank varchar(32), -- 联创等级
create_user int8, create_user int8,
create_dept int8, create_dept int8,
create_time timestamp(6), create_time timestamp(6),
@@ -985,11 +1053,7 @@ comment on column user_commission_co_creator_log.source_detail is '来源详情'
comment on column user_commission_co_creator_log.order_id is '订单id'; comment on column user_commission_co_creator_log.order_id is '订单id';
comment on column user_commission_co_creator_log.type is '类型 1-收入 2-支出'; comment on column user_commission_co_creator_log.type is '类型 1-收入 2-支出';
comment on column user_commission_co_creator_log.statistical_date is '统计时间'; comment on column user_commission_co_creator_log.statistical_date is '统计时间';
comment on column user_commission_co_creator_log.channel is '渠道';
comment on column user_commission_co_creator_log.channel_detail is '渠道详情';
comment on column user_commission_co_creator_log.remark is '备注'; comment on column user_commission_co_creator_log.remark is '备注';
comment on column user_commission_co_creator_log.co_creator_type is '联创类型';
comment on column user_commission_co_creator_log.co_creator_rank is '联创等级';
comment on column user_commission_co_creator_log.create_user is '创建人'; comment on column user_commission_co_creator_log.create_user is '创建人';
comment on column user_commission_co_creator_log.create_dept is '创建部门'; comment on column user_commission_co_creator_log.create_dept is '创建部门';
comment on column user_commission_co_creator_log.create_time is '创建时间'; comment on column user_commission_co_creator_log.create_time is '创建时间';

View 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 '是否已删除';

View File

@@ -1,8 +1,8 @@
create table user_performance create table user_performance
( (
id bigint not null primary key, id int8 not null primary key,
user_id bigint, user_id int8,
user_phone bigint, user_phone int8,
user_name varchar(128), user_name varchar(128),
performance decimal(16, 4) default 0, performance decimal(16, 4) default 0,
own_performance decimal(16, 4) default 0, own_performance decimal(16, 4) default 0,
@@ -38,14 +38,14 @@ alter table user_performance
create table user_performance_log create table user_performance_log
( (
id bigint not null primary key, id int8 not null primary key,
user_id bigint, user_id int8,
user_phone bigint, user_phone int8,
user_name varchar(128), user_name varchar(128),
amount decimal(14, 4) default 0, amount decimal(14, 4) default 0,
source_id bigint, source_id int8,
source_detail text, source_detail text,
order_id bigint, order_id int8,
type int default 1, type int default 1,
statistical_date timestamp(6), statistical_date timestamp(6),
channel varchar(64), channel varchar(64),
@@ -91,9 +91,9 @@ alter table user_performance_log
create table user_performance_benefit create table user_performance_benefit
( (
id bigint not null primary key, id int8 not null primary key,
user_id bigint, user_id int8,
user_phone bigint, user_phone int8,
user_name varchar(128), user_name varchar(128),
performance decimal(16, 4) default 0, performance decimal(16, 4) default 0,
own_performance decimal(16, 4) default 0, own_performance decimal(16, 4) default 0,
@@ -129,14 +129,14 @@ alter table user_performance_benefit
create table user_performance_benefit_log create table user_performance_benefit_log
( (
id bigint not null primary key, id int8 not null primary key,
user_id bigint, user_id int8,
user_phone bigint, user_phone int8,
user_name varchar(128), user_name varchar(128),
amount decimal(14, 4) default 0, amount decimal(14, 4) default 0,
source_id bigint, source_id int8,
source_detail text, source_detail text,
order_id bigint, order_id int8,
type int default 1, type int default 1,
statistical_date timestamp(6), statistical_date timestamp(6),
channel varchar(64), channel varchar(64),

View File

@@ -1,8 +1,7 @@
create table user_benefit create table user_benefit
( (
id bigint not null primary key, id int8 not null primary key,
user_id bigint, amount decimal(14, 2) default 0,
amount decimal(14, 4) default 0,
version int default 1, version int default 1,
create_user int8, create_user int8,
create_dept int8, create_dept int8,
@@ -13,12 +12,9 @@ create table user_benefit
is_deleted integer default 0 is_deleted integer default 0
); );
create index user_benefit_index
on user_benefit (is_deleted, user_id);
comment on table user_benefit is '用户福利值表'; comment on table user_benefit is '用户福利值表';
comment on column user_benefit.id is '主键'; comment on column user_benefit.id is '主键';
comment on column user_benefit.user_id is '用户id';
comment on column user_benefit.amount is '金额'; comment on column user_benefit.amount is '金额';
comment on column user_benefit.version is '版本号'; comment on column user_benefit.version is '版本号';
comment on column user_benefit.create_user is '创建人'; comment on column user_benefit.create_user is '创建人';
@@ -34,15 +30,15 @@ alter table user_benefit
create table user_benefit_log create table user_benefit_log
( (
id bigint not null primary key, id int8 not null primary key,
user_id bigint, user_id int8,
user_phone bigint, user_phone int8,
user_name varchar(128), user_name varchar(128),
amount decimal(14, 4) default 0, amount decimal(14, 2) default 0,
source_id bigint, source_id int8,
user_pack_id bigint, user_pack_id int8,
source_detail text, source_detail text,
order_id bigint, order_id int8,
type int default 1, type int default 1,
statistical_date timestamp(6), statistical_date timestamp(6),
channel varchar(64), channel varchar(64),
@@ -89,9 +85,8 @@ alter table user_benefit_log
create table user_commission create table user_commission
( (
id bigint not null primary key, id int8 not null primary key,
user_id bigint, amount decimal(14, 2) default 0,
amount decimal(14, 4) default 0,
version int default 1, version int default 1,
create_user int8, create_user int8,
create_dept int8, create_dept int8,
@@ -102,12 +97,9 @@ create table user_commission
is_deleted integer default 0 is_deleted integer default 0
); );
create index user_commission_index
on user_commission (is_deleted, user_id);
comment on table user_commission is '用户佣金表'; comment on table user_commission is '用户佣金表';
comment on column user_commission.id is '主键'; comment on column user_commission.id is '主键';
comment on column user_commission.user_id is '用户id';
comment on column user_commission.amount is '佣金金额'; comment on column user_commission.amount is '佣金金额';
comment on column user_commission.version is '版本号'; comment on column user_commission.version is '版本号';
comment on column user_commission.create_user is '创建人'; comment on column user_commission.create_user is '创建人';
@@ -124,14 +116,14 @@ alter table user_commission
create table user_commission_log create table user_commission_log
( (
id bigint not null primary key, id int8 not null primary key,
user_id bigint, user_id int8,
user_phone bigint, user_phone int8,
user_name varchar(128), user_name varchar(128),
amount decimal(14, 4) default 0, amount decimal(14, 2) default 0,
source_id bigint, source_id int8,
source_detail text, source_detail text,
order_id bigint, order_id int8,
type int default 1, type int default 1,
statistical_date timestamp(6), statistical_date timestamp(6),
channel varchar(64), channel varchar(64),
@@ -177,24 +169,21 @@ alter table user_commission_log
create table user_cash create table user_cash
( (
id bigint not null primary key, id int8 not null primary key,
user_id bigint, amount decimal(14, 2) default 0,
amount decimal(14, 4) default 0,
version int default 1, version int default 1,
create_user int8, create_user int8,
create_dept int8, create_dept int8,
create_time timestamp(6), create_time timestamp(6),
update_user int8, update_user int8,
update_time timestamp(6), update_time timestamp(6),
status integer default 1,
is_deleted integer default 0 is_deleted integer default 0
); );
create index user_cash_index
on user_cash (is_deleted, user_id);
comment on table user_cash is '用户现金券表'; comment on table user_cash is '用户现金券表';
comment on column user_cash.id is '主键'; comment on column user_cash.id is '主键';
comment on column user_cash.user_id is '用户id';
comment on column user_cash.amount is '面额'; comment on column user_cash.amount is '面额';
comment on column user_cash.version is '版本号'; comment on column user_cash.version is '版本号';
comment on column user_cash.create_user is '创建人'; comment on column user_cash.create_user is '创建人';
@@ -202,6 +191,7 @@ comment on column user_cash.create_dept is '创建部门';
comment on column user_cash.create_time is '创建时间'; comment on column user_cash.create_time is '创建时间';
comment on column user_cash.update_user is '修改人'; comment on column user_cash.update_user is '修改人';
comment on column user_cash.update_time is '修改时间'; comment on column user_cash.update_time is '修改时间';
comment on column user_cash.status is '状态';
comment on column user_cash.is_deleted is '是否已删除'; comment on column user_cash.is_deleted is '是否已删除';
alter table user_cash alter table user_cash
@@ -210,14 +200,14 @@ alter table user_cash
create table user_cash_log create table user_cash_log
( (
id bigint not null primary key, id int8 not null primary key,
user_id bigint, user_id int8,
user_phone bigint, user_phone int8,
user_name varchar(128), user_name varchar(128),
amount decimal(14, 4) default 0, amount decimal(14, 2) default 0,
source_id bigint, source_id int8,
source_detail text, source_detail text,
order_id bigint, order_id int8,
type int default 1, type int default 1,
statistical_date timestamp(6), statistical_date timestamp(6),
channel varchar(64), channel varchar(64),
@@ -263,24 +253,20 @@ alter table user_cash_log
create table user_mall_integral create table user_mall_integral
( (
id bigint not null primary key, id int8 not null primary key,
user_id bigint, amount decimal(14, 2) default 0,
amount decimal(14, 4) default 0,
version int default 1, version int default 1,
create_user int8, create_user int8,
create_dept int8, create_dept int8,
create_time timestamp(6), create_time timestamp(6),
update_user int8, update_user int8,
update_time timestamp(6), update_time timestamp(6),
status integer default 1,
is_deleted integer default 0 is_deleted integer default 0
); );
create index user_mall_integral_index
on user_mall_integral (is_deleted, user_id);
comment on table user_mall_integral is '用户商城积分表'; comment on table user_mall_integral is '用户商城积分表';
comment on column user_mall_integral.id is '主键';
comment on column user_mall_integral.user_id is '用户id';
comment on column user_mall_integral.amount is '面额'; comment on column user_mall_integral.amount is '面额';
comment on column user_mall_integral.version 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_user is '创建人';
@@ -296,14 +282,14 @@ alter table user_mall_integral
create table user_mall_integral_log create table user_mall_integral_log
( (
id bigint not null primary key, id int8 not null primary key,
user_id bigint, user_id int8,
user_phone bigint, user_phone int8,
user_name varchar(128), user_name varchar(128),
amount decimal(14, 4) default 0, amount decimal(14, 2) default 0,
source_id bigint, source_id int8,
source_detail text, source_detail text,
order_id bigint, order_id int8,
type int default 1, type int default 1,
statistical_date timestamp(6), statistical_date timestamp(6),
channel varchar(64), channel varchar(64),
@@ -350,10 +336,10 @@ alter table user_mall_integral_log
create table user_gains_day create table user_gains_day
( (
id bigint not null primary key, id int8 not null primary key,
statistical_date timestamp(6), statistical_date timestamp(6),
user_id bigint, user_id int8,
amount decimal(14, 4) default 0, amount decimal(14, 2) default 0,
gains_details text, gains_details text,
is_credited integer default 0, is_credited integer default 0,
version int default 1, version int default 1,
@@ -390,15 +376,15 @@ alter table user_gains_day
create table user_gains_day_log create table user_gains_day_log
( (
id bigint not null primary key, id int8 not null primary key,
user_id bigint, user_id int8,
user_phone bigint, user_phone int8,
user_name varchar(128), user_name varchar(128),
amount decimal(14, 4) default 0, amount decimal(14, 2) default 0,
source_id bigint, source_id int8,
source_detail text, source_detail text,
gains_details text, gains_details text,
order_id bigint, order_id int8,
statistical_date timestamp(6), statistical_date timestamp(6),
is_summary integer default 0, is_summary integer default 0,
remark text, remark text,

View File

@@ -1,8 +1,8 @@
CREATE TABLE vendor_daily_activity CREATE TABLE vendor_daily_activity
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
settle_date DATE NOT NULL, settle_date DATE NOT NULL,
region_id BIGINT NOT NULL, region_id int8 NOT NULL,
region_level INTEGER DEFAULT 0 NOT NULL, region_level INTEGER DEFAULT 0 NOT NULL,
total_amount INTEGER DEFAULT 0 NOT NULL, total_amount INTEGER DEFAULT 0 NOT NULL,
activity_amount INTEGER DEFAULT 0 NOT NULL, activity_amount INTEGER DEFAULT 0 NOT NULL,
@@ -37,9 +37,9 @@ COMMENT ON COLUMN vendor_daily_activity.is_deleted IS '是否已删除';
CREATE TABLE vendor_daily_profit CREATE TABLE vendor_daily_profit
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
settle_date DATE NOT NULL, settle_date DATE NOT NULL,
region_id BIGINT NOT NULL, region_id int8 NOT NULL,
region_level INTEGER DEFAULT 0 NOT NULL, region_level INTEGER DEFAULT 0 NOT NULL,
profit_type INTEGER DEFAULT 0 NOT NULL, profit_type INTEGER DEFAULT 0 NOT NULL,
order_type INTEGER NOT NULL, order_type INTEGER NOT NULL,
@@ -77,9 +77,9 @@ COMMENT ON COLUMN vendor_daily_profit.is_deleted IS '是否已删除';
CREATE TABLE vendor_info CREATE TABLE vendor_info
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
region_id BIGINT NOT NULL, region_id int8 NOT NULL,
user_id BIGINT NOT NULL, user_id int8 NOT NULL,
company_name VARCHAR(200) DEFAULT '' NOT NULL, company_name VARCHAR(200) DEFAULT '' NOT NULL,
legal_person_name VARCHAR(200) DEFAULT '' NOT NULL, legal_person_name VARCHAR(200) DEFAULT '' NOT NULL,
id_card VARCHAR(50) DEFAULT '' NOT NULL, id_card VARCHAR(50) DEFAULT '' NOT NULL,
@@ -89,7 +89,7 @@ CREATE TABLE vendor_info
id_card_handheld VARCHAR(200) DEFAULT '' NOT NULL, id_card_handheld VARCHAR(200) DEFAULT '' NOT NULL,
business_license VARCHAR(200) DEFAULT '' NOT NULL, business_license VARCHAR(200) DEFAULT '' NOT NULL,
audit_status INTEGER DEFAULT 1 NOT NULL, audit_status INTEGER DEFAULT 1 NOT NULL,
auditor BIGINT NULL, auditor int8 NULL,
reject_reason VARCHAR(200) DEFAULT '' NOT NULL, reject_reason VARCHAR(200) DEFAULT '' NOT NULL,
create_user int8 NULL, create_user int8 NULL,
create_dept int8 NULL, create_dept int8 NULL,
@@ -129,8 +129,8 @@ COMMENT ON COLUMN vendor_info.apply_time IS '申请时间';
CREATE TABLE vendor_payout_apply CREATE TABLE vendor_payout_apply
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
user_id BIGINT DEFAULT 0 NOT NULL, user_id int8 DEFAULT 0 NOT NULL,
apply_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL, apply_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
company_fully_name VARCHAR(255) NULL, company_fully_name VARCHAR(255) NULL,
bank_account VARCHAR(255) NULL, bank_account VARCHAR(255) NULL,
@@ -175,12 +175,12 @@ COMMENT ON COLUMN vendor_payout_apply.is_deleted IS '是否已删除';
CREATE TABLE vendor_profit_detail CREATE TABLE vendor_profit_detail
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
order_id BIGINT DEFAULT 0 NOT NULL, order_id int8 DEFAULT 0 NOT NULL,
user_id BIGINT DEFAULT 0 NOT NULL, user_id int8 DEFAULT 0 NOT NULL,
district_id BIGINT DEFAULT 0 NOT NULL, district_id int8 DEFAULT 0 NOT NULL,
city_id BIGINT DEFAULT 0 NOT NULL, city_id int8 DEFAULT 0 NOT NULL,
province_id BIGINT DEFAULT 0 NOT NULL, province_id int8 DEFAULT 0 NOT NULL,
order_type INTEGER DEFAULT 0 NOT NULL, order_type INTEGER DEFAULT 0 NOT NULL,
payment_type INTEGER DEFAULT 0 NOT NULL, payment_type INTEGER DEFAULT 0 NOT NULL,
actual_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL, actual_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
@@ -221,13 +221,13 @@ COMMENT ON COLUMN vendor_profit_detail.is_deleted IS '是否已删除';
CREATE TABLE vendor_regions CREATE TABLE vendor_regions
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
name VARCHAR(50) NULL, name VARCHAR(50) NULL,
level INTEGER NULL, level INTEGER NULL,
pid INTEGER DEFAULT 0 NULL, pid INTEGER DEFAULT 0 NULL,
lon DECIMAL(10, 6) NULL, lon DECIMAL(10, 6) NULL,
lat DECIMAL(10, 6) NULL, lat DECIMAL(10, 6) NULL,
vendor_id BIGINT NULL, vendor_id int8 NULL,
token_amount DECIMAL(10, 2) DEFAULT 0.00 NULL, token_amount DECIMAL(10, 2) DEFAULT 0.00 NULL,
points_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_amount DECIMAL(10, 2) DEFAULT 0.00 NULL,
@@ -253,7 +253,7 @@ COMMENT ON COLUMN vendor_regions.region_code IS '区划编号';
CREATE TABLE vendor_virtual_data_activity CREATE TABLE vendor_virtual_data_activity
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
region_id INTEGER NOT NULL, region_id INTEGER NOT NULL,
user_amount INTEGER DEFAULT 0 NOT NULL, user_amount INTEGER DEFAULT 0 NOT NULL,
active_user_amount INTEGER DEFAULT 0 NOT NULL, active_user_amount INTEGER DEFAULT 0 NOT NULL,
@@ -291,7 +291,7 @@ COMMENT ON COLUMN vendor_virtual_data_activity.is_deleted IS '是否已删除';
CREATE TABLE vendor_virtual_data_profit CREATE TABLE vendor_virtual_data_profit
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
region_id INTEGER NOT NULL, region_id INTEGER NOT NULL,
settle_date DATE NOT NULL, settle_date DATE NOT NULL,
online_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL, online_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,

View File

@@ -1,6 +1,6 @@
CREATE TABLE prize_spu CREATE TABLE prize_spu
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
spu_name VARCHAR(255) DEFAULT '' NOT NULL, spu_name VARCHAR(255) DEFAULT '' NOT NULL,
main_img VARCHAR(255) DEFAULT '' NOT NULL, main_img VARCHAR(255) DEFAULT '' NOT NULL,
detail_img text NULL, detail_img text NULL,
@@ -36,17 +36,17 @@ COMMENT ON COLUMN prize_spu.is_deleted IS '是否已删除';
CREATE TABLE prize_spu_order CREATE TABLE prize_spu_order
( (
id BIGINT NOT NULL PRIMARY KEY, id int8 NOT NULL PRIMARY KEY,
user_id BIGINT DEFAULT 0 NOT NULL, user_id int8 DEFAULT 0 NOT NULL,
user_name VARCHAR(128) NULL, user_name VARCHAR(128) NULL,
user_phone bigint NULL, user_phone int8 NULL,
spu_id bigint NULL, spu_id int8 NULL,
spu_name VARCHAR(255) NULL, spu_name VARCHAR(255) NULL,
main_img VARCHAR(255) NULL, main_img VARCHAR(255) NULL,
detail_img text NULL, detail_img text NULL,
quantity INTEGER DEFAULT 0 NOT NULL, quantity INTEGER DEFAULT 0 NOT NULL,
order_status INTEGER DEFAULT 0 NOT NULL, order_status INTEGER DEFAULT 0 NOT NULL,
version BIGINT DEFAULT 0 NULL, version int8 DEFAULT 0 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,

View 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);

View 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);

View 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);

View 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);

View 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);

View 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);

View 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);

View 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);

View 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);

45
pom.xml
View File

@@ -24,6 +24,7 @@
<docker.password>admin12345</docker.password> <docker.password>admin12345</docker.password>
<docker.namespace>blade</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>
</properties> </properties>
<dependencyManagement> <dependencyManagement>
@@ -250,6 +251,50 @@
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- 短信认证服务sdk -->
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>dypnsapi20170525</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>alibabacloud-dypnsapi20170525</artifactId>
<version>2.0.0</version>
</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>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@@ -0,0 +1,121 @@
package org.springblade.common.config;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.task.AsyncTaskExecutor;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.ThreadPoolExecutor;
@Configuration
@Slf4j
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")
public AsyncTaskExecutor commonAsyncExecutor() {
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("common-Async-");
executor.initialize();
return executor;
}
@Bean("appRegisterExecutor")
public AsyncTaskExecutor appRegisterExecutor() {
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("appRegister-Async-");
executor.initialize();
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;
}
}

View File

@@ -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/**",

View File

@@ -0,0 +1,25 @@
package org.springblade.common.config;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class MybatisPlusConfig {
/**
* mybatis-plus.分页插件
* @return interceptor
*/
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.POSTGRE_SQL));
interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
return interceptor;
}
}

View File

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

View File

@@ -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());
}
}
}

View File

@@ -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);
}
}

View File

@@ -0,0 +1,438 @@
package org.springblade.common.utils.date;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.*;
import java.time.format.DateTimeFormatter;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
@Slf4j
public class DateUtil {
private static final ThreadLocal<SimpleDateFormat> SIMPLE_DAY = ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyy-MM-dd"));
private static final ThreadLocal<SimpleDateFormat> SIMPLE_DATE_FORMAT = ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
public static final ThreadLocal<DateTimeFormatter> THREAD_LOCAL_FORMAT = ThreadLocal.withInitial(() -> DateTimeFormatter.ofPattern("yyyy-MM-dd", Locale.CHINA));
public static final String yyyyMMddHHmmss = "yyyyMMddHHmmss";
public static final String yyyyMMdd = "yyyyMMdd";
/**
* 计算天数
*
* @param beginDate 开始时间
* @param endDate 结束时间
*/
public static Integer getDaySub(Date beginDate, Date endDate) {
try {
SimpleDateFormat sdf = SIMPLE_DAY.get();
Date start = sdf.parse(sdf.format(beginDate));
Date end = sdf.parse(sdf.format(endDate));
return Math.toIntExact((end.getTime() - start.getTime()) / (24 * 60 * 60 * 1000));
} catch (ParseException e) {
throw new RuntimeException(e);
}
}
public static Date geFirstDayOfThisMonth() {
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MILLISECOND, 0);
calendar.set(Calendar.DAY_OF_MONTH, 1);
return calendar.getTime();
}
/**
* 获取本月最后一天
*/
public static Date geLastDayOfThisMonth() {
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
cal.roll(Calendar.DAY_OF_MONTH, -1);
return cal.getTime();
}
public static Date getThirtyMinuteLate() {
Calendar now = Calendar.getInstance();
now.add(Calendar.MINUTE, 30);
return now.getTime();
}
public static Date getSecondsLate(Date date, int seconds) {
Calendar result = Calendar.getInstance();
result.setTime(date);
result.add(Calendar.SECOND, seconds);
return result.getTime();
}
public static Date getMinutesLate(Date date, int minutes) {
Calendar result = Calendar.getInstance();
result.setTime(date);
result.add(Calendar.MINUTE, minutes);
return result.getTime();
}
public static Date getHoursLate(Date date, int hours) {
Calendar result = Calendar.getInstance();
result.setTime(date);
result.add(Calendar.HOUR, hours);
return result.getTime();
}
public static Date getDaysLate(Date date, int days) {
Calendar result = Calendar.getInstance();
result.setTime(date);
result.add(Calendar.DAY_OF_MONTH, days);
return result.getTime();
}
public static Date getMonthsLate(Date date, int months) {
Calendar result = Calendar.getInstance();
result.setTime(date);
result.add(Calendar.MONTH, months);
return result.getTime();
}
public static Date getZeroTime(Date date) {
Calendar result = Calendar.getInstance();
result.setTime(date);
result.set(Calendar.HOUR_OF_DAY, 0);
result.set(Calendar.MINUTE, 0);
result.set(Calendar.SECOND, 0);
result.set(Calendar.MILLISECOND, 0);
return result.getTime();
}
public static boolean isExpireDays(Date date, int i) {
Calendar createDate = Calendar.getInstance();
createDate.setTime(date);
createDate.add(Calendar.DATE, i);
return createDate.before(new Date());
}
public static Integer getPersonAgeFromIdCard(String pensonnelIdCard) {
//截取身份证中出行人出生日期中的年、月、日
Integer personYear = Integer.parseInt(pensonnelIdCard.substring(6, 10));
Integer personMonth = Integer.parseInt(pensonnelIdCard.substring(10, 12));
Integer personDay = Integer.parseInt(pensonnelIdCard.substring(12, 14));
Calendar cal = Calendar.getInstance();
// 得到当前时间的年、月、日
Integer yearNow = cal.get(Calendar.YEAR);
Integer monthNow = cal.get(Calendar.MONTH) + 1;
Integer dayNow = cal.get(Calendar.DATE);
// 用当前年月日减去生日年月日
Integer yearMinus = yearNow - personYear;
Integer monthMinus = monthNow - personMonth;
Integer dayMinus = dayNow - personDay;
Integer age = yearMinus; //先大致赋值
if (yearMinus == 0) { //出生年份为当前年份
age = 0;
} else { //出生年份大于当前年份
if (monthMinus < 0) {//出生月份小于当前月份时,还没满周岁
age = age - 1;
}
if (monthMinus == 0) {//当前月份为出生月份时,判断日期
if (dayMinus < 0) {//出生日期小于当前月份时,没满周岁
age = age - 1;
}
}
}
return age;
}
public static Date getToday() {
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MILLISECOND, 0);
return calendar.getTime();
}
public static Integer getYear() {
Calendar calendar = Calendar.getInstance();
return calendar.get(Calendar.YEAR);
}
public static Integer getMonth() {
Calendar calendar = Calendar.getInstance();
return calendar.get(Calendar.MONTH) + 1;
}
public static Integer getDay() {
Calendar calendar = Calendar.getInstance();
return calendar.get(Calendar.DATE);
}
public static Date getYesterday() {
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DATE, -1);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MILLISECOND, 0);
return calendar.getTime();
}
public static Date getBeForeYesterday() {
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DATE, -2);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MILLISECOND, 0);
return calendar.getTime();
}
public static Date setDayToNum(int day) {
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DATE, day);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MILLISECOND, 0);
return calendar.getTime();
}
public static Date getLastWeek() {
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DATE, -7);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MILLISECOND, 0);
return calendar.getTime();
}
public static Date getSixDaysAgo() {
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DATE, -6);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MILLISECOND, 0);
return calendar.getTime();
}
public static Date getTomorrow() {
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DATE, 1);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MILLISECOND, 0);
return calendar.getTime();
}
public static Integer getTimeHour() {
Calendar calendar = Calendar.getInstance();
return calendar.get(Calendar.HOUR_OF_DAY);
}
public static Date getTodayHour(String end) {
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.MILLISECOND, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.HOUR_OF_DAY, Integer.parseInt(end));
return calendar.getTime();
}
public static Integer getTimeStampSec() {
return Integer.valueOf(String.valueOf(Instant.now().getEpochSecond()));
}
public static Date getDayOfMonth(Integer month) {
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.DAY_OF_MONTH, month);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MILLISECOND, 0);
return calendar.getTime();
}
/**
* "starttime": "11:00",
* "endtime": "20:00",
*
* @param startTime
* @param endTime
* @return
*/
public static int verificationPeriod(String startTime, String endTime) {
int status = 0;
SimpleDateFormat sdf = SIMPLE_DAY.get();
SimpleDateFormat sdtf = SIMPLE_DATE_FORMAT.get();
if (StringUtils.hasLength(startTime) && StringUtils.hasLength(endTime) && startTime.length() == 5 && endTime.length() == 5) {
String currentDay = sdf.format(new Date());
Long current = System.currentTimeMillis();
//日期补全
String startStr = new StringBuilder(currentDay).append(" ").append(startTime).append(":00").toString();
String endStr = new StringBuilder(currentDay).append(" ").append(endTime).append(":00").toString();
synchronized (DateUtil.class) {
try {
Long start = sdtf.parse(startStr).getTime();
Long end = sdtf.parse(endStr).getTime();
//判断是否跨天
if (start > end) {
status = current - end >= 0 && current - start <= 0 ? 1 : 0;
} else {
status = start.equals(end) ? 0 : current - start >= 0 && current - end <= 0 ? 0 : 1;
}
} catch (Exception e) {
log.error("错误的日期格式 开始时间 {} 结束时间{}", startTime, endTime);
}
}
}
return status;
}
public static Date convertFromString(String dateString, String format) {
SimpleDateFormat ft = new SimpleDateFormat(format);
try {
return ft.parse(dateString);
} catch (Exception e) {
throw new RuntimeException(e.getMessage());
}
}
public static String convertFromDate(Date date, String format) {
SimpleDateFormat ft = new SimpleDateFormat(format);
return ft.format(date);
}
public static Date convertLocalDateTimeToDate(LocalDateTime localDateTime) {
ZoneId zoneId = ZoneId.systemDefault();
ZonedDateTime zdt = localDateTime.atZone(zoneId);
return Date.from(zdt.toInstant());
}
public static Integer getDays(Integer number, Integer type) {
int days = 0;
//计算包对应时长
switch (type) {
case 1: // 天
days = number;
break;
case 2: // 月
days = number * 30;
break;
case 3: //年
days = number * 365;
break;
default:
Assert.isTrue(false, "时间类型错误");
}
return days;
}
/**
* 指定日期后x天的日期
*
* @param start 日期
* @param day 天数
* @return
*/
public static Date getSpecifyDay(Date start, int day) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(start);
calendar.add(Calendar.DATE, day);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MILLISECOND, 0);
return calendar.getTime();
}
public static Date getBegin(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MILLISECOND, 0);
return calendar.getTime();
}
public static Date getEnd(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.set(Calendar.SECOND, 59);
calendar.set(Calendar.MINUTE, 59);
calendar.set(Calendar.HOUR_OF_DAY, 23);
calendar.set(Calendar.MILLISECOND, 999);
return calendar.getTime();
}
public static Date getMonthBegin(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.MONTH, 0);
calendar.set(Calendar.DAY_OF_MONTH, 1);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MILLISECOND, 0);
return calendar.getTime();
}
public static Date getMonthEnd(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
calendar.set(Calendar.SECOND, 59);
calendar.set(Calendar.MINUTE, 59);
calendar.set(Calendar.HOUR_OF_DAY, 23);
calendar.set(Calendar.MILLISECOND, 999);
return calendar.getTime();
}
public static Long getExpireSecondWithTimestamp(int seconds) {
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.SECOND, seconds);
return calendar.getTime().getTime();
}
/**
* 日期是否为周六/周日
*
* @param day
* @return
*/
public static Boolean dayOfWeek(String day) {
DateTimeFormatter formatter = THREAD_LOCAL_FORMAT.get();
LocalDate date = LocalDate.parse(day, formatter);
switch (date.getDayOfWeek()) {
case SATURDAY:
case SUNDAY:
return true;
default:
return false;
}
}
}

View File

@@ -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();
}
}
}

View File

@@ -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";
}

View File

@@ -0,0 +1,92 @@
package org.springblade.modules.appFormal.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.redis.ratelimiter.RateLimiter;
import org.springblade.core.tool.api.R;
import org.springblade.modules.appFormal.dto.PayOrderDicDTO;
import org.springblade.modules.appFormal.manager.FormalAppBaseManager;
import org.springblade.modules.appFormal.manager.FormalAppCustomerManager;
import org.springblade.modules.appFormal.manager.FormalAppMallManager;
import org.springblade.modules.appFormal.request.CustomerSmsRequest;
import org.springblade.modules.appFormal.vo.AppFormalBannerVO;
import org.springblade.modules.appFormal.vo.AppFormalMallSpuVO;
import org.springblade.modules.appFormal.vo.MallCategoryVO;
import org.springblade.modules.mall.pojo.vo.MallSpuVO;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.concurrent.TimeUnit;
@RestController
@AllArgsConstructor
@RequestMapping("formal-app/base")
@Tag(name = "基本信息", description = "基本信息接口")
public class FormalBaseController {
private final FormalAppBaseManager appBaseManager;
private final FormalAppCustomerManager formalAppCustomerManager;
private final FormalAppMallManager mallProductManager;
@Operation(summary = "隐私政策")
@GetMapping("/formal-app-privacy")
public R<String> formalAppPrivacy() {
return R.data(appBaseManager.formalAppPrivacy());
}
@Operation(summary = "用户协议")
@GetMapping("/formal-app-agreement")
public R<String> formalAppAgreement() {
return R.data(appBaseManager.formalAppAgreement());
}
@RateLimiter(value = "yichayilu:sms:send", param = "#request.getPhone()", max =3, ttl = 12, timeUnit = TimeUnit.HOURS)
@Operation(summary = "发送验证码")
@PostMapping("/send-sms-code")
public R<Boolean> sendSmsCode(@RequestBody CustomerSmsRequest request) {
return R.data(formalAppCustomerManager.sendSmsCode(request.getPhone()));
}
/**
* 分类
*/
@Operation(summary = "商品类别")
@GetMapping("/find-category")
public R<List<MallCategoryVO>> findCategories() {
return R.data(mallProductManager.findCategories());
}
/**
* 商品列表
*/
@Operation(summary = "商品分页")
@GetMapping("/spu-list")
public R<IPage<AppFormalMallSpuVO>> list(Query query , AppFormalMallSpuVO spuVO) {
return R.data(mallProductManager.getSpuPage(Condition.getPage(query), spuVO));
}
@Operation(summary = "获得主banner")
@GetMapping("/find-main-banner")
public R<List<AppFormalBannerVO>> findMainBanner() {
return R.data(appBaseManager.findMainBanner());
}
@Operation(summary = "获得商城banner")
@GetMapping("/find-mall-banner")
public R<List<AppFormalBannerVO>> findMallBanner() {
return R.data(appBaseManager.findMallBanner());
}
}

View File

@@ -0,0 +1,111 @@
package org.springblade.modules.appFormal.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.modules.appFormal.manager.FormalAppCustomerManager;
import org.springblade.modules.appFormal.request.AppUserNoticeRequest;
import org.springblade.modules.appFormal.request.CustomerSmsRequest;
import org.springblade.modules.appFormal.request.UpdatePasswordRequest;
import org.springblade.modules.appFormal.vo.AppUserNoticeVO;
import org.springblade.modules.appFormal.vo.MallIntegralLogVO;
import org.springblade.modules.appFormal.vo.MallIntegralVO;
import org.springblade.modules.appFormal.vo.UserInfoVO;
import org.springframework.web.bind.annotation.*;
@RestController
@AllArgsConstructor
@RequestMapping("formal-app/customer")
@Tag(name = "用户信息", description = "用户信息接口")
@Slf4j
public class FormalCustomerController {
private final FormalAppCustomerManager formalAppCustomerManager;
//用户相关
@Operation(summary = "校验短信")
@PostMapping("/check-sms-code")
public R<Boolean> checkSmsCode(@RequestBody CustomerSmsRequest request) {
return R.data(formalAppCustomerManager.checkSmsCode(request));
}
@Operation(summary = "查询用户信息")
@GetMapping("/find-userInfo")
public R<UserInfoVO> findUserInfo() {
return R.data(formalAppCustomerManager.findUserInfo(AuthUtil.getUserId()));
}
@Operation(summary = "修改密码")
@PutMapping("/update-password")
public R<Boolean> updatePassword(@RequestBody UpdatePasswordRequest request) {
return R.data(formalAppCustomerManager.updatePassword(request.setId(AuthUtil.getUserId())));
}
@Operation(summary = "修改密码")
@PutMapping("/update-password-non-code")
public R<Boolean> updatePasswordNonCode(@RequestBody UpdatePasswordRequest request) {
return R.data(formalAppCustomerManager.updatePasswordNonCode(request.setId(AuthUtil.getUserId())));
}
@Operation(summary = "用户退出登录")
@PostMapping("/userLogout")
public R<Boolean> userLogout() {
return R.data(formalAppCustomerManager.userLogout());
}
@Operation(summary = "账号注销")
@DeleteMapping("/delete-account")
public R<Boolean> deleteAccount() {
return R.data(formalAppCustomerManager.deleteAccount(AuthUtil.getUserId()));
}
// 商城积分相关
@Operation(summary = "查询商城积分")
@GetMapping("/find-mall-integral")
public R<MallIntegralVO> findMallIntegral() {
return R.data(formalAppCustomerManager.findMallIntegral(AuthUtil.getUserId()));
}
@Operation(summary = "查询商城积分流水")
@GetMapping("/mall-integral-log-page")
public R<IPage<MallIntegralLogVO>> findMallIntegralFlow(Query query , MallIntegralLogVO logVO) {
return R.data(formalAppCustomerManager.findMallIntegralFlow(Condition.getPage(query), logVO, AuthUtil.getUserId()));
}
@Operation(summary = "查询用户通知")
@GetMapping("/find-user-notice-page")
public R<IPage<AppUserNoticeVO>> findUserNoticePage(Query query , AppUserNoticeVO userNotice) {
return R.data(formalAppCustomerManager.findUserNoticePage(Condition.getPage(query), userNotice, AuthUtil.getUserId()));
}
@Operation(summary = "读取用户通知")
@PostMapping("/read-user-notice")
public R<Boolean> readUserNotice(@RequestBody AppUserNoticeRequest request) {
return R.status(formalAppCustomerManager.readUserNotice(request.getNoticeId()));
}
@Operation(summary = "未读消息总数")
@GetMapping("/not-read-notice-count")
public R<Integer> notReadNoticeCount(AppUserNoticeVO userNotice) {
return R.data(formalAppCustomerManager.notReadNoticeCount(userNotice ,AuthUtil.getUserId()));
}
}

View File

@@ -0,0 +1,95 @@
package org.springblade.modules.appFormal.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.modules.appFormal.manager.FormalAppMallManager;
import org.springblade.modules.appFormal.request.AddressRemoveRequest;
import org.springblade.modules.appFormal.request.AddressSubmitRequest;
import org.springblade.modules.appFormal.request.MallCartRemoveRequest;
import org.springblade.modules.appFormal.request.MallCartRequest;
import org.springblade.modules.appFormal.vo.*;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@AllArgsConstructor
@RequestMapping("formal-app/mall")
@Tag(name = "商城信息", description = "商城信息接口")
public class FormalMallController {
private final FormalAppMallManager mallProductManager;
//购物车相关
@Operation(summary = "购物车列表")
@GetMapping("/cart-list")
public R<IPage<AppFormalMallCartVO>> cartList(Query query, AppFormalMallCartVO cartVO) {
return R.data(mallProductManager.cartList(Condition.getPage( query), cartVO , AuthUtil.getUserId()));
}
@Operation(summary = "添加购物车")
@PostMapping("/add-cart")
public R<AppFormalMallCartInfoVO> addCart(@RequestBody MallCartRequest request) {
return R.data(mallProductManager.addCart(request.setUserId(AuthUtil.getUserId())));
}
@Operation(summary = "添加购物车(创建订单之前调用)")
@PostMapping("/add-cart-to-order")
public R<AppFormalMallCartInfoVO> addCartToOrder(@RequestBody MallCartRequest request) {
return R.data(mallProductManager.addCartToOrder(request.setUserId(AuthUtil.getUserId())));
}
@Operation(summary = "删除购物车")
@DeleteMapping("/delete-cart")
public R<Boolean> deleteCart(@RequestBody MallCartRemoveRequest request) {
return R.status(mallProductManager.deleteCart(request.getIds()));
}
@Operation(summary = "购物车修改数量")
@PostMapping("/update-cart-quantity")
public R<Boolean> updateCartQuantity(@RequestBody MallCartRequest request) {
return R.status(mallProductManager.updateCartQuantity(request));
}
//收货地址相关
@Operation(summary = "省市区列表")
@GetMapping("/region-list")
public R<List<AppFormalRegionInfoVO>> regionInfoList(@RequestParam Integer level, @RequestParam Long pid) {
return R.data(mallProductManager.regionInfoList(level , pid));
}
@Operation(summary = "添加收货地址")
@PostMapping("/add-address")
public R<Boolean> addAddressInfo(@RequestBody AddressSubmitRequest request){
return R.data(mallProductManager.submitAddressInfo(request));
}
@Operation(summary = "修改收货地址")
@PostMapping("/update-address")
public R<Boolean> updateAddressInfo(@RequestBody AddressSubmitRequest request){
return R.data(mallProductManager.submitAddressInfo(request));
}
@Operation(summary = "删除收货地址")
@DeleteMapping("/delete-address")
public R<Boolean> deleteAddressInfo( @RequestBody AddressRemoveRequest request){
return R.data(mallProductManager.deleteAddressInfo(request.getIds()));
}
@Operation(summary = "收货地址列表")
@GetMapping("/address-list")
public R<List<AppFormalAddressVO>> addressInfoList(){
return R.data(mallProductManager.addressInfoList(AuthUtil.getUserId()));
}
}

View File

@@ -0,0 +1,99 @@
package org.springblade.modules.appFormal.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.modules.appFormal.dto.PayOrderDicDTO;
import org.springblade.modules.appFormal.manager.FormalAppBaseManager;
import org.springblade.modules.appFormal.manager.FormalAppOrderManager;
import org.springblade.modules.appFormal.request.*;
import org.springblade.modules.appFormal.vo.*;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@AllArgsConstructor
@RequestMapping("formal-app/order")
@Tag(name = "订单信息", description = "订单信息接口")
public class FormalOrderController {
private final FormalAppOrderManager formalAppOrderManager;
private final FormalAppBaseManager appBaseManager;
/**
* 订单类型列表
* @return
*/
@Operation(summary = "订单类型列表")
@GetMapping("/find-orderBizModel")
public R<List<PayOrderDicDTO>> orderBizModel(){
return R.data(formalAppOrderManager.orderBizModel());
}
/**
* 订单列表分页
*/
@Operation(summary = "订单列表分页")
@GetMapping("/order-list")
public R<IPage<AppFormalOrderVO>> orderList(Query query, AppFormalOrderVO orderVO) {
return R.data(formalAppOrderManager.getOrderList(Condition.getPage( query), orderVO));
}
@Operation(summary = "商城订单详情")
@GetMapping("/mall-order-detail")
public R<AppFormalMallOrderVO> mallOrderDetail(Long id) {
return R.data(formalAppOrderManager.mallOrderDetail(id));
}
/**
* 提交订单
*/
@PostMapping("/mall-make-order")
public R<AppFormalPreviewOrderVO> mallMakeOrder( @RequestBody AppFormalPreviewOrderRequest request) {
return R.data(formalAppOrderManager.mallMakeOrder(request, AuthUtil.getUserId()));
}
/**
* 取消订单
*/
@PostMapping("/mall-cancel-order")
public R<Boolean> mallCancelOrder( @RequestBody AppForOrderIdRequest request) {
return R.data(formalAppOrderManager.mallCancelOrder(request.getId(), AuthUtil.getUserId()));
}
/**
* 确认收货
*/
@PostMapping("/mall-confirm-receipt")
public R<Boolean> mallConfirmReceipt( @RequestBody AppForOrderIdRequest request) {
return R.data(formalAppOrderManager.mallConfirmReceipt(request.getId(), AuthUtil.getUserId()));
}
/**
* 支付类型
* @return
*/
@Operation(summary = "获取支付类型")
@GetMapping("/find-payType")
public R<List<PayOrderDicDTO>> payType(Integer payModel){
return R.data(appBaseManager.payType(payModel));
}
}

View File

@@ -0,0 +1,28 @@
package org.springblade.modules.appFormal.convert;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import org.springblade.modules.appFormal.vo.AppFormalBannerVO;
import org.springblade.modules.appFormal.vo.AppUserNoticeVO;
import org.springblade.modules.appFormal.vo.MallIntegralLogVO;
import org.springblade.modules.customer.pojo.entity.UserNoticeEntity;
import org.springblade.modules.mall.pojo.entity.AppBannerEntity;
import org.springblade.modules.userPoint.pojo.entity.UserMallIntegralLogEntity;
import java.util.List;
/**
* @author jack
*/
@Mapper
public interface AppBaseConvert {
AppBaseConvert INSTANCE = Mappers.getMapper(AppBaseConvert.class);
List<AppFormalBannerVO> convertBannerListToVO(List<AppBannerEntity> bannerEntityList);
AppUserNoticeVO convertUserNoticePageToVO(UserNoticeEntity userNoticeEntity);
}

View File

@@ -0,0 +1,48 @@
package org.springblade.modules.appFormal.convert;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import org.springblade.modules.appFormal.request.AddressSubmitRequest;
import org.springblade.modules.appFormal.vo.*;
import org.springblade.modules.mall.pojo.entity.MallCartEntity;
import org.springblade.modules.mall.pojo.entity.MallSpuEntity;
import org.springblade.modules.mall.pojo.entity.UserAddressEntity;
import org.springblade.modules.mall.pojo.entity.YsCategoryEntity;
import org.springblade.modules.userPoint.pojo.entity.UserMallIntegralLogEntity;
import java.util.List;
/**
* @author jack
*/
@Mapper
public interface AppFormalMallConvert {
AppFormalMallConvert INSTANCE = Mappers.getMapper(AppFormalMallConvert.class);
AppFormalMallSpuVO convertMallSpuToVO(MallSpuEntity entity);
List<AppFormalMallSpuVO> convertMallSpuListToVO(List<MallSpuEntity> list);
Page<AppFormalMallSpuVO> convertMallSpuPageToVO(Page<MallSpuEntity> page);
MallCategoryVO convertMallCategoryToVO(YsCategoryEntity entity);
List<MallCategoryVO> convertMallCategoryListToVO(List<YsCategoryEntity> list);
AppFormalMallCartVO convertMallCartToVO(MallCartEntity entity);
List<AppFormalMallCartVO> convertMallCartListToVO(List<MallCartEntity> list);
Page<AppFormalMallCartVO> convertMallCartPageToVO(Page<MallCartEntity> page);
UserAddressEntity convertRequestToPo(AddressSubmitRequest request);
AppFormalAddressVO convertPoToVO(UserAddressEntity address);
List<AppFormalAddressVO> convertPoListToVoList(List<UserAddressEntity> addressList);
}

View File

@@ -0,0 +1,27 @@
package org.springblade.modules.appFormal.convert;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import org.springblade.modules.appFormal.vo.MallIntegralLogVO;
import org.springblade.modules.userPoint.pojo.entity.UserMallIntegralLogEntity;
import java.util.List;
/**
* @author jack
*/
@Mapper
public interface AppUserInfoConvert {
AppUserInfoConvert INSTANCE = Mappers.getMapper(AppUserInfoConvert.class);
MallIntegralLogVO convertIntegralToVO(UserMallIntegralLogEntity entity);
List<MallIntegralLogVO> convertIntegralListToVO(List<UserMallIntegralLogEntity> list);
Page<MallIntegralLogVO> convertIntegralPageToVO(Page<UserMallIntegralLogEntity> page);
}

View File

@@ -0,0 +1,46 @@
package org.springblade.modules.appFormal.convert;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Named;
import org.mapstruct.factory.Mappers;
import org.springblade.modules.appFormal.dto.PreviewDTO;
import org.springblade.modules.appFormal.enums.BizTypeEnum;
import org.springblade.modules.appFormal.event.OrderEvent;
import org.springblade.modules.appFormal.vo.AppFormalMallDetailOrderVO;
import org.springblade.modules.appFormal.vo.AppFormalMallOrderVO;
import org.springblade.modules.appFormal.vo.AppFormalOrderVO;
import org.springblade.modules.appFormal.vo.AppFormalPreviewOrderVO;
import org.springblade.modules.order.pojo.entity.MallDetailOrderEntity;
import org.springblade.modules.order.pojo.entity.MallSummaryOrderEntity;
import org.springblade.modules.order.pojo.entity.UserOrderEntity;
/**
* @author jack
*/
@Mapper
public interface AppUserOrderConvert {
AppUserOrderConvert INSTANCE = Mappers.getMapper(AppUserOrderConvert.class);
AppFormalOrderVO convertOrderToVO(UserOrderEntity order);
AppFormalMallOrderVO convertMallOrderToVO(MallSummaryOrderEntity order);
AppFormalMallDetailOrderVO convertEntityToVO(MallDetailOrderEntity order);
AppFormalPreviewOrderVO convertPreviewDTOToVO(PreviewDTO previewDTO);
MallSummaryOrderEntity convertPreviewDTOToOrder(PreviewDTO previewDTO);
MallDetailOrderEntity convertSkuDTOToDetailOrder(PreviewDTO.SkuDTO sku);
UserOrderEntity convertEventToOrder(OrderEvent event);
}

View File

@@ -0,0 +1,12 @@
package org.springblade.modules.appFormal.dto;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class CutAmountRangDTO {
private BigDecimal min;
private BigDecimal max;
}

View File

@@ -0,0 +1,40 @@
package org.springblade.modules.appFormal.dto;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import java.math.BigDecimal;
/**
* 字典
*
* @author ganwu
*/
@Data
@Accessors(chain = true)
public class PayOrderDicDTO {
/**
* 主键
*/
private Integer id;
/**
* 标识
*/
private String code;
/**
* 名称
*/
private String name;
/**
* 描述
*/
private BigDecimal des;
}

View File

@@ -0,0 +1,105 @@
package org.springblade.modules.appFormal.dto;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springblade.modules.mall.pojo.entity.UserAddressEntity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Collections;
import java.util.List;
@Data
@Accessors(chain = true)
public class PreviewDTO implements Serializable {
private List<SkuDTO> skuList = Collections.emptyList();
private BigDecimal freight = BigDecimal.ZERO;
private Long vendorRegionsId;
private Long addressId;
private UserAddressEntity address;
private Long userId;
private BigDecimal orderAmount = BigDecimal.ZERO;
private BigDecimal freightAmount = BigDecimal.ZERO;
private BigDecimal regularAmount = BigDecimal.ZERO;
private BigDecimal totalAmount = BigDecimal.ZERO;
private BigDecimal costAmount = BigDecimal.ZERO;
@Data
public static class SkuDTO implements Serializable {
private Long spuId = -1L;
/**
* 商品编码
*/
private String spuSn;
/**
* 商品名称
*/
private String spuName;
/**
* 主图
*/
private String mainImg;
/**
* 详情图(多图,逗号分割)
*/
private String detailImg;
/**
* 顶图(多图,逗号分割)
*/
private String topImg;
/**
* cate_id分类
*/
private String cateId;
/**
* cate_id分类
*/
private String cateIds;
private BigDecimal costPrice;
/**
* 原价
*/
private BigDecimal originalPrice;
/**
* 销售价
*/
private BigDecimal retailPrice;
/**
* 销量
*/
private Integer sales;
/**
* 库存
*/
private Integer spuQty;
/**
* 标签(多标签,逗号分割 )
*/
private String tags;
private Integer quantity;
}
}

View File

@@ -0,0 +1,49 @@
package org.springblade.modules.appFormal.enums;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
@Getter
@AllArgsConstructor
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum BizTypeEnum {
MALL(1, "商城");
final Integer code;
final String name;
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
public static BizTypeEnum of(Integer code) {
if (code == null) return null;
return Arrays.stream(BizTypeEnum.values()).filter(i -> i.getCode() == code.intValue()).findAny().orElse(null);
}
/**
* 获取订单 状态
* @param orderType
* @param orderStatus
* @return
*/
public static String getStatusName(Integer orderType, Integer orderStatus) {
BizTypeEnum bizTypeEnum = of(orderType);
if (bizTypeEnum == null) return "";
switch (bizTypeEnum) {
case MALL:
return MallOrderStatusEnum.getByCode(orderStatus).getDescription();
}
return "";
}
}

View File

@@ -0,0 +1,37 @@
package org.springblade.modules.appFormal.enums;
import lombok.Getter;
@Getter
public enum MallOrderStatusEnum {
FAIL(0, "已取消-商品无库存"),
WAIT_PAY(1, "待支付"),
WAIT_DELIVERY(2, "待发货"),
WAIT_RECEIVE(3, "待收货"),
COMPLETED(4, "已完成"),
CANCELED(5, "已取消"),
AFTER_SERVICE(6, "售后中"),
FINISHED(7, "已关闭"),
FINISHED_AFTER(11, "已售后完成"),
;
private final int code;
private final String description;
MallOrderStatusEnum(int code, String description) {
this.code = code;
this.description = description;
}
// 通过code获取对应的枚举值
public static MallOrderStatusEnum getByCode(int code) {
for (MallOrderStatusEnum status : MallOrderStatusEnum.values()) {
if (status.getCode() == code) {
return status;
}
}
throw new IllegalArgumentException("Invalid PaymentStatus code: " + code);
}
}

View File

@@ -0,0 +1,17 @@
package org.springblade.modules.appFormal.event;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springblade.modules.appFormal.enums.BizTypeEnum;
import java.math.BigDecimal;
import java.util.Date;
@Data
@Accessors(chain = true)
public class OrderConfirmOfflineEvent {
private Long orderId;
private BizTypeEnum orderType;
}

View File

@@ -0,0 +1,50 @@
package org.springblade.modules.appFormal.event;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springblade.modules.appFormal.enums.BizTypeEnum;
import java.math.BigDecimal;
import java.util.Date;
@Data
@Accessors(chain = true)
public class OrderEvent {
private Long userId;
private Long userPhone;
private String userName;
private Integer orderType;
private Long orderId;
private String title;
private String images;
private Integer quantity;
private String description;
private Integer orderStatus;
private BigDecimal totalAmount;
private BigDecimal actualAmount;
private BigDecimal pointAmount;
private BigDecimal dPointAmount;
private BigDecimal tokenAmount;
private Integer paymentType;
private Date paymentTime;
private String paymentTrack;
private Integer paymentStatus;
}

View File

@@ -0,0 +1,83 @@
package org.springblade.modules.appFormal.job;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.modules.appFormal.enums.BizTypeEnum;
import org.springblade.modules.appFormal.enums.MallOrderStatusEnum;
import org.springblade.modules.order.pojo.entity.MallDetailOrderEntity;
import org.springblade.modules.order.pojo.entity.MallSummaryOrderEntity;
import org.springblade.modules.order.pojo.entity.UserOrderEntity;
import org.springblade.modules.order.service.IMallDetailOrderService;
import org.springblade.modules.order.service.IMallSummaryOrderService;
import org.springblade.modules.order.service.IUserOrderService;
import org.springblade.modules.payment.enums.PaymentStatusEnum;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
@AllArgsConstructor
@Slf4j
public class AppFormalMallUserOrderJob {
private final IMallDetailOrderService mallDetailOrderService;
private final IMallSummaryOrderService mallSummaryOrderService;
private final IUserOrderService userOrderService;
// 商城订单关闭 三天一次
@XxlJob("yichayilu-mall-order-close")
public void mallOrderClose(){
List<MallSummaryOrderEntity> mallSummaryOrderList = mallSummaryOrderService.list(
Wrappers.lambdaQuery(MallSummaryOrderEntity.class)
.eq(MallSummaryOrderEntity::getPaymentStatus, PaymentStatusEnum.AWAIT.getCode())
.eq(MallSummaryOrderEntity::getOrderStatus, MallOrderStatusEnum.WAIT_PAY.getCode())
);
List<MallSummaryOrderEntity> closeOrderList = mallSummaryOrderList.stream().filter(order -> order.getExpireTime().getTime() < System.currentTimeMillis()).toList();
closeOrderList.forEach(summaryOrder -> {
summaryOrder.setOrderStatus(MallOrderStatusEnum.FINISHED.getCode());
summaryOrder.setPaymentStatus(PaymentStatusEnum.CLOSE.getCode());
if (mallSummaryOrderService.updateById( summaryOrder)){
List<MallDetailOrderEntity> mallDetailOrderEntities = mallDetailOrderService.list(
Wrappers.lambdaQuery(MallDetailOrderEntity.class)
.eq(MallDetailOrderEntity::getSummaryOrderId, summaryOrder.getId())
.eq(MallDetailOrderEntity::getOrderStatus, MallOrderStatusEnum.WAIT_PAY.getCode())
);
mallDetailOrderEntities.forEach(detailOrder -> {
detailOrder.setOrderStatus(MallOrderStatusEnum.FINISHED.getCode());
});
mallDetailOrderService.updateBatchById(mallDetailOrderEntities);
UserOrderEntity userOrder = userOrderService.getOne(Wrappers.lambdaQuery(UserOrderEntity.class).eq(UserOrderEntity::getOrderId, summaryOrder.getId()).eq(UserOrderEntity::getOrderType, BizTypeEnum.MALL.getCode()));
if (userOrder != null) {
userOrder.setOrderStatus(MallOrderStatusEnum.FINISHED.getCode());
userOrder.setPaymentStatus(PaymentStatusEnum.CLOSE.getCode());
userOrderService.updateById(userOrder);
}
}
});
}
// 商城订单金额入资金账户
@XxlJob("yichayilu-mall-order-recorded")
public void mallOrderRecorded(){
List<MallSummaryOrderEntity> mallSummaryOrderList = mallSummaryOrderService.list(
Wrappers.lambdaQuery(MallSummaryOrderEntity.class)
.eq(MallSummaryOrderEntity::getPaymentStatus, PaymentStatusEnum.PAY.getCode())
.eq(MallSummaryOrderEntity::getIsRecorded, 0)
);
//todo 待完善
}
}

View File

@@ -0,0 +1,63 @@
package org.springblade.modules.appFormal.listener;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.modules.appFormal.convert.AppUserOrderConvert;
import org.springblade.modules.appFormal.enums.MallOrderStatusEnum;
import org.springblade.modules.appFormal.event.OrderConfirmOfflineEvent;
import org.springblade.modules.appFormal.event.OrderEvent;
import org.springblade.modules.order.pojo.entity.UserOrderEntity;
import org.springblade.modules.order.service.IUserOrderService;
import org.springblade.modules.payment.enums.PaymentStatusEnum;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
@Slf4j
@Component
@AllArgsConstructor
public class AppOrderListener {
private final IUserOrderService userOrderService;
@Async("appUserOrderrExecutor")
@EventListener
@Transactional(rollbackFor = RuntimeException.class)
public void appUserOrderSaveListener(OrderEvent event) {
if (event.getTitle() != null && StringUtils.hasLength(event.getTitle()) && event.getTitle().length() > 50) {
// 裁剪
event.setTitle(event.getTitle().substring(0, 50));
}
UserOrderEntity order = userOrderService.getOne(Wrappers.lambdaQuery(UserOrderEntity.class).eq(UserOrderEntity::getOrderId, event.getOrderId()).eq(UserOrderEntity::getOrderType, event.getOrderType()));
// boolean hasOrder = true;
if (order != null) {
UserOrderEntity update = AppUserOrderConvert.INSTANCE.convertEventToOrder(event);
update.setId(order.getId());
userOrderService.updateById(update);
} else {
// hasOrder = false;
userOrderService.save(AppUserOrderConvert.INSTANCE.convertEventToOrder(event));
}
}
@Async("appUserOrderrExecutor")
@EventListener
@Transactional(rollbackFor = RuntimeException.class)
public void appUserOrderUpdateListener(OrderConfirmOfflineEvent event) {
UserOrderEntity order = userOrderService.getOne(Wrappers.lambdaQuery(UserOrderEntity.class).eq(UserOrderEntity::getOrderId, event.getOrderId()).eq(UserOrderEntity::getOrderType, event.getOrderType().getCode()));
if (order != null) {
order.setOrderStatus(MallOrderStatusEnum.WAIT_DELIVERY.getCode());
order.setPaymentStatus(PaymentStatusEnum.PAY.getCode());
userOrderService.updateById(order);
}
}
}

View File

@@ -0,0 +1,98 @@
package org.springblade.modules.appFormal.manager;
import cn.hutool.core.util.PhoneUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.AllArgsConstructor;
import org.springblade.core.jwt.JwtUtil;
import org.springblade.core.jwt.props.JwtProperties;
import org.springblade.core.oauth2.provider.OAuth2Request;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.modules.appFormal.convert.AppBaseConvert;
import org.springblade.modules.appFormal.convert.AppUserInfoConvert;
import org.springblade.modules.appFormal.dto.PayOrderDicDTO;
import org.springblade.modules.appFormal.request.CustomerSmsRequest;
import org.springblade.modules.appFormal.request.UpdatePasswordRequest;
import org.springblade.modules.appFormal.vo.AppFormalBannerVO;
import org.springblade.modules.appFormal.vo.MallIntegralLogVO;
import org.springblade.modules.appFormal.vo.MallIntegralVO;
import org.springblade.modules.appFormal.vo.UserInfoVO;
import org.springblade.modules.appOffline.event.AppUserRevokedEvent;
import org.springblade.modules.mall.pojo.entity.AppBannerEntity;
import org.springblade.modules.mall.service.IAppBannerService;
import org.springblade.modules.sms.service.AliYunSmsService;
import org.springblade.modules.system.pojo.entity.User;
import org.springblade.modules.system.service.IParamService;
import org.springblade.modules.system.service.IUserService;
import org.springblade.modules.userPoint.pojo.entity.UserMallIntegralEntity;
import org.springblade.modules.userPoint.pojo.entity.UserMallIntegralLogEntity;
import org.springblade.modules.userPoint.service.IUserMallIntegralLogService;
import org.springblade.modules.userPoint.service.IUserMallIntegralService;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;
import org.springframework.util.Assert;
import java.math.BigDecimal;
import java.util.List;
import java.util.Objects;
@Component
@AllArgsConstructor
public class FormalAppBaseManager {
private final IParamService paramService;
private final IAppBannerService appBannerService;
public String formalAppPrivacy() {
return paramService.getFormalAppPrivacy();
}
public List<PayOrderDicDTO> payType(Integer payModel) {
return paramService.findAppFormalPayType(payModel);
}
public String formalAppAgreement() {
return paramService.formalAppAgreement();
}
public List<AppFormalBannerVO> findMainBanner() {
List<AppBannerEntity> bannerEntityList = appBannerService.list(
Wrappers.<AppBannerEntity>lambdaQuery()
.eq(AppBannerEntity::getBannerType, 1)
.eq(AppBannerEntity::getIsShow, 1)
.orderByDesc(AppBannerEntity::getId)
);
return AppBaseConvert.INSTANCE.convertBannerListToVO(bannerEntityList);
}
public List<AppFormalBannerVO> findMallBanner() {
List<AppBannerEntity> bannerEntityList = appBannerService.list(
Wrappers.<AppBannerEntity>lambdaQuery()
.eq(AppBannerEntity::getBannerType, 2)
.eq(AppBannerEntity::getIsShow, 1)
.orderByDesc(AppBannerEntity::getId)
);
return AppBaseConvert.INSTANCE.convertBannerListToVO(bannerEntityList);
}
}

View File

@@ -0,0 +1,264 @@
package org.springblade.modules.appFormal.manager;
import cn.hutool.core.util.PhoneUtil;
import cn.hutool.core.util.RadixUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.AllArgsConstructor;
import org.springblade.core.jwt.JwtUtil;
import org.springblade.core.jwt.props.JwtProperties;
import org.springblade.core.oauth2.props.OAuth2Properties;
import org.springblade.core.oauth2.provider.OAuth2Request;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.utils.DigestUtil;
import org.springblade.core.tool.utils.SM2Util;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.modules.appFormal.convert.AppBaseConvert;
import org.springblade.modules.appFormal.convert.AppUserInfoConvert;
import org.springblade.modules.appFormal.request.CustomerSmsRequest;
import org.springblade.modules.appFormal.request.UpdatePasswordRequest;
import org.springblade.modules.appFormal.vo.AppUserNoticeVO;
import org.springblade.modules.appFormal.vo.MallIntegralLogVO;
import org.springblade.modules.appFormal.vo.MallIntegralVO;
import org.springblade.modules.appFormal.vo.UserInfoVO;
import org.springblade.modules.appOffline.event.AppUserRevokedEvent;
import org.springblade.modules.auth.constant.BladeAuthConstant;
import org.springblade.modules.customer.pojo.entity.UserNoticeEntity;
import org.springblade.modules.customer.service.IUserNoticeService;
import org.springblade.modules.mall.pojo.entity.YsCategoryEntity;
import org.springblade.modules.sms.service.AliYunSmsService;
import org.springblade.modules.system.pojo.entity.User;
import org.springblade.modules.system.service.IUserService;
import org.springblade.modules.userPoint.pojo.entity.UserMallIntegralEntity;
import org.springblade.modules.userPoint.pojo.entity.UserMallIntegralLogEntity;
import org.springblade.modules.userPoint.service.IUserMallIntegralLogService;
import org.springblade.modules.userPoint.service.IUserMallIntegralService;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;
import org.springframework.util.Assert;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.function.Predicate;
@Component
@AllArgsConstructor
public class FormalAppCustomerManager {
private final AliYunSmsService aliYunSmsService;
private final IUserService userService;
private final IUserMallIntegralService userMallIntegralService;
private final IUserMallIntegralLogService mallIntegralLogService;
private final IUserNoticeService userNoticeService;
private final JwtProperties jwtProperties;
private final ApplicationEventPublisher publisher;
private final OAuth2Properties properties;
public Boolean sendSmsCode(String phone) {
Assert.notNull(phone , "手机号不能为空");
Assert.isTrue(PhoneUtil.isMobile(phone), "手机号格式不正确");
return aliYunSmsService.sendSms(phone);
}
public Boolean checkSmsCode(CustomerSmsRequest request) {
Assert.notNull(request.getPhone() , "手机号不能为空");
Assert.notNull(request.getCode() , "验证码不能为空");
Assert.isTrue(PhoneUtil.isMobile(request.getPhone()), "手机号格式不正确");
return aliYunSmsService.verifySms(request.getPhone() , request.getCode());
}
public UserInfoVO findUserInfo(Long userId) {
User user = userService.getById(userId);
return new UserInfoVO()
.setUsername(user.getName())
.setPhone(user.getPhone())
.setAvatar(user.getAvatar())
.setInvitationCode(phoneTo32Hex(user.getPhone()));
}
public Boolean updatePassword(UpdatePasswordRequest request) {
Assert.notNull(request.getPhone() , "手机号不能为空");
Assert.notNull(request.getCode() , "验证码不能为空");
Assert.isTrue(PhoneUtil.isMobile(String.valueOf(request.getPhone())), "手机号格式不正确");
aliYunSmsService.verifySms(String.valueOf(request.getPhone()) , request.getCode());
Long phone = request.getPhone();
User user = userService.getOne(
Wrappers.lambdaQuery(User.class)
.eq(User::getPhone, String.valueOf(phone))
);
Assert.notNull(user, "用户不存在");
String decryptPassword = SM2Util.decrypt(request.getPassword(), properties.getPrivateKey());
Predicate<String> isPasswordValid = passwd -> passwd.matches("^(?=.*[0-9])(?=.*[a-zA-Z]){6,12}$");
//去掉上面特殊字符校验
Assert.isTrue(!isPasswordValid.test(decryptPassword), "密码长度必须在6到12位之间,且需要包含大小写英文与数字");
return userService.update(
Wrappers.lambdaUpdate(User.class)
.eq(User::getId, user.getId())
.set(User::getPassword, DigestUtil.encrypt(decryptPassword))
);
}
public Boolean updatePasswordNonCode(UpdatePasswordRequest request) {
Assert.notNull(request.getPhone() , "手机号不能为空");
Assert.isTrue(PhoneUtil.isMobile(String.valueOf(request.getPhone())), "手机号格式不正确");
Long phone = request.getPhone();
User user = userService.getOne(
Wrappers.lambdaQuery(User.class)
.eq(User::getPhone, String.valueOf(phone))
);
Assert.notNull(user, "用户不存在");
String decryptPassword = SM2Util.decrypt(request.getPassword(), properties.getPrivateKey());
Predicate<String> isPasswordValid = passwd -> passwd.matches("^(?=.*[0-9])(?=.*[a-zA-Z]){6,12}$");
//去掉上面特殊字符校验
Assert.isTrue(!isPasswordValid.test(decryptPassword), "密码长度必须在6到12位之间,且需要包含大小写英文与数字");
return userService.update(
Wrappers.lambdaUpdate(User.class)
.eq(User::getId, user.getId())
.set(User::getPassword, DigestUtil.encrypt(decryptPassword))
);
}
public Boolean userLogout() {
BladeUser user = AuthUtil.getUser();
if (user != null && this.jwtProperties.getState()) {
OAuth2Request request = OAuth2Request.create().buildHeaderArgs();
String token = JwtUtil.getToken(request.getToken());
JwtUtil.removeAccessToken(user.getTenantId(), user.getClientId(), String.valueOf(user.getUserId()), token);
JwtUtil.removeRefreshToken(user.getTenantId(), user.getClientId(), String.valueOf(user.getUserId()), token);
}
return Boolean.TRUE;
}
public Boolean deleteAccount(Long userId) {
BladeUser user = AuthUtil.getUser();
boolean update = userService.update(
Wrappers.lambdaUpdate(User.class)
.eq(User::getId, userId)
.set(User::getIsDeleted, 1)
);
if (!update) {
throw new RuntimeException("注销失败");
}
if (user != null && this.jwtProperties.getState()) {
OAuth2Request request = OAuth2Request.create().buildHeaderArgs();
String token = JwtUtil.getToken(request.getToken());
JwtUtil.removeAccessToken(user.getTenantId(), user.getClientId(), String.valueOf(user.getUserId()), token);
JwtUtil.removeRefreshToken(user.getTenantId(), user.getClientId(), String.valueOf(user.getUserId()), token);
}
publisher.publishEvent(
new AppUserRevokedEvent()
.setUserId(userId)
);
return Boolean.TRUE;
}
public MallIntegralVO findMallIntegral(Long userId) {
UserMallIntegralEntity mallIntegral = userMallIntegralService.getById(userId);
if (mallIntegral == null){
mallIntegral = new UserMallIntegralEntity();
mallIntegral.setId(userId);
mallIntegral.setAmount(BigDecimal.ZERO);
mallIntegral.setVersion(1);
if (userMallIntegralService.save(mallIntegral)){
return new MallIntegralVO()
.setAmount(BigDecimal.ZERO);
}
}
return new MallIntegralVO()
.setAmount(mallIntegral.getAmount());
}
public IPage<MallIntegralLogVO> findMallIntegralFlow(IPage<MallIntegralLogVO> page, MallIntegralLogVO logVO, Long userId) {
Page<UserMallIntegralLogEntity> pageResult = mallIntegralLogService.page(
new Page<>(page.getCurrent(), page.getSize()),
Wrappers.lambdaQuery(UserMallIntegralLogEntity.class)
.eq(UserMallIntegralLogEntity::getUserId, userId)
//判断type是否为空
.eq(Objects.nonNull(logVO.getType()), UserMallIntegralLogEntity::getType, logVO.getType())
.eq(Objects.nonNull(logVO.getStatisticalDate()), UserMallIntegralLogEntity::getStatisticalDate, logVO.getStatisticalDate())
.orderByDesc(UserMallIntegralLogEntity::getId)
);
return AppUserInfoConvert.INSTANCE.convertIntegralPageToVO(pageResult);
}
public IPage<AppUserNoticeVO> findUserNoticePage(IPage<AppUserNoticeVO> page, AppUserNoticeVO userNotice, Long userId) {
Page<UserNoticeEntity> pageResult = userNoticeService.page(
new Page<>(page.getCurrent(), page.getSize()),
Wrappers.lambdaQuery(UserNoticeEntity.class)
.eq(UserNoticeEntity::getUserId, userId)
.eq(Objects.nonNull(userNotice.getHasRead()), UserNoticeEntity::getHasRead, userNotice.getHasRead())
.eq(Objects.nonNull(userNotice.getNoticeType()), UserNoticeEntity::getNoticeType, userNotice.getNoticeType())
.orderByDesc(UserNoticeEntity::getHasRead , UserNoticeEntity::getId)
);
return pageResult.convert(AppBaseConvert.INSTANCE::convertUserNoticePageToVO);
}
public boolean readUserNotice(Long noticeId) {
UserNoticeEntity userNotice = userNoticeService.getById(noticeId);
Assert.notNull(userNotice, "通知不存在");
userNotice.setHasRead(1);
userNotice.setReleaseTime(new Date());
return userNoticeService.updateById(userNotice);
}
public Integer notReadNoticeCount(AppUserNoticeVO userNotice ,Long userId) {
long count = userNoticeService.count(
Wrappers.lambdaQuery(UserNoticeEntity.class)
.eq(UserNoticeEntity::getUserId, userId)
.eq(Objects.nonNull(userNotice.getNoticeType()), UserNoticeEntity::getNoticeType, userNotice.getNoticeType())
);
return Math.toIntExact(count);
}
private String phoneTo32Hex(String phone) {
return RadixUtil.encode(BladeAuthConstant.BINARY_TEMPLATE, Long.parseLong(phone));
}
}

View File

@@ -0,0 +1,194 @@
package org.springblade.modules.appFormal.manager;
import cn.hutool.core.lang.Validator;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.AllArgsConstructor;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.modules.appFormal.convert.AppFormalMallConvert;
import org.springblade.modules.appFormal.request.AddressSubmitRequest;
import org.springblade.modules.appFormal.request.MallCartRequest;
import org.springblade.modules.appFormal.vo.*;
import org.springblade.modules.customer.service.IRegionsInfoService;
import org.springblade.modules.mall.pojo.entity.MallCartEntity;
import org.springblade.modules.mall.pojo.entity.MallSpuEntity;
import org.springblade.modules.mall.pojo.entity.UserAddressEntity;
import org.springblade.modules.mall.pojo.entity.YsCategoryEntity;
import org.springblade.modules.mall.pojo.vo.MallSpuVO;
import org.springblade.modules.mall.service.IMallCartService;
import org.springblade.modules.mall.service.IMallSpuService;
import org.springblade.modules.mall.service.IUserAddressService;
import org.springblade.modules.mall.service.IYsCategoryService;
import org.springblade.modules.userPoint.pojo.entity.UserMallIntegralLogEntity;
import org.springframework.stereotype.Component;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import java.math.BigDecimal;
import java.util.List;
import java.util.Objects;
@Component
@AllArgsConstructor
public class FormalAppMallManager {
private final IMallSpuService spuService;
private final IYsCategoryService categoryService;
private final IMallCartService mallCartService;
private final IRegionsInfoService regionInfoService;
private final IUserAddressService addressService;
public List<MallCategoryVO> findCategories() {
List<YsCategoryEntity> list = categoryService.list(
Wrappers.lambdaQuery(YsCategoryEntity.class)
.eq(YsCategoryEntity::getPid, 0)
.orderByDesc(YsCategoryEntity::getId)
);
return AppFormalMallConvert.INSTANCE.convertMallCategoryListToVO(list);
}
public IPage<AppFormalMallSpuVO> getSpuPage(IPage<MallSpuVO> page, AppFormalMallSpuVO spuVO) {
Page<MallSpuEntity> pageResult = spuService.page(
new Page<>(page.getCurrent(), page.getSize()),
Wrappers.lambdaQuery(MallSpuEntity.class)
.eq(StringUtil.isNotBlank(spuVO.getCateId()), MallSpuEntity::getCateId, spuVO.getCateId())
.like(StringUtil.isNotBlank(spuVO.getSpuName()), MallSpuEntity::getSpuName, spuVO.getSpuName())
.orderByDesc(MallSpuEntity::getId)
);
return AppFormalMallConvert.INSTANCE.convertMallSpuPageToVO(pageResult);
}
public IPage<AppFormalMallCartVO> cartList(IPage<AppFormalMallCartVO> page, AppFormalMallCartVO cartVO, Long userId) {
Page<MallCartEntity> pageResult = mallCartService.page(
new Page<>(page.getCurrent(), page.getSize()),
Wrappers.lambdaQuery(MallCartEntity.class)
.eq(MallCartEntity::getUserId, userId)
.like(StringUtil.isNotBlank(cartVO.getTitle()), MallCartEntity::getTitle, cartVO.getTitle())
.orderByDesc(MallCartEntity::getId)
);
return AppFormalMallConvert.INSTANCE.convertMallCartPageToVO(pageResult);
}
public AppFormalMallCartInfoVO addCart(MallCartRequest request) {
MallSpuEntity mallSpu = spuService.getById(request.getSpuId());
Assert.notNull(mallSpu, "商品不存在");
MallCartEntity mallCart = mallCartService.getOne(
Wrappers.lambdaQuery(MallCartEntity.class)
.eq(MallCartEntity::getUserId, request.getUserId())
.eq(MallCartEntity::getSpuId, request.getSpuId())
);
if (mallCart != null){
mallCart.setQuantity(mallCart.getQuantity() + request.getQuantity());
if (!mallCartService.updateById(mallCart)){
throw new RuntimeException("更新购物车失败");
}
return new AppFormalMallCartInfoVO().setId( mallCart.getId()).setFreight(BigDecimal.ZERO);
}
MallCartEntity cart = new MallCartEntity();
cart.setUserId(request.getUserId());
cart.setTitle(mallSpu.getSpuName());
cart.setQuantity(request.getQuantity());
cart.setSpuId(request.getSpuId());
cart.setMainImg(mallSpu.getMainImg());
cart.setOriginalPrice(mallSpu.getOriginalPrice());
cart.setRetailPrice(mallSpu.getRetailPrice());
if (mallCartService.save(cart)){
return new AppFormalMallCartInfoVO().setFreight(BigDecimal.ZERO).setId(cart.getId());
}
throw new RuntimeException("添加购物车失败");
}
public AppFormalMallCartInfoVO addCartToOrder(MallCartRequest request) {
MallSpuEntity mallSpu = spuService.getById(request.getSpuId());
Assert.notNull(mallSpu, "商品不存在");
MallCartEntity cart = new MallCartEntity();
cart.setUserId(request.getUserId());
cart.setTitle(mallSpu.getSpuName());
cart.setQuantity(request.getQuantity());
cart.setSpuId(request.getSpuId());
cart.setMainImg(mallSpu.getMainImg());
cart.setOriginalPrice(mallSpu.getOriginalPrice());
cart.setRetailPrice(mallSpu.getRetailPrice());
if (mallCartService.save(cart)){
return new AppFormalMallCartInfoVO().setFreight(BigDecimal.ZERO).setId(cart.getId());
}
throw new RuntimeException("添加购物车失败");
}
public boolean deleteCart(List<Long> ids) {
return mallCartService.removeBatchByIds(ids);
}
public boolean updateCartQuantity(MallCartRequest request) {
Assert.isTrue(request.getQuantity() > 0, "商品数量不能小于0");
MallCartEntity mallCartEntity = mallCartService.getById(request.getId());
Assert.notNull(mallCartEntity, "商品不存在");
if (request.getType() == 1){
mallCartEntity.setQuantity(mallCartEntity.getQuantity() + request.getQuantity());
return mallCartService.updateById(mallCartEntity);
}
if ((mallCartEntity.getQuantity() - request.getQuantity()) <= 0){
return mallCartService.removeById(request.getId());
}
mallCartEntity.setQuantity(mallCartEntity.getQuantity() - request.getQuantity());
return mallCartService.updateById(mallCartEntity);
}
public List<AppFormalRegionInfoVO> regionInfoList(Integer level, Long pid) {
return regionInfoService.regionInfoList(level, pid);
}
public Boolean submitAddressInfo(AddressSubmitRequest request) {
FullRegionInfoVO regionInfo = regionInfoService.queryFullInfo(request.getRegionsInfoId());
Assert.isTrue(regionInfo.getCurrentLevel() == 4, "请选择所属街道");
Assert.isTrue(Validator.isMobile(request.getPhone()), "手机号码格式不正确");
Assert.isTrue(request.getConsignee().length() < 100 , "名字不能超过100个字");
UserAddressEntity address = AppFormalMallConvert.INSTANCE.convertRequestToPo(request);
address
.setProvince(regionInfo.getProvince())
.setCity(regionInfo.getCity())
.setDistrict(regionInfo.getDistrict())
.setUserId(AuthUtil.getUserId())
.setStreet(regionInfo.getStreet());
if (request.getIsDefault() == 1) {
addressService.update(Wrappers.lambdaUpdate(UserAddressEntity.class).eq(UserAddressEntity::getUserId, AuthUtil.getUserId()).set(UserAddressEntity::getIsDefault, 0));
}
return addressService.saveOrUpdate(address);
}
public Boolean deleteAddressInfo(List<Long> ids) {
return addressService.removeBatchByIds(ids);
}
public List<AppFormalAddressVO> addressInfoList(Long userId) {
List<UserAddressEntity> addressList = addressService.list(Wrappers.lambdaQuery(UserAddressEntity.class)
.eq(UserAddressEntity::getUserId, userId)
.orderByDesc(UserAddressEntity::getIsDefault , UserAddressEntity::getId));
return AppFormalMallConvert.INSTANCE.convertPoListToVoList(addressList);
}
}

View File

@@ -0,0 +1,353 @@
package org.springblade.modules.appFormal.manager;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.AllArgsConstructor;
import org.springblade.common.utils.RandomAmountGenerator;
import org.springblade.common.utils.date.DateUtil;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.modules.appFormal.convert.AppUserOrderConvert;
import org.springblade.modules.appFormal.dto.CutAmountRangDTO;
import org.springblade.modules.appFormal.dto.PayOrderDicDTO;
import org.springblade.modules.appFormal.dto.PreviewDTO;
import org.springblade.modules.appFormal.enums.BizTypeEnum;
import org.springblade.modules.appFormal.enums.MallOrderStatusEnum;
import org.springblade.modules.appFormal.event.OrderEvent;
import org.springblade.modules.appFormal.vo.*;
import org.springblade.modules.payment.api.PaymentFacade;
import org.springblade.modules.payment.enums.PaymentStatusEnum;
import org.springblade.modules.appFormal.request.AppFormalPreviewOrderRequest;
import org.springblade.modules.customer.pojo.entity.RegionsInfoEntity;
import org.springblade.modules.customer.service.IRegionsInfoService;
import org.springblade.modules.mall.pojo.entity.MallCartEntity;
import org.springblade.modules.mall.pojo.entity.MallSpuEntity;
import org.springblade.modules.mall.pojo.entity.UserAddressEntity;
import org.springblade.modules.mall.service.IMallCartService;
import org.springblade.modules.mall.service.IMallSpuService;
import org.springblade.modules.mall.service.IUserAddressService;
import org.springblade.modules.order.pojo.entity.MallDetailOrderEntity;
import org.springblade.modules.order.pojo.entity.MallSummaryOrderEntity;
import org.springblade.modules.order.pojo.entity.UserOrderEntity;
import org.springblade.modules.order.service.IMallDetailOrderService;
import org.springblade.modules.order.service.IMallSummaryOrderService;
import org.springblade.modules.order.service.IUserOrderService;
import org.springblade.modules.system.pojo.entity.User;
import org.springblade.modules.system.service.IParamService;
import org.springblade.modules.system.service.IUserService;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import java.util.stream.Collectors;
@Component
@AllArgsConstructor
public class FormalAppOrderManager {
private final IParamService paramService;
private final IUserOrderService orderService;
private final IMallSummaryOrderService mallSummaryOrderService;
private final IMallDetailOrderService mallDetailOrderService;
private final IUserService userService;
private final IUserAddressService userAddressService;
private final IRegionsInfoService regionsInfoService;
private final IMallSpuService mallSpuService;
private final IMallCartService mallCartService;
private final PaymentFacade paymentFacade;
private final ApplicationEventPublisher publisher;
public List<PayOrderDicDTO> orderBizModel() {
return paramService.getOrderBizModel();
}
public IPage<AppFormalOrderVO> getOrderList(IPage<AppFormalOrderVO> page, AppFormalOrderVO orderVO) {
Page<UserOrderEntity> orderPage = orderService.page(new Page<>(page.getCurrent(), page.getSize()), Wrappers.lambdaQuery(UserOrderEntity.class)
.eq(UserOrderEntity::getUserId, AuthUtil.getUserId())
.eq(orderVO.getOrderType() != null, UserOrderEntity::getOrderType, orderVO.getOrderType())
.eq(orderVO.getPaymentStatus() != null, UserOrderEntity::getPaymentStatus, orderVO.getPaymentStatus())
.eq(orderVO.getOrderStatus() != null, UserOrderEntity::getOrderStatus, orderVO.getOrderStatus())
.likeLeft(StrUtil.isNotBlank(orderVO.getTitle()), UserOrderEntity::getTitle, orderVO.getTitle())
.orderByDesc(UserOrderEntity::getId));
if (orderPage.getRecords().isEmpty()) {
return orderPage.convert(AppUserOrderConvert.INSTANCE::convertOrderToVO);
}
return orderPage.convert(order -> {
AppFormalOrderVO vo = AppUserOrderConvert.INSTANCE.convertOrderToVO(order);
vo.setContent(order.getDescription());
vo.setOrderStatusName(BizTypeEnum.getStatusName(order.getOrderType(), order.getOrderStatus()));
return vo;
});
}
public AppFormalMallOrderVO mallOrderDetail(Long id) {
MallSummaryOrderEntity order = mallSummaryOrderService.getById(id);
Assert.notNull(order, "无效订单");
Assert.isTrue(order.getUserId().equals(AuthUtil.getUserId()), "错误订单");
AppFormalMallOrderVO orderVO = AppUserOrderConvert.INSTANCE.convertMallOrderToVO(order);
List<MallDetailOrderEntity> details = mallSummaryOrderService.getDetails(id);
List<AppFormalMallDetailOrderVO> skuVOS = details.stream().map(sku -> {
AppFormalMallDetailOrderVO skuVO = AppUserOrderConvert.INSTANCE.convertEntityToVO(sku);
return skuVO;
}).collect(Collectors.toList());
PreviewDTO previewDTO = JSONObject.parseObject(order.getProductsInfo(), PreviewDTO.class);
orderVO.setAddress(previewDTO.getAddress());
orderVO.setDetailOrderList(skuVOS);
orderVO.setCashAmount(order.getTotalAmount());
orderVO.setOrderAmount(order.getActualAmount());
return orderVO;
}
public AppFormalPreviewOrderVO mallMakeOrder(AppFormalPreviewOrderRequest request, Long userId) {
// 现金转商城积分比例
BigDecimal mallCashToPointRate = paramService.getMallCashToPointRate();
//随机立减范围
CutAmountRangDTO randomReduceRange = paramService.getMallCutAmountRangDTO();
User user = userService.getById(userId);
Assert.notNull(user, "用户不存在");
PreviewDTO previewDTO = doPreview(request.getCartIds(), request.getAddressId());
AppFormalPreviewOrderVO result = AppUserOrderConvert.INSTANCE.convertPreviewDTOToVO(previewDTO);
MallSummaryOrderEntity order = AppUserOrderConvert.INSTANCE.convertPreviewDTOToOrder(previewDTO);
order.setUserName(user.getName());
order.setUserPhone(Long.valueOf(user.getPhone()));
order.setExpireTime(DateUtil.getMinutesLate(new Date(), 30));
order.setProductsInfo(JSONObject.toJSONString(previewDTO));
order.setUserId(userId);
order.setIsRoyalty(0); // 0:否 1:是
order.setFreightAmount(previewDTO.getFreightAmount());
order.setTotalAmount(previewDTO.getTotalAmount());
// 订单成本 含运费
List<PreviewDTO.SkuDTO> skuList = previewDTO.getSkuList();
List<AppFormalMallSkuVO> appFormalMallSkuVOList = new ArrayList<>();
List<MallDetailOrderEntity> detailOrderList = skuList.stream().map(sku -> {
MallDetailOrderEntity detailOrder = AppUserOrderConvert.INSTANCE.convertSkuDTOToDetailOrder(sku);
detailOrder.setId(null);
detailOrder.setUserName(user.getName());
detailOrder.setUserPhone(Long.valueOf(user.getPhone()));
detailOrder.setUserId(userId);
detailOrder.setSummaryOrderId(order.getId());
detailOrder.setSpuId(sku.getSpuId());
detailOrder.setQuantity(sku.getQuantity());
detailOrder.setSkuSnapshot(JSONObject.toJSONString(sku));
detailOrder.setActualCostAmount(sku.getCostPrice());
detailOrder.setOrderAmount(sku.getRetailPrice());
detailOrder.setCostAmount(sku.getCostPrice());
detailOrder.setActualAmount(sku.getRetailPrice());
detailOrder.setGivenAmount(sku.getRetailPrice().multiply(mallCashToPointRate).setScale(2, RoundingMode.HALF_UP));
detailOrder.setOrderStatus(MallOrderStatusEnum.WAIT_PAY.getCode());
appFormalMallSkuVOList.add(
new AppFormalMallSkuVO()
.setId(sku.getSpuId())
.setImage(sku.getMainImg())
.setSkuTitle(sku.getSpuName())
.setCurrentPrice(sku.getRetailPrice())
.setQuantity(sku.getQuantity())
.setTotalAmount(sku.getRetailPrice().multiply(BigDecimal.valueOf(sku.getQuantity())))
);
return detailOrder;
}).collect(Collectors.toList());
// 总利润
order.setActualGiveToken(BigDecimal.ZERO);
BigDecimal cutAmount = BigDecimal.ZERO;
if (order.getTotalAmount().compareTo(BigDecimal.ONE) > 0){
cutAmount = RandomAmountGenerator.generateRandomAmount(randomReduceRange.getMin(), randomReduceRange.getMax().multiply(order.getTotalAmount()));
order.setCostAmount(cutAmount);
}
order.setActualAmount(previewDTO.getTotalAmount().subtract(cutAmount));
order.setGiveToken(order.getActualAmount().multiply(mallCashToPointRate).setScale(2, RoundingMode.HALF_UP));
order.setOrderStatus(MallOrderStatusEnum.WAIT_PAY.getCode());
order.setPaymentStatus(PaymentStatusEnum.AWAIT.getCode());
order.setPaymentType(request.getPayType());
mallSummaryOrderService.generateOrder(order, detailOrderList);
mallCartService.removeBatchByIds(request.getCartIds());
syncQffOrder(order);
result.setSkuList(appFormalMallSkuVOList);
result.setFreightAmount(order.getFreightAmount());
result.setOrderAmount(order.getOrderAmount());
result.setCutAmount(order.getCostAmount());
return result.setId(order.getId());
}
public Boolean mallCancelOrder(Long id, Long userId) {
MallSummaryOrderEntity order = mallSummaryOrderService.getById(id);
Assert.notNull(order, "无效订单!");
if (userId != null) {
Assert.isTrue(order.getUserId().equals(userId), "订单用户异常");
}
Assert.isTrue(order.getPaymentStatus() == PaymentStatusEnum.AWAIT.getCode(), "订单支付状态异常");
Assert.isTrue(order.getStatus() == MallOrderStatusEnum.WAIT_PAY.getCode(), "订单状态异常");
order.setStatus(MallOrderStatusEnum.CANCELED.getCode());
order.setPaymentStatus(PaymentStatusEnum.CLOSE.getCode());
try {
paymentFacade.close(order.getId(), "商城订单取消" + order.getId());
} catch (Exception e) {
throw new RuntimeException(e);
}
return mallSummaryOrderService.updateById(order);
}
@Transactional(rollbackFor = Exception.class)
public Boolean mallConfirmReceipt(Long orderId, Long userId) {
MallSummaryOrderEntity summaryOrder = mallSummaryOrderService.getById(orderId);
Assert.notNull(summaryOrder, "订单不存在");
Assert.isTrue(Objects.equals(summaryOrder.getUserId(), userId), "订单不存在");
Assert.isTrue(Objects.equals(summaryOrder.getStatus(), MallOrderStatusEnum.WAIT_RECEIVE.getCode())
|| Objects.equals(summaryOrder.getStatus(), MallOrderStatusEnum.COMPLETED.getCode()), "订单状态异常");
summaryOrder.setStatus(MallOrderStatusEnum.COMPLETED.getCode());
mallSummaryOrderService.updateById(summaryOrder);
return mallDetailOrderService.update(Wrappers.lambdaUpdate(MallDetailOrderEntity.class)
.eq(MallDetailOrderEntity::getSummaryOrderId, summaryOrder.getId())
.in(MallDetailOrderEntity::getStatus, MallOrderStatusEnum.WAIT_PAY.getCode(),
MallOrderStatusEnum.WAIT_DELIVERY.getCode(),
MallOrderStatusEnum.WAIT_RECEIVE.getCode()
)
.set(MallDetailOrderEntity::getStatus, MallOrderStatusEnum.COMPLETED.getCode()));
}
private PreviewDTO doPreview(List<Long> cartIds, Long addressId) {
User user = userService.getById(AuthUtil.getUserId());
Assert.notNull(user, "无效用户");
UserAddressEntity address = userAddressService.getById(addressId);
Assert.notNull(address, "无效地址");
RegionsInfoEntity regionInfo = regionsInfoService.getById(address.getRegionsInfoId());
Assert.notNull(regionInfo, "无效地区");
PreviewDTO result = new PreviewDTO().setAddressId(addressId).setAddress(address).setVendorRegionsId(regionInfo.getVendorRegionId());
List<MallCartEntity> cartList = mallCartService.getCartListByIds(cartIds);
List<PreviewDTO.SkuDTO> skuList = new LinkedList<>();
cartList.forEach(c -> {
MallSpuEntity mallSpu = mallSpuService.getById(c.getSpuId());
Assert.notNull(mallSpu, c.getTitle() + "不存在或已下架");
Assert.isTrue(mallSpu.getSpuQty() > mallSpu.getSales(), c.getTitle() + "商品库存不足");
skuList.add(
new PreviewDTO.SkuDTO()
.setSpuId(mallSpu.getId())
.setSpuSn(mallSpu.getSpuSn())
.setSpuName(mallSpu.getSpuName())
.setMainImg(mallSpu.getMainImg())
.setDetailImg(mallSpu.getDetailImg())
.setTopImg(mallSpu.getTopImg())
.setCateId(mallSpu.getCateId())
.setCateIds(mallSpu.getCateIds())
.setOriginalPrice(mallSpu.getOriginalPrice())
.setRetailPrice(mallSpu.getRetailPrice())
.setCostPrice(mallSpu.getCostPrice())
.setSales(mallSpu.getSales())
.setSpuQty(mallSpu.getSpuQty())
.setTags(mallSpu.getTags())
.setQuantity(c.getQuantity())
);
});
BigDecimal orderAmount = BigDecimal.ZERO;
BigDecimal regularAmount = BigDecimal.ZERO;
// 供应链成本
BigDecimal costAmountAll = BigDecimal.ZERO;
for (PreviewDTO.SkuDTO skuDTO : skuList) {
BigDecimal totalAmount = skuDTO.getOriginalPrice().multiply(BigDecimal.valueOf(skuDTO.getQuantity()).setScale(2, RoundingMode.UP));
BigDecimal regular = skuDTO.getOriginalPrice().multiply(BigDecimal.valueOf(skuDTO.getQuantity()).setScale(2, RoundingMode.UP));
BigDecimal costAmount = skuDTO.getCostPrice().multiply(BigDecimal.valueOf(skuDTO.getQuantity()).setScale(2, RoundingMode.UP));
orderAmount = orderAmount.add(totalAmount);
regularAmount = regularAmount.add(regular);
costAmountAll = costAmountAll.add(costAmount);
}
;
return result.setOrderAmount(orderAmount)
.setTotalAmount(orderAmount)
.setOrderAmount(orderAmount)
.setCostAmount(costAmountAll)
.setSkuList(skuList)
.setRegularAmount(regularAmount)
.setFreightAmount(BigDecimal.ZERO)
;
}
private void syncQffOrder(MallSummaryOrderEntity order) {
// 保存总订单
OrderEvent orderEvent = new OrderEvent()
.setUserId(order.getUserId())
.setUserName(order.getUserName())
.setUserPhone(order.getUserPhone())
.setOrderType(BizTypeEnum.MALL.getCode())
.setOrderId(order.getId())
.setOrderStatus(order.getStatus())
.setTotalAmount(order.getTotalAmount())
.setActualAmount(order.getActualAmount())
.setPaymentStatus(order.getPaymentStatus())
.setPaymentTime(order.getPaymentCompletedTime())
.setPaymentType(order.getPaymentType())
;
PreviewDTO productsInfo = JSONObject.parseObject(order.getProductsInfo(), PreviewDTO.class);
if (productsInfo != null) {
String desc = productsInfo.getSkuList().stream().map(PreviewDTO.SkuDTO::getSpuName).collect(Collectors.joining(","));
PreviewDTO.SkuDTO skuDTO = productsInfo.getSkuList().get(0);
orderEvent
.setTitle(skuDTO.getSpuName())
.setImages(skuDTO.getMainImg())
.setQuantity(productsInfo.getSkuList().size())
.setDescription(desc);
}
publisher.publishEvent(orderEvent);
}
}

View File

@@ -0,0 +1,15 @@
package org.springblade.modules.appFormal.request;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.List;
@Data
@Accessors(chain = true)
public class AddressRemoveRequest implements Serializable {
private List<Long> ids;
}

View File

@@ -0,0 +1,24 @@
package org.springblade.modules.appFormal.request;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
@Data
@Accessors(chain = true)
public class AddressSubmitRequest implements Serializable {
private Long id;
private Long regionsInfoId;
private String detail;
private String consignee;
private String phone;
private Integer isDefault;
}

View File

@@ -0,0 +1,13 @@
package org.springblade.modules.appFormal.request;
import lombok.Data;
import java.io.Serializable;
@Data
public class AppForOrderIdRequest implements Serializable {
private Long id;
}

View File

@@ -0,0 +1,20 @@
package org.springblade.modules.appFormal.request;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.List;
@Data
@Accessors(chain = true)
public class AppFormalPreviewOrderRequest implements Serializable {
private List<Long> cartIds;
private Long addressId;
private Integer payType;
}

View File

@@ -0,0 +1,50 @@
/**
* 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.modules.appFormal.request;
import lombok.Data;
import java.io.Serializable;
/**
* 用户通知 实体类
*
* @author lzq
* @since 2026-02-03
*/
@Data
public class AppUserNoticeRequest implements Serializable {
/**
* 消息id
*/
private Long noticeId;
}

View File

@@ -0,0 +1,13 @@
package org.springblade.modules.appFormal.request;
import lombok.Data;
import java.io.Serializable;
@Data
public class CustomerSmsRequest implements Serializable {
private String phone;
private String code;
}

View File

@@ -0,0 +1,14 @@
package org.springblade.modules.appFormal.request;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.List;
@Data
@Accessors(chain = true)
public class MallCartRemoveRequest {
private List<Long> ids;
}

View File

@@ -0,0 +1,17 @@
package org.springblade.modules.appFormal.request;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
public class MallCartRequest {
private Long id;
private Long userId;
private Long spuId;
private Integer quantity;
//类型 1-增加 2-减少
private Integer type = 1;
}

View File

@@ -0,0 +1,16 @@
package org.springblade.modules.appFormal.request;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
@Data
@Accessors(chain = true)
public class UpdatePasswordRequest implements Serializable {
private Long id;
private String password;
private Long phone;
private String code;
}

View File

@@ -0,0 +1,30 @@
package org.springblade.modules.appFormal.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class AppFormalAddressVO implements Serializable {
private Long id = -1L;
private Long regionsInfoId = -1L;
private String province;
private String city;
private String district;
private String street;
private String detail;
private String consignee;
private String phone;
private Integer isDefault = -1;
}

View File

@@ -23,13 +23,28 @@
* <p> * <p>
* Author: Chill Zhuang (bladejava@qq.com) * Author: Chill Zhuang (bladejava@qq.com)
*/ */
package org.springblade.common.utils; package org.springblade.modules.appFormal.vo;
import lombok.Data;
/** /**
* 通用工具类 * 首页轮播图 实体类
* *
* @author Chill * @author lzq
* @since 2026-02-03
*/ */
public class CommonUtil { @Data
public class AppFormalBannerVO {
private String coverUrl;
private String route;
private String outsideUrl;
} }

View File

@@ -0,0 +1,14 @@
package org.springblade.modules.appFormal.vo;
import lombok.Data;
import lombok.experimental.Accessors;
import java.math.BigDecimal;
@Data
@Accessors(chain = true)
public class AppFormalMallCartInfoVO {
private Long id;
private BigDecimal freight = BigDecimal.ZERO;
}

View File

@@ -0,0 +1,33 @@
package org.springblade.modules.appFormal.vo;
import lombok.Data;
import lombok.experimental.Accessors;
import java.math.BigDecimal;
@Data
@Accessors(chain = true)
public class AppFormalMallCartVO {
private Long id;
/**
* 商品名称
*/
private String title;
/**
* 数量
*/
private Integer quantity;
private String mainImg;
private BigDecimal originalPrice;
private BigDecimal retailPrice;
}

View File

@@ -0,0 +1,12 @@
package org.springblade.modules.appFormal.vo;
import lombok.Data;
import org.springblade.modules.order.pojo.entity.MallDetailOrderEntity;
@Data
public class AppFormalMallDetailOrderVO extends MallDetailOrderEntity {
}

View File

@@ -0,0 +1,27 @@
package org.springblade.modules.appFormal.vo;
import lombok.Data;
import org.springblade.modules.mall.pojo.entity.UserAddressEntity;
import org.springblade.modules.order.pojo.entity.MallSummaryOrderEntity;
import java.math.BigDecimal;
import java.util.List;
@Data
public class AppFormalMallOrderVO extends MallSummaryOrderEntity {
/**
* 详情订单
*/
List<AppFormalMallDetailOrderVO> detailOrderList;
/**
* 现金金额
*/
private BigDecimal cashAmount= BigDecimal.ZERO;
boolean isCanAfter = false;
private UserAddressEntity address;
}

View File

@@ -0,0 +1,31 @@
package org.springblade.modules.appFormal.vo;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springblade.common.utils.string.StringPool;
import java.io.Serializable;
import java.math.BigDecimal;
@Data
@Accessors(chain = true)
public class AppFormalMallSkuVO implements Serializable {
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
private String title = StringPool.EMPTY;
private String skuTitle = StringPool.EMPTY;
private Integer quantity = -1;
private String image = StringPool.EMPTY;
private BigDecimal currentPrice = BigDecimal.ZERO;
private BigDecimal totalAmount = BigDecimal.ZERO;
}

View File

@@ -0,0 +1,70 @@
package org.springblade.modules.appFormal.vo;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
@Data
@Accessors(chain = true)
public class AppFormalMallSpuVO implements Serializable {
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 商品编码
*/
private String spuSn;
/**
* 商品名称
*/
private String spuName;
/**
* 主图
*/
private String mainImg;
/**
* 详情图(多图,逗号分割)
*/
private String detailImg;
/**
* 顶图(多图,逗号分割)
*/
private String topImg;
/**
* cate_id分类
*/
private String cateId;
/**
* cate_id分类
*/
private String cateIds;
/**
* 原价
*/
private BigDecimal originalPrice;
/**
* 销售价
*/
private BigDecimal retailPrice;
/**
* 销量
*/
private Integer sales;
/**
* 库存
*/
private Integer spuQty;
/**
* 标签(多标签,逗号分割 )
*/
private String tags;
private BigDecimal freight = BigDecimal.ZERO;
}

View File

@@ -0,0 +1,50 @@
package org.springblade.modules.appFormal.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springblade.modules.appFormal.enums.BizTypeEnum;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class AppFormalOrderVO implements Serializable {
private Long id;
private Long orderId;
private String title;
private String content;
private Integer quantity;
private String images;
private BigDecimal totalAmount;
private Integer orderType;
private Integer orderStatus;
private String orderStatusName;
private Integer paymentStatus;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
private Date createTime;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
private Date paymentTime;
/**
* 支付方式
*/
private Integer paymentType;
}

View File

@@ -0,0 +1,32 @@
package org.springblade.modules.appFormal.vo;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Collections;
import java.util.List;
@Data
@Accessors(chain = true)
public class AppFormalPreviewOrderVO implements Serializable {
private Long id;
private List<AppFormalMallSkuVO> skuList = Collections.emptyList();
private BigDecimal orderAmount = BigDecimal.ZERO;
private BigDecimal freightAmount = BigDecimal.ZERO;
private BigDecimal totalAmount = BigDecimal.ZERO;
/**
* 随机立减
*/
private BigDecimal cutAmount;
}

View File

@@ -0,0 +1,33 @@
package org.springblade.modules.appFormal.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
@Data
//
public class AppFormalRegionInfoVO implements Serializable {
//
@TableId(type = IdType.NONE)
private Long id;
//
private String name;
//
private Integer level;
//
private Long pid;
//
private BigDecimal lon;
//
private BigDecimal lat;
}

View File

@@ -0,0 +1,68 @@
/**
* 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.modules.appFormal.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 用户通知 实体类
*
* @author lzq
* @since 2026-02-03
*/
@Data
public class AppUserNoticeVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 用户id
*/
private Long id;
private Integer noticeType;
/**
* 是否已读 0-否 1-是
*/
private Integer hasRead;
private Date releaseTime;
/**
* 标题
*/
private String title;
/**
* 内容
*/
private String content;
}

View File

@@ -0,0 +1,33 @@
package org.springblade.modules.appFormal.vo;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springblade.common.utils.string.StringPool;
import java.io.Serializable;
@Data
@Accessors(chain = true)
public class FullRegionInfoVO implements Serializable {
private static final long serialVersionUID = 1L;
private Integer currentLevel = -1;
private String street = StringPool.EMPTY;
private String district = StringPool.EMPTY;
private String city = StringPool.EMPTY;
private String province = StringPool.EMPTY;
private Long streetId = -1L;
private Long districtId = -1L;
private Long cityId = -1L;
private Long provinceId = -1L;
}

View File

@@ -0,0 +1,17 @@
package org.springblade.modules.appFormal.vo;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
public class MallCategoryVO {
private Integer id;
/**
* 分类名称
*/
private String cname;
}

View File

@@ -0,0 +1,42 @@
package org.springblade.modules.appFormal.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
@Accessors(chain = true)
public class MallIntegralLogVO implements Serializable {
/**
* 用户手机号
*/
private Long userPhone;
/**
* 用户名称
*/
private String userName;
/**
* 金额
*/
private BigDecimal amount;
private String sourceDetail;
private Long orderId;
private Integer type;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date statisticalDate;
private String remark;
}

View File

@@ -0,0 +1,15 @@
package org.springblade.modules.appFormal.vo;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
@Data
@Accessors(chain = true)
public class MallIntegralVO implements Serializable {
private BigDecimal amount;
}

View File

@@ -0,0 +1,18 @@
package org.springblade.modules.appFormal.vo;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
@Data
@Accessors(chain = true)
public class UserInfoVO implements Serializable {
private String username;
private String phone;
private String avatar;
private String invitationCode;
}

View File

@@ -0,0 +1,62 @@
package org.springblade.modules.appOffline.controller;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.modules.appOffline.manager.OfflineAppDailySignManager;
import org.springblade.modules.appOffline.request.WatchVideoRequest;
import org.springblade.modules.appOffline.vo.AppOffLineAdsVO;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@AllArgsConstructor
@RequestMapping("offline-app/dailySign")
@Tag(name = "积分app签到信息", description = "积分app签到信息接口")
public class OffLineDailySignController {
private final OfflineAppDailySignManager dailySignManager;
@Operation(summary = "查询签到广告列表")
@GetMapping("/find-sign-ads-list")
public R<List<AppOffLineAdsVO>> findSignAdsList() {
return R.data(dailySignManager.findSignAdsList());
}
/**
* 是否看广告
* @return
*/
@Operation(summary = "是否看广告")
@GetMapping("/is-look-Ads-output")
public R<Boolean> isLookAtAdsByOutput(){
return R.status(dailySignManager.isLookAtAdsByOutput());
}
/**
* 开始观看视频
* @return
*/
@Operation(summary = "开始观看视频")
@PostMapping("/start-look-ads")
public R<Boolean> startLookAtAds(@RequestBody WatchVideoRequest request){
return R.status(dailySignManager.startLookAtAds(request.setUserId(AuthUtil.getUserId())));
}
/**
* 结束观看视频
* @return
*/
@Operation(summary = "结束观看视频")
@PostMapping("/end-look-ads")
public R<Boolean> endLookAtAdsByOutput(@RequestBody WatchVideoRequest request){
return R.status(dailySignManager.endLookAtAds(request.setUserId(AuthUtil.getUserId())));
}
}

View File

@@ -0,0 +1,121 @@
package org.springblade.modules.appOffline.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.modules.appFormal.manager.FormalAppCustomerManager;
import org.springblade.modules.appFormal.request.AppUserNoticeRequest;
import org.springblade.modules.appFormal.vo.AppUserNoticeVO;
import org.springblade.modules.appOffline.manager.OfflineAppCustomerManager;
import org.springblade.modules.appOffline.vo.*;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@AllArgsConstructor
@RequestMapping("offline-app/customer")
@Tag(name = "积分app用户信息", description = "积分app用户信息接口")
public class OfflineCustomerController {
private final OfflineAppCustomerManager offlineAppCustomerManager;
private final FormalAppCustomerManager formalAppCustomerManager;
@Operation(summary = "查询用户信息")
@GetMapping("/find-user-info")
public R<AppOfflineUserInfoVO> findUserInfo() {
return R.data(offlineAppCustomerManager.findUserInfo(AuthUtil.getUserId()));
}
@Operation(summary = "查询用户直推")
@GetMapping("/find-user-direct-list")
public R<List<AppOfflineUserDirectVO>> findUserDirectList() {
return R.data(offlineAppCustomerManager.findUserDirectList(AuthUtil.getUserId()));
}
@Operation(summary = "查询用户通知")
@GetMapping("/find-user-notice-page")
public R<IPage<AppUserNoticeVO>> findUserNoticePage(Query query , AppUserNoticeVO userNotice) {
return R.data(formalAppCustomerManager.findUserNoticePage(Condition.getPage(query), userNotice, AuthUtil.getUserId()));
}
@Operation(summary = "读取用户通知")
@PostMapping("/read-user-notice")
public R<Boolean> readUserNotice(@RequestBody AppUserNoticeRequest request) {
return R.status(formalAppCustomerManager.readUserNotice(request.getNoticeId()));
}
@Operation(summary = "未读消息总数")
@GetMapping("/not-read-notice-count")
public R<Integer> notReadNoticeCount(AppUserNoticeVO userNotice) {
return R.data(formalAppCustomerManager.notReadNoticeCount(userNotice ,AuthUtil.getUserId()));
}
@Operation(summary = "查询积分")
@GetMapping("/find-user-integral")
public R<AppOfflineIntegralVO> findUserIntegral() {
return R.data(offlineAppCustomerManager.findUserIntegral(AuthUtil.getUserId()));
}
@Operation(summary = "查询福利积分流水")
@GetMapping("/find-benefit-log")
public R<IPage<AppOffLineIntegralLogVO>> findBenefitLog(Query query ,AppOffLineIntegralLogVO log) {
return R.data(offlineAppCustomerManager.findBenefitLog(Condition.getPage(query) , log ,AuthUtil.getUserId()));
}
@Operation(summary = "查询现金券流水")
@GetMapping("/find-cash-log")
public R<IPage<AppOffLineIntegralLogVO>> findCashLog(Query query ,AppOffLineIntegralLogVO log) {
return R.data(offlineAppCustomerManager.findCashLog(Condition.getPage(query) , log , AuthUtil.getUserId()));
}
@Operation(summary = "查询佣金流水")
@GetMapping("/find-commission-log")
public R<IPage<AppOffLineIntegralLogVO>> findCommissionLog(Query query ,AppOffLineIntegralLogVO log) {
return R.data(offlineAppCustomerManager.findCommissionLog(Condition.getPage(query) , log ,AuthUtil.getUserId()));
}
@Operation(summary = "查询福利包列表")
@GetMapping("/find-packagesInfo-list")
public R<List<AppOffLinePackageInfoVO>> findPackagesInfoList() {
return R.data(offlineAppCustomerManager.findPackagesInfoList());
}
@Operation(summary = "查询用户兑换福利包的列表")
@PostMapping("/find-user-pack-list")
public R<IPage<AppOffLineUserPackInfoVO>> findUserPackList(Query query , AppOffLineUserPackInfoVO packInfo) {
return R.data(offlineAppCustomerManager.findUserPackList(Condition.getPage(query) , packInfo ,AuthUtil.getUserId()));
}
}

View File

@@ -0,0 +1,50 @@
package org.springblade.modules.appOffline.convert;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import org.springblade.modules.appOffline.vo.*;
import org.springblade.modules.customer.pojo.entity.UserGenealogyEntity;
import org.springblade.modules.customer.pojo.entity.UserIncreaseDayEntity;
import org.springblade.modules.userPackInfo.pojo.entity.AdsEntity;
import org.springblade.modules.userPackInfo.pojo.entity.PackageInfoEntity;
import org.springblade.modules.userPackInfo.pojo.entity.UserPackageInfoCopyEntity;
import org.springblade.modules.userPoint.pojo.entity.UserBenefitLogEntity;
import org.springblade.modules.userPoint.pojo.entity.UserCashLogEntity;
import org.springblade.modules.userPoint.pojo.entity.UserCommissionLogEntity;
import java.util.List;
/**
* @author jack
*/
@Mapper
public interface AppOfflineUserInfoConvert {
AppOfflineUserInfoConvert INSTANCE = Mappers.getMapper(AppOfflineUserInfoConvert.class);
AppOfflineUserInfoVO convertEntityToVO(UserIncreaseDayEntity entity);
AppOffLineIntegralLogVO convertBenefitLogPageToVO(UserBenefitLogEntity entity);
AppOffLineIntegralLogVO convertCashLogPageToVO(UserCashLogEntity entity);
AppOffLineIntegralLogVO convertCommissionLogPageToVO(UserCommissionLogEntity entity);
List<AppOffLinePackageInfoVO> convertPackageInfoListToVO(List<PackageInfoEntity> packageInfoList);
AppOffLineUserPackInfoVO convertUserPackInfoPageToVO(UserPackageInfoCopyEntity entity);
List<AppOffLineAdsVO> convertAdsListToVO(List<AdsEntity> list);
@Mapping(source = "id", target = "userId")
@Mapping(source = "createTime", target = "registerTime")
AppOfflineUserDirectVO convertGenealogyListToVO(UserGenealogyEntity entity);
List<AppOfflineUserDirectVO> convertGenealogyListToListVO(List<UserGenealogyEntity> list);
}

View File

@@ -0,0 +1,11 @@
package org.springblade.modules.appOffline.dto;
import lombok.Data;
@Data
public class WatchVideoTimeRangeDTO {
private String startTime;
private String endTime;
}

View File

@@ -0,0 +1,19 @@
package org.springblade.modules.appOffline.event;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
public class AppUserRegisterEvent {
private Long userId;
private String username;
private String phone;
private Integer isRoot = 1;
private Long pid = 0L;
private String pName = "";
private String pPhone = "";
}

View File

@@ -0,0 +1,12 @@
package org.springblade.modules.appOffline.event;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain=true)
public class AppUserRevokedEvent {
private Long userId;
}

View File

@@ -0,0 +1,166 @@
package org.springblade.modules.appOffline.job;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.utils.date.DateUtil;
import org.springblade.modules.customer.pojo.entity.UserDailySignEntity;
import org.springblade.modules.customer.service.IUserDailySignService;
import org.springblade.modules.userPackInfo.pojo.entity.UserPackageInfoCopyEntity;
import org.springblade.modules.userPackInfo.service.IUserPackageInfoCopyService;
import org.springblade.modules.userPoint.pojo.entity.UserBenefitEntity;
import org.springblade.modules.userPoint.pojo.entity.UserBenefitLogEntity;
import org.springblade.modules.userPoint.service.IUserBenefitLogService;
import org.springblade.modules.userPoint.service.IUserBenefitService;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
@Component
@AllArgsConstructor
@Slf4j
public class UserDailySignJob {
private final IUserDailySignService userDailySignService;
private final IUserPackageInfoCopyService userPackageInfoCopyService;
private final IUserBenefitService userBenefitService;
private final IUserBenefitLogService userBenefitLogService;
@XxlJob("yichayilu-user-sign-sendpoint")
@Transactional(rollbackFor = RuntimeException.class)
public void userDailySignSendPoint(){
log.info("完成签到任务的用户发放积分");
List<UserDailySignEntity> dailySignList = userDailySignService.list(
Wrappers.lambdaQuery(UserDailySignEntity.class)
.select(UserDailySignEntity::getUserId)
.eq(UserDailySignEntity::getStatisticsDate, DateUtil.getYesterday())
.eq(UserDailySignEntity::getType, 1)
.eq(UserDailySignEntity::getIsComplete, 1)
);
HashSet<Long> dailySignUserIdSet = dailySignList.stream()
.map(UserDailySignEntity::getUserId)
.collect(Collectors.toCollection(HashSet::new));
log.info("签到人数:[{}] , 提取userId数量: [{}]" , dailySignList.size() , dailySignUserIdSet.size());
List<UserPackageInfoCopyEntity> userPackageInfoList = userPackageInfoCopyService.list(
Wrappers.lambdaQuery(UserPackageInfoCopyEntity.class)
.eq(UserPackageInfoCopyEntity::getIsExpired, 0)
.eq(UserPackageInfoCopyEntity::getIsComplete, 0)
);
Map<Long, List<UserPackageInfoCopyEntity>> userPackageInfoMap = userPackageInfoList.stream()
.collect(Collectors.groupingBy(
UserPackageInfoCopyEntity::getUserId
));
// 已经签到的福利包
List<UserPackageInfoCopyEntity> signUserPackList = new LinkedList<>();
// 没有签到的福利包
List<UserPackageInfoCopyEntity> notSignUserPackList = new LinkedList<>();
// 用户福利积分流水
List<UserBenefitLogEntity> userBenefitLogList = new LinkedList<>();
// 用户福利积分总计
Map<Long , BigDecimal> userBenefitMap = new HashMap<>();
userPackageInfoMap.forEach((userId, packageInfoList) -> {
if(dailySignUserIdSet.contains(userId)){
signUserPackList.addAll(packageInfoList);
userBenefitMap.put(userId, BigDecimal.ZERO);
}else {
notSignUserPackList.addAll(packageInfoList);
}
});
String yyyyMMdd = DateUtil.convertFromDate(DateUtil.getYesterday(), "yyyyMMdd");
Long notSignDay = Long.parseLong(yyyyMMdd);
notSignUserPackList.forEach(packageInfo -> {
List<Long> notSignList = packageInfo.getNotSignList();
notSignList.add(notSignDay);
packageInfo.setNotSignList(notSignList);
packageInfo.setExperienceDay(packageInfo.getExperienceDay() + 1);
log.info("用户:[{}]未签到,福利包:[{}],未签到日期:[{}]" , packageInfo.getUserId() ,packageInfo.getPackageName(), packageInfo.getNotSignList());
});
signUserPackList.forEach(packageInfo -> {
BigDecimal amountOut = packageInfo.getAmountDay();
if (packageInfo.getRemainingAmount().compareTo(amountOut) < 0 ||
packageInfo.getDayTotal() - packageInfo.getOutDay() <= 1
){
amountOut = packageInfo.getRemainingAmount();
packageInfo.setRemainingAmount(BigDecimal.ZERO);
packageInfo.setIsComplete(1);
}else {
packageInfo.setRemainingAmount(packageInfo.getRemainingAmount().subtract(amountOut));
}
packageInfo.setOutDay(packageInfo.getOutDay() + 1);
packageInfo.setExperienceDay(packageInfo.getExperienceDay() + 1);
BigDecimal bigDecimal = userBenefitMap.get(packageInfo.getUserId());
userBenefitMap.put(packageInfo.getUserId(), bigDecimal.add(amountOut));
userBenefitLogList.add(
new UserBenefitLogEntity()
.setUserId(packageInfo.getUserId())
.setUserPhone(packageInfo.getPhone())
.setUserName(packageInfo.getUserName())
.setAmount(amountOut)
.setSourceId(packageInfo.getUserId())
.setUserPackId(packageInfo.getId())
.setSourceDetail(packageInfo.getUserName())
.setOrderId(0L)
.setType(1)
.setStatisticalDate(DateUtil.getYesterday())
.setRemark(DateUtil.convertFromDate(DateUtil.getYesterday(), "yyyy-MM-dd") +"签到" + packageInfo.getPackageName() + "发放积分")
);
});
userBenefitLogList.forEach(userBenefitLog -> {
log.info("用户签到福利包发放积分:[{}]" , userBenefitLog);
});
userBenefitMap.forEach((userId, amount) -> {
log.info("用户:[{}]签到福利包发放积分:[{}]" , userId , amount);
UserBenefitEntity userBenefit = userBenefitService.getById(userId);
Integer version = 1;
if (userBenefit == null){
userBenefit = new UserBenefitEntity();
userBenefit.setId(userId);
userBenefit.setAmount(amount);
userBenefit.setVersion(version);
userBenefitService.save(userBenefit);
}else {
version = userBenefit.getVersion();
}
if (!userBenefitService.addAmountNotLog(userId , amount , version)){
log.error("用户:[{}]福利值更新失败 , 福利值: [{}]", userId , amount);
throw new RuntimeException("用户:[" + userId + "]福利值更新失败");
}
});
log.info("用户签到福利包发放积分完成");
userBenefitLogService.saveBatch(userBenefitLogList);
userPackageInfoCopyService.updateBatchById(signUserPackList);
userPackageInfoCopyService.updateBatchById(notSignUserPackList);
}
}

View File

@@ -0,0 +1,288 @@
package org.springblade.modules.appOffline.job;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.utils.date.DateUtil;
import org.springblade.modules.customer.pojo.entity.UserGenealogyEntity;
import org.springblade.modules.customer.pojo.entity.UserIncreaseDayEntity;
import org.springblade.modules.customer.pojo.entity.UserTreeEntity;
import org.springblade.modules.customer.service.IUserGenealogyService;
import org.springblade.modules.customer.service.IUserIncreaseDayService;
import org.springblade.modules.customer.service.IUserTreeService;
import org.springblade.modules.system.pojo.entity.User;
import org.springblade.modules.system.service.IUserService;
import org.springframework.stereotype.Component;
import java.util.*;
import java.util.stream.Collectors;
@Component
@AllArgsConstructor
@Slf4j
public class UserGenealogyJob {
private final IUserTreeService userTreeService;
private final IUserGenealogyService userGenealogyService;
private final IUserIncreaseDayService userIncreaseDayService;
private final IUserService userService;
//从user_tree 同步信息 到 user_genealogy 15分钟一次
@XxlJob("yichayilu-appsync-genealogy")
public void appSyncGenealogy(){
log.info("开始执行用户层级同步信息");
List<UserTreeEntity> userTreeList = userTreeService.list(
Wrappers.lambdaQuery(UserTreeEntity.class)
.eq(UserTreeEntity::getIsSyncGenealogy, 0)
);
//使用stream 根据pid分组
Map<Long, List<UserTreeEntity>> userTreeMap = userTreeList.stream().collect(Collectors.groupingBy(UserTreeEntity::getPid));
//提取 userTreeMap key
List<Long> pidList = userTreeMap.keySet().stream().toList();
//父级用户信息 map
Map<Long, UserGenealogyEntity> userGenealogyMap = userGenealogyService.list(
Wrappers.lambdaQuery(UserGenealogyEntity.class)
.in(UserGenealogyEntity::getId, pidList)
).stream().collect(Collectors.toMap(UserGenealogyEntity::getId, item -> item));
userTreeMap.forEach((pid, children) -> {
//提取children id
List<Long> childrenIdList = children.stream().map(UserTreeEntity::getId).toList();
if(userGenealogyMap.containsKey(pid)){
UserGenealogyEntity userGenealogy = userGenealogyMap.get(pid);
List<Long> userDirectList = userGenealogy.getUserDirectList();
userDirectList.addAll(childrenIdList);
userGenealogy.setUserDirectList(userDirectList);
userGenealogy.setUserDirectNumber(userGenealogy.getUserDirectNumber() + childrenIdList.size());
userGenealogy.setUserChildNumber(userGenealogy.getUserChildNumber() + childrenIdList.size());
if(userGenealogyService.updateById(userGenealogy)){
genealogyIncrChildNumber(userGenealogy.getGenealogyList() , childrenIdList.size());
}
}
});
userTreeList.forEach(item -> {
item.setIsSyncGenealogy(1);
});
userTreeService.updateBatchById(userTreeList);
}
//每天凌晨1点执行 表达式 0 1 * * ?
@XxlJob("yichayilu-appsync-register-tree")
public void appSyncRegisterTree(){
log.info("同步注册后没结构的用户信息-树结构");
List<User> userList = userService.list(
Wrappers.lambdaQuery(User.class)
.ge(User::getCreateTime, DateUtil.getYesterday())
);
long userTreeRegisterCount = userTreeService.count(
Wrappers.lambdaQuery(UserTreeEntity.class)
.eq(UserTreeEntity::getRegisterDate, DateUtil.getYesterday())
);
log.info("用户数量 : {} , 树结构数量:{}" ,userList.size() , userTreeRegisterCount);
if (userList.size() > userTreeRegisterCount) {
Set<Long> userTreeIdSet = userTreeService.list(
Wrappers.lambdaQuery(UserTreeEntity.class)
.eq(UserTreeEntity::getRegisterDate, DateUtil.getYesterday())
).stream().map(UserTreeEntity::getId).collect(Collectors.toSet());
for (User userInfo : userList) {
if (!userTreeIdSet.contains(userInfo.getId())) {
log.info("开始同步树结构信息");
UserTreeEntity savaUserTree = new UserTreeEntity();
savaUserTree.setId(userInfo.getId());
savaUserTree.setName(userInfo.getName());
savaUserTree.setPhone(Long.valueOf(userInfo.getPhone()));
savaUserTree.setLevel(1);
savaUserTree.setPid(0L);
savaUserTree.setPPhone(null);
savaUserTree.setPName("");
savaUserTree.setPLevel(0);
savaUserTree.setIsSyncGenealogy(0);
savaUserTree.setIsRevoked(0);
savaUserTree.setRegisterDate(DateUtil.getToday());
// if (userInfo.getPid() > 0){
//
// UserTreeEntity parentTree = userTreeService.getById(userInfo.getPid());
// if (parentTree != null){
//
// savaUserTree.setPid(parentTree.getId());
// savaUserTree.setPPhone(parentTree.getPhone());
// savaUserTree.setPName(parentTree.getName());
// savaUserTree.setPLevel(parentTree.getLevel());
// savaUserTree.setLevel(parentTree.getLevel() + 1);
// }
// }
userTreeService.save(savaUserTree);
}
}
}
}
@XxlJob("yichayilu-appsync-register-genealogy")
public void appSyncRegisterGenealogy(){
log.info("同步注册后没结构的用户信息-族谱");
List<User> userList = userService.list(
Wrappers.lambdaQuery(User.class)
.ge(User::getCreateTime, DateUtil.getYesterday())
);
long userGenealogyRegisterCount = userGenealogyService.count(
Wrappers.lambdaQuery(UserGenealogyEntity.class)
.eq(UserGenealogyEntity::getRegisterDate, DateUtil.getYesterday())
);
log.info("用户数量 : {} , 族谱数量:{}" ,userList.size() , userGenealogyRegisterCount);
if (userList.size() > userGenealogyRegisterCount) {
Set<Long> userGenealogyIdSet = userGenealogyService.list(
Wrappers.lambdaQuery(UserGenealogyEntity.class)
.eq(UserGenealogyEntity::getRegisterDate, DateUtil.getYesterday())
).stream().map(UserGenealogyEntity::getId).collect(Collectors.toSet());
for (User userInfo : userList) {
if (!userGenealogyIdSet.contains(userInfo.getId())) {
log.info("开始同步族谱信息");
UserGenealogyEntity savaUserGenealogy = new UserGenealogyEntity();
savaUserGenealogy.setId(userInfo.getId());
savaUserGenealogy.setName(userInfo.getName());
savaUserGenealogy.setPhone(Long.valueOf(userInfo.getPhone()));
savaUserGenealogy.setUserDirectNumber(0);
savaUserGenealogy.setUserChildNumber(0);
savaUserGenealogy.setUserDirectList(new ArrayList<>());
savaUserGenealogy.setIsRevoked(0);
savaUserGenealogy.setRegisterDate(DateUtil.getToday());
savaUserGenealogy.setLevel(1);
savaUserGenealogy.setPid(0L);
savaUserGenealogy.setPPhone(null);
savaUserGenealogy.setPName("");
savaUserGenealogy.setRootId(userInfo.getId());
savaUserGenealogy.setGroupId(userInfo.getId());
savaUserGenealogy.setGenealogyList(new ArrayList<>());
// if (userInfo.getPid() > 0){
// UserGenealogyEntity parentGenealogy = userGenealogyService.getById(userInfo.getPid());
// if (parentGenealogy != null){
// savaUserGenealogy.setLevel(parentGenealogy.getLevel() + 1);
// savaUserGenealogy.setPid(parentGenealogy.getId());
// savaUserGenealogy.setPPhone(parentGenealogy.getPhone());
// savaUserGenealogy.setPName(parentGenealogy.getName());
// savaUserGenealogy.setRootId(parentGenealogy.getId());
// savaUserGenealogy.setGroupId(parentGenealogy.getId());
//
// List<Long> genealogyList = parentGenealogy.getGenealogyList();
// genealogyList.add(parentGenealogy.getId());
// savaUserGenealogy.setGenealogyList(genealogyList);
//
// }
// }
userGenealogyService.save(savaUserGenealogy);
}
}
}
}
@XxlJob("yichayilu-appsync-register-increaseDay")
public void appSyncRegisteIncreaseDayr(){
log.info("同步注册后没结构的用户信息-每日新增");
List<User> userList = userService.list(
Wrappers.lambdaQuery(User.class)
.ge(User::getCreateTime, DateUtil.getYesterday())
);
long userIncreaseDayRegisterCount = userIncreaseDayService.count(
Wrappers.lambdaQuery(UserIncreaseDayEntity.class)
.eq(UserIncreaseDayEntity::getRegisterDate, DateUtil.getYesterday())
);
log.info("用户数量 : {} , 每日新增数量:{}" ,userList.size() , userIncreaseDayRegisterCount);
if (userList.size() > userIncreaseDayRegisterCount) {
Set<Long> userIncreaseDayIdSet = userIncreaseDayService.list(
Wrappers.lambdaQuery(UserIncreaseDayEntity.class)
.eq(UserIncreaseDayEntity::getRegisterDate, DateUtil.getYesterday())
).stream().map(UserIncreaseDayEntity::getId).collect(Collectors.toSet());
for (User userInfo : userList) {
if (!userIncreaseDayIdSet.contains(userInfo.getId())) {
UserIncreaseDayEntity savaUserIncreaseDay = new UserIncreaseDayEntity();
savaUserIncreaseDay.setId(userInfo.getId());
savaUserIncreaseDay.setName(userInfo.getName());
savaUserIncreaseDay.setPhone(Long.valueOf(userInfo.getPhone()));
savaUserIncreaseDay.setCurrentLevelId(0);
savaUserIncreaseDay.setCurrentLevelName("普通用户");
savaUserIncreaseDay.setIsReal(0);
savaUserIncreaseDay.setRegisterDate(DateUtil.getToday());
savaUserIncreaseDay.setIsRevoked(0);
savaUserIncreaseDay.setRegisterDate(DateUtil.getToday());
savaUserIncreaseDay.setPid(0L);
savaUserIncreaseDay.setPName("");
savaUserIncreaseDay.setPPhone(null);
savaUserIncreaseDay.setPLevel(0);
// if (userInfo.getPid() > 0){
// UserIncreaseDayEntity parentIncreaseDay = userIncreaseDayService.getById(userInfo.getPid());
// if (parentIncreaseDay != null){
// savaUserIncreaseDay.setPid(parentIncreaseDay.getId());
// savaUserIncreaseDay.setPName(parentIncreaseDay.getName());
// savaUserIncreaseDay.setPPhone(parentIncreaseDay.getPhone());
// savaUserIncreaseDay.setPLevel(parentIncreaseDay.getCurrentLevelId());
//
// }
// }
userIncreaseDayService.save(savaUserIncreaseDay);
}
}
}
}
private void genealogyIncrChildNumber(List<Long> parentIdList , Integer number) {
parentIdList.forEach(parentId -> {
userGenealogyService.incrChildNumber(parentId , number);
});
}
}

View File

@@ -0,0 +1,184 @@
package org.springblade.modules.appOffline.listener;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.utils.date.DateUtil;
import org.springblade.modules.appOffline.event.AppUserRegisterEvent;
import org.springblade.modules.appOffline.event.AppUserRevokedEvent;
import org.springblade.modules.customer.pojo.entity.UserGenealogyEntity;
import org.springblade.modules.customer.pojo.entity.UserIncreaseDayEntity;
import org.springblade.modules.customer.pojo.entity.UserTreeEntity;
import org.springblade.modules.customer.service.IUserGenealogyService;
import org.springblade.modules.customer.service.IUserIncreaseDayService;
import org.springblade.modules.customer.service.IUserTreeService;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Slf4j
@Component
@AllArgsConstructor
public class AppUserInfoListener {
private final IUserTreeService userTreeService;
private final IUserGenealogyService userGenealogyService;
private final IUserIncreaseDayService userIncreaseDayService;
@Async("appRegisterExecutor")
@EventListener
@Transactional(rollbackFor = RuntimeException.class)
public void incrUerRegisterInfo(AppUserRegisterEvent event) {
log.info("用户层级同步信息[{}]", event);
log.info("开始同步树结构信息");
UserTreeEntity userTree = userTreeService.getById(event.getUserId());
if (userTree == null) {
UserTreeEntity savaUserTree = new UserTreeEntity();
savaUserTree.setId(event.getUserId());
savaUserTree.setName(event.getUsername());
savaUserTree.setPhone(Long.valueOf(event.getPhone()));
savaUserTree.setLevel(1);
savaUserTree.setPid(0L);
savaUserTree.setPPhone(null);
savaUserTree.setPName("");
savaUserTree.setPLevel(0);
savaUserTree.setIsSyncGenealogy(0);
savaUserTree.setIsRevoked(0);
savaUserTree.setRegisterDate(DateUtil.getToday());
savaUserTree.setCreateTime(new Date());
if (event.getIsRoot() == 0){
UserTreeEntity parentTree = userTreeService.getById(event.getPid());
if (parentTree != null){
savaUserTree.setPid(parentTree.getId());
savaUserTree.setPPhone(parentTree.getPhone());
savaUserTree.setPName(parentTree.getName());
savaUserTree.setPLevel(parentTree.getLevel());
savaUserTree.setLevel(parentTree.getLevel() + 1);
}
}
userTreeService.save(savaUserTree);
}
log.info("开始同步族谱信息");
UserGenealogyEntity userGenealogy = userGenealogyService.getById(event.getUserId());
if (userGenealogy == null) {
UserGenealogyEntity savaUserGenealogy = new UserGenealogyEntity();
savaUserGenealogy.setId(event.getUserId());
savaUserGenealogy.setName(event.getUsername());
savaUserGenealogy.setPhone(Long.valueOf(event.getPhone()));
savaUserGenealogy.setUserDirectNumber(0);
savaUserGenealogy.setUserChildNumber(0);
savaUserGenealogy.setUserDirectList(new ArrayList<>());
savaUserGenealogy.setIsRevoked(0);
savaUserGenealogy.setRegisterDate(DateUtil.getToday());
savaUserGenealogy.setLevel(1);
savaUserGenealogy.setPid(0L);
savaUserGenealogy.setPPhone(null);
savaUserGenealogy.setPName("");
savaUserGenealogy.setRootId(event.getUserId());
savaUserGenealogy.setGroupId(event.getUserId());
savaUserGenealogy.setGenealogyList(new ArrayList<>());
savaUserGenealogy.setCreateTime(new Date());
if (event.getIsRoot() == 0){
UserGenealogyEntity parentGenealogy = userGenealogyService.getById(event.getPid());
if (parentGenealogy != null){
log.info("打印: [{}]",parentGenealogy);
savaUserGenealogy.setLevel(parentGenealogy.getLevel() + 1);
savaUserGenealogy.setPid(parentGenealogy.getId());
savaUserGenealogy.setPPhone(parentGenealogy.getPhone());
savaUserGenealogy.setPName(parentGenealogy.getName());
savaUserGenealogy.setRootId(parentGenealogy.getId());
savaUserGenealogy.setGroupId(parentGenealogy.getId());
List<Long> genealogyList = parentGenealogy.getGenealogyList();
genealogyList.add(parentGenealogy.getId());
savaUserGenealogy.setGenealogyList(genealogyList);
}
}
userGenealogyService.save(savaUserGenealogy);
}
log.info("开始用户统计信息");
UserIncreaseDayEntity userIncreaseDay = userIncreaseDayService.getById(event.getUserId());
if (userIncreaseDay == null) {
UserIncreaseDayEntity savaUserIncreaseDay = new UserIncreaseDayEntity();
savaUserIncreaseDay.setId(event.getUserId());
savaUserIncreaseDay.setName(event.getUsername());
savaUserIncreaseDay.setPhone(Long.valueOf(event.getPhone()));
savaUserIncreaseDay.setCurrentLevelId(0);
savaUserIncreaseDay.setCurrentLevelName("普通用户");
savaUserIncreaseDay.setIsReal(0);
savaUserIncreaseDay.setRegisterDate(DateUtil.getToday());
savaUserIncreaseDay.setIsRevoked(0);
savaUserIncreaseDay.setRegisterDate(DateUtil.getToday());
savaUserIncreaseDay.setPid(0L);
savaUserIncreaseDay.setPName("");
savaUserIncreaseDay.setPPhone(null);
savaUserIncreaseDay.setPLevel(0);
savaUserIncreaseDay.setCreateTime(new Date());
if (event.getIsRoot() == 0){
UserIncreaseDayEntity parentIncreaseDay = userIncreaseDayService.getById(event.getPid());
if (parentIncreaseDay != null){
savaUserIncreaseDay.setPid(parentIncreaseDay.getId());
savaUserIncreaseDay.setPName(parentIncreaseDay.getName());
savaUserIncreaseDay.setPPhone(parentIncreaseDay.getPhone());
savaUserIncreaseDay.setPLevel(parentIncreaseDay.getCurrentLevelId());
}
}
userIncreaseDayService.save(savaUserIncreaseDay);
}
}
@Async("appRevokedExecutor")
@EventListener
@Transactional(rollbackFor = RuntimeException.class)
public void appUserRevokedExecutor(AppUserRevokedEvent event) {
log.info("用户注销id : [{}]", event);
UserTreeEntity userTree = userTreeService.getById(event.getUserId());
if (userTree != null) {
userTree.setIsRevoked(1);
userTreeService.updateById(userTree);
}
UserGenealogyEntity userGenealogy = userGenealogyService.getById(event.getUserId());
if (userGenealogy != null) {
userGenealogy.setIsRevoked(1);
userGenealogy.setRemark(userGenealogy.getRemark() + "|" + DateUtil.convertFromDate(DateUtil.getToday() , "yyyy-MM-dd HH:mm:ss") + "注销");
userGenealogyService.updateById(userGenealogy);
}
UserIncreaseDayEntity userIncreaseDay = userIncreaseDayService.getById(event.getUserId());
if (userIncreaseDay != null) {
userIncreaseDay.setIsRevoked(1);
userIncreaseDayService.updateById(userIncreaseDay);
}
}
}

View File

@@ -0,0 +1,185 @@
package org.springblade.modules.appOffline.manager;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xxl.job.core.handler.annotation.XxlJob;
import jakarta.annotation.PostConstruct;
import lombok.AllArgsConstructor;
import org.springblade.modules.appOffline.convert.AppOfflineUserInfoConvert;
import org.springblade.modules.appOffline.vo.*;
import org.springblade.modules.customer.pojo.entity.UserGenealogyEntity;
import org.springblade.modules.customer.pojo.entity.UserIncreaseDayEntity;
import org.springblade.modules.customer.service.IUserGenealogyService;
import org.springblade.modules.customer.service.IUserIncreaseDayService;
import org.springblade.modules.system.pojo.entity.User;
import org.springblade.modules.system.service.IUserService;
import org.springblade.modules.userPackInfo.pojo.entity.PackageInfoEntity;
import org.springblade.modules.userPackInfo.pojo.entity.UserPackageInfoCopyEntity;
import org.springblade.modules.userPackInfo.service.IPackageInfoService;
import org.springblade.modules.userPackInfo.service.IUserPackageInfoCopyService;
import org.springblade.modules.userPoint.pojo.entity.*;
import org.springblade.modules.userPoint.service.*;
import org.springframework.stereotype.Component;
import org.springframework.util.Assert;
import java.math.BigDecimal;
import java.util.List;
import java.util.Objects;
@Component
@AllArgsConstructor
public class OfflineAppCustomerManager {
private final IUserService userService;
private final IUserGenealogyService userGenealogyService;
private final IUserIncreaseDayService userIncreaseDayService;
private final IUserBenefitService userBenefitService;
private final IUserCashService userCashService;
private final IUserCommissionService userCommissionService;
private final IUserBenefitLogService userBenefitLogService;
private final IUserCashLogService userCashLogService;
private final IUserCommissionLogService userCommissionLogService;
private final IPackageInfoService packageInfoService;
private final IUserPackageInfoCopyService userPackageInfoCopyService;
private List<AppOffLinePackageInfoVO> packageInfoVOList;
@XxlJob("yichayilu-refresh-packageInfoList")
@PostConstruct
public void initPackageInfoList() {
List<PackageInfoEntity> packageInfoList = packageInfoService.list(
Wrappers.lambdaQuery(PackageInfoEntity.class)
.orderByAsc(PackageInfoEntity::getId)
);
packageInfoVOList = AppOfflineUserInfoConvert.INSTANCE.convertPackageInfoListToVO(packageInfoList);
}
public AppOfflineUserInfoVO findUserInfo(Long userId) {
User user = userService.getById(userId);
Assert.notNull(user, "用户不存在");
UserIncreaseDayEntity userIncreaseDayEntity = userIncreaseDayService.getById(userId);
return AppOfflineUserInfoConvert.INSTANCE.convertEntityToVO(userIncreaseDayEntity);
}
public List<AppOfflineUserDirectVO> findUserDirectList(Long userId) {
User user = userService.getById(userId);
Assert.notNull(user, "用户不存在");
List<UserGenealogyEntity> genealogyList = userGenealogyService.list(
Wrappers.lambdaQuery(UserGenealogyEntity.class)
.eq(UserGenealogyEntity::getPid, userId)
.eq(UserGenealogyEntity::getIsRevoked, 0)
.orderByDesc(UserGenealogyEntity::getId)
);
return AppOfflineUserInfoConvert.INSTANCE.convertGenealogyListToListVO(genealogyList);
}
public AppOfflineIntegralVO findUserIntegral(Long userId) {
UserBenefitEntity userBenefit = userBenefitService.getById(userId);
if (userBenefit == null) {
userBenefit = new UserBenefitEntity();
userBenefit.setId(userId);
userBenefit.setAmount(BigDecimal.ZERO);
userBenefitService.save(userBenefit);
}
UserCashEntity userCash = userCashService.getById(userId);
if (userCash == null) {
userCash = new UserCashEntity();
userCash.setId(userId);
userCash.setAmount(BigDecimal.ZERO);
userCashService.save(userCash);
}
UserCommissionEntity userCommission = userCommissionService.getById(userId);
if (userCommission == null) {
userCommission = new UserCommissionEntity();
userCommission.setId(userId);
userCommission.setAmount(BigDecimal.ZERO);
userCommissionService.save(userCommission);
}
return new AppOfflineIntegralVO().setBenefit(userBenefit.getAmount()).setCash(userCash.getAmount()).setCommission(userCommission.getAmount());
}
public IPage<AppOffLineIntegralLogVO> findBenefitLog(IPage<Object> page, AppOffLineIntegralLogVO log, Long userId) {
Page<UserBenefitLogEntity> pageResult = userBenefitLogService.page(
new Page<>(page.getCurrent(), page.getSize()),
Wrappers.lambdaQuery(UserBenefitLogEntity.class)
.eq(UserBenefitLogEntity::getUserId, userId)
.eq(Objects.nonNull(log.getType()), UserBenefitLogEntity::getType, log.getType())
.eq(Objects.nonNull(log.getStatisticalDate()), UserBenefitLogEntity::getStatisticalDate, log.getStatisticalDate())
.orderByDesc(UserBenefitLogEntity::getId)
);
return pageResult.convert(AppOfflineUserInfoConvert.INSTANCE::convertBenefitLogPageToVO);
}
public IPage<AppOffLineIntegralLogVO> findCashLog(IPage<Object> page, AppOffLineIntegralLogVO log, Long userId) {
Page<UserCashLogEntity> pageResult = userCashLogService.page(
new Page<>(page.getCurrent(), page.getSize()),
Wrappers.lambdaQuery(UserCashLogEntity.class)
.eq(UserCashLogEntity::getUserId, userId)
.eq(Objects.nonNull(log.getType()), UserCashLogEntity::getType, log.getType())
.eq(Objects.nonNull(log.getStatisticalDate()), UserCashLogEntity::getStatisticalDate, log.getStatisticalDate())
.orderByDesc(UserCashLogEntity::getId)
);
return pageResult.convert(AppOfflineUserInfoConvert.INSTANCE::convertCashLogPageToVO);
}
public IPage<AppOffLineIntegralLogVO> findCommissionLog(IPage<Object> page, AppOffLineIntegralLogVO log, Long userId) {
Page<UserCommissionLogEntity> pageResult = userCommissionLogService.page(
new Page<>(page.getCurrent(), page.getSize()),
Wrappers.lambdaQuery(UserCommissionLogEntity.class)
.eq(UserCommissionLogEntity::getUserId, userId)
.eq(Objects.nonNull(log.getType()), UserCommissionLogEntity::getType, log.getType())
.eq(Objects.nonNull(log.getStatisticalDate()), UserCommissionLogEntity::getStatisticalDate, log.getStatisticalDate())
.orderByDesc(UserCommissionLogEntity::getId)
);
return pageResult.convert(AppOfflineUserInfoConvert.INSTANCE::convertCommissionLogPageToVO);
}
public List<AppOffLinePackageInfoVO> findPackagesInfoList() {
return packageInfoVOList;
}
public IPage<AppOffLineUserPackInfoVO> findUserPackList(IPage<Object> page, AppOffLineUserPackInfoVO packInfo, Long userId) {
Page<UserPackageInfoCopyEntity> pageResult = userPackageInfoCopyService.page(
new Page<>(page.getCurrent(), page.getSize()),
Wrappers.lambdaQuery(UserPackageInfoCopyEntity.class)
.eq(UserPackageInfoCopyEntity::getUserId, userId)
.eq(Objects.nonNull(packInfo.getType()), UserPackageInfoCopyEntity::getType, packInfo.getType())
.eq(Objects.nonNull(packInfo.getStatisticalDate()), UserPackageInfoCopyEntity::getStatisticalDate, packInfo.getStatisticalDate())
.eq(Objects.nonNull(packInfo.getIsComplete()), UserPackageInfoCopyEntity::getIsComplete, packInfo.getIsComplete())
.eq(Objects.nonNull(packInfo.getIsExpired()), UserPackageInfoCopyEntity::getIsExpired, packInfo.getIsExpired())
.orderByDesc(UserPackageInfoCopyEntity::getId)
);
return pageResult.convert(AppOfflineUserInfoConvert.INSTANCE::convertUserPackInfoPageToVO);
}
}

View File

@@ -0,0 +1,295 @@
package org.springblade.modules.appOffline.manager;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.xxl.job.core.handler.annotation.XxlJob;
import jakarta.annotation.PostConstruct;
import lombok.AllArgsConstructor;
import org.springblade.common.utils.date.DateUtil;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.modules.appOffline.convert.AppOfflineUserInfoConvert;
import org.springblade.modules.appOffline.dto.WatchVideoTimeRangeDTO;
import org.springblade.modules.appOffline.request.WatchVideoRequest;
import org.springblade.modules.appOffline.vo.AppOffLineAdsVO;
import org.springblade.modules.customer.pojo.entity.UserDailySignEntity;
import org.springblade.modules.customer.service.IUserDailySignService;
import org.springblade.modules.system.pojo.entity.User;
import org.springblade.modules.system.service.IParamService;
import org.springblade.modules.system.service.IUserService;
import org.springblade.modules.userPackInfo.pojo.entity.AdsEntity;
import org.springblade.modules.userPackInfo.service.IAdsService;
import org.springframework.stereotype.Component;
import org.springframework.util.Assert;
import java.time.Duration;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@Component
@AllArgsConstructor
public class OfflineAppDailySignManager {
private final IAdsService adsService;
private final IParamService paramService;
private final IUserService userBaseService;
private final BladeRedis bladeRedis;
private final IUserDailySignService userDailySignService;
private List<AppOffLineAdsVO> signAdsList;
private final static String OUTPUT_LOG_KEY = "yichayilu:app:sign:red_watch_video:output_log:";
private final static String OUTPUT_TIME_KEY = "yichayilu:app:sign:red_watch_video:output_time:";
private final static String PAYOUTS_LOG_KEY = "yichayilu:app:sign:red_watch_video:payouts_log:";
private final static String PAYOUTS_TIME_KEY = "yichayilu:app:sign:red_watch_video:payouts_time:";
@XxlJob("yichayilu-refresh-signAdsList")
@PostConstruct
public void initSignAdsList() {
List<AdsEntity> list = adsService.list(
Wrappers.lambdaQuery(AdsEntity.class)
.eq(AdsEntity::getType, 1)
.orderByAsc(AdsEntity::getId)
);
signAdsList = AppOfflineUserInfoConvert.INSTANCE.convertAdsListToVO(list);
}
public List<AppOffLineAdsVO> findSignAdsList() {
return signAdsList;
}
public Boolean isLookAtAdsByOutput() {
return paramService.isLookAtAdsByOutput();
}
public boolean startLookAtAds(WatchVideoRequest request) {
Assert.isTrue(paramService.isLookAtAdsByOutput(), "观看广告功能暂不开放");
Assert.isTrue(isWatchVideoTime(), "未到开放观看视频时间");
User userBase = userBaseService.getById(request.getUserId());
Assert.notNull(userBase , "无效用户");
List<AppOffLineAdsVO> adsList = findSignAdsList();
// 使用stream将 signAdsList list转成 map
Map<Long, AppOffLineAdsVO> adsMap = adsList.stream()
.collect(Collectors.toMap(
AppOffLineAdsVO::getId, // 使用 ID 作为 key
Function.identity() // VO 对象本身作为 value
));
Assert.isTrue(adsMap.containsKey(request.getAdsId()) , "无效广告参数");
AppOffLineAdsVO adsInfo = adsMap.get(request.getAdsId());
Integer adsIndex = adsInfo.getSort();
String key = OUTPUT_LOG_KEY + userBase.getId() + ":" + DateUtil.convertFromDate(DateUtil.getToday() , "yyyy-MM-dd");
String outputTimeKey = OUTPUT_TIME_KEY + userBase.getId() + ":" + DateUtil.convertFromDate(DateUtil.getToday() , "yyyy-MM-dd") + ":" + adsIndex;
Object objectLookAtAds = bladeRedis.get(key);
if (objectLookAtAds == null) {
bladeRedis.setEx(outputTimeKey, System.currentTimeMillis(), Duration.ofSeconds(60 * 60 * 24));
return Boolean.TRUE;
}
//二进制视频
String binaryLookAtAds = (String) objectLookAtAds;
if (isLook(binaryLookAtAds , adsIndex)){
throw new RuntimeException("此广告今日已经观看");
}
if(userDailySignService.count(
Wrappers.lambdaQuery(UserDailySignEntity.class)
.eq(UserDailySignEntity::getType, 1)
.eq(UserDailySignEntity::getUserId, request.getUserId())
.eq(UserDailySignEntity::getStatisticsDate, DateUtil.getToday())
.eq(UserDailySignEntity::getIsComplete, 1)
) > 0){
throw new RuntimeException("今日已完成签到");
}
bladeRedis.setEx(outputTimeKey, System.currentTimeMillis(), Duration.ofSeconds(60 * 60 * 24));
return Boolean.TRUE;
}
public boolean endLookAtAds(WatchVideoRequest request) {
Assert.isTrue(paramService.isLookAtAdsByOutput(), "观看广告功能暂不开放");
Assert.isTrue(isWatchVideoTime(), "未到开放观看视频时间");
User userBase = userBaseService.getById(request.getUserId());
Assert.notNull(userBase , "无效用户");
// 查询广告
int adsType = 1;
List<AppOffLineAdsVO> adsList = findSignAdsList();
// 使用stream将 signAdsList list转成 map
Map<Long, AppOffLineAdsVO> adsMap = adsList.stream()
.collect(Collectors.toMap(
AppOffLineAdsVO::getId, // 使用 ID 作为 key
Function.identity() // VO 对象本身作为 value
));
Assert.isTrue(adsMap.containsKey(request.getAdsId()) , "无效广告参数");
AppOffLineAdsVO adsInfo = adsMap.get(request.getAdsId());
Integer adsIndex = adsInfo.getSort();
String adsBinary = createBinary(adsList.size(), "1");
int adsAnInt = Integer.parseInt(adsBinary, 2);
String outputTimeKey = OUTPUT_TIME_KEY + userBase.getId() + ":" + DateUtil.convertFromDate(DateUtil.getToday() , "yyyy-MM-dd") + ":" + adsIndex;
Object objectOutputTime = bladeRedis.get(outputTimeKey);
if (objectOutputTime == null) {
throw new RuntimeException("请观看广告");
}
long outputTime = Long.parseLong(String.valueOf(objectOutputTime));
if((System.currentTimeMillis() - outputTime) < (adsInfo.getAdsTime() * 1000)){
throw new RuntimeException("检测到观看广告存在作弊行为");
}
String key = OUTPUT_LOG_KEY + userBase.getId() + ":" + DateUtil.convertFromDate(DateUtil.getToday() , "yyyy-MM-dd");
Object objectLookAtAds = bladeRedis.get(key);
String lookToBinary = createBinary(adsList.size(), "0");;
if (objectLookAtAds == null) {
lookToBinary = setLookToBinary(lookToBinary, adsIndex);
}else {
if (isLook(String.valueOf(objectLookAtAds) , adsIndex)){
throw new RuntimeException("此广告今日已经观看");
}
lookToBinary = setLookToBinary(String.valueOf(objectLookAtAds), adsIndex);
}
bladeRedis.setEx(key, lookToBinary, Duration.ofSeconds(60 * 60 * 24));
if(userDailySignService.count(
Wrappers.lambdaQuery(UserDailySignEntity.class)
.eq(UserDailySignEntity::getType, 1)
.eq(UserDailySignEntity::getUserId, request.getUserId())
.eq(UserDailySignEntity::getStatisticsDate, DateUtil.getToday())
.eq(UserDailySignEntity::getIsComplete, 1)
) > 0){
throw new RuntimeException("今日已完成签到");
}
UserDailySignEntity userDailySign = userDailySignService.getOne(
Wrappers.lambdaQuery(UserDailySignEntity.class)
.eq(UserDailySignEntity::getType, adsType)
.eq(UserDailySignEntity::getUserId, userBase.getId())
.eq(UserDailySignEntity::getStatisticsDate, DateUtil.getToday())
);
String remarks = "广告" + adsIndex + "观看时间:" + DateUtil.convertFromDate(new Date(outputTime) , "yyyy-MM-dd HH:mm:ss") + ",结束时间:" + DateUtil.convertFromDate(new Date(System.currentTimeMillis()) , "yyyy-MM-dd HH:mm:ss");
if (userDailySign == null) {
userDailySign = new UserDailySignEntity();
userDailySign.setType(adsType);
userDailySign.setUserId(userBase.getId());
userDailySign.setUserName(userBase.getName());
userDailySign.setUserPhone(Long.valueOf(userBase.getPhone()));
userDailySign.setStatisticsDate(DateUtil.getToday());
userDailySign.setSignCount(Integer.parseInt(lookToBinary,2));
userDailySign.setIsComplete(0);
userDailySign.setRemarks(remarks);
if(!userDailySignService.save(userDailySign)){
throw new RuntimeException("记录广告异常");
}
return Boolean.TRUE;
}
if (userDailySign.getSignCount() >= adsAnInt){
throw new RuntimeException("今日已经观看完全部广告");
}
int signCount = Integer.parseInt(lookToBinary, 2);
userDailySign.setSignCount(signCount);
userDailySign.setRemarks(userDailySign.getRemarks() + "|" +remarks);
if(!userDailySignService.updateById(userDailySign)){
throw new RuntimeException("记录广告异常");
}
if (signCount >= adsAnInt){
userDailySign.setIsComplete(1);
userDailySignService.updateById(userDailySign);
}
return Boolean.TRUE;
}
private String setLookToBinary(String binaryString,Integer adsIndex ) {
if (binaryString == null || binaryString.isEmpty()) {
throw new RuntimeException("广告记录未初始化");
}
if (adsIndex > binaryString.length()) {
throw new RuntimeException("无效广告参数");
}
StringBuilder stringBuilder = new StringBuilder(binaryString);
stringBuilder.setCharAt(adsIndex - 1,'1');
return stringBuilder.toString();
}
private String createBinary(Integer size, String value) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < size; i++) {
sb.append(value);
}
return sb.toString();
}
private Boolean isLook(String signCount , Integer adsIndex ) {
if (signCount == null || signCount.isEmpty()) {
throw new RuntimeException("无效广告参数");
}
if (adsIndex > signCount.length()) {
throw new RuntimeException("无效广告参数");
}
int anInt = Integer.parseInt(String.valueOf(signCount.charAt(adsIndex - 1)));
return anInt == 1;
}
private boolean isWatchVideoTime(){
WatchVideoTimeRangeDTO dto = paramService.watchVideoTimeRange();
// 获取开始 时间 的小时和分钟
String[] startSplit = dto.getStartTime().split(":");
String[] endSplit = dto.getEndTime().split(":");
int startHour = Integer.parseInt(startSplit[0]);
int startMinute = Integer.parseInt(startSplit[1]);
int endHour = Integer.parseInt(endSplit[0]);
int endMinute = Integer.parseInt(endSplit[1]);
// 获取当前时间
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT+8"));
int currentHour = calendar.get(Calendar.HOUR_OF_DAY);
int currentMinute = calendar.get(Calendar.MINUTE);
// 计算总的分钟数进行比较
int startTotalMinutes = startHour * 60 + startMinute;
int endTotalMinutes = endHour * 60 + endMinute;
int currentTotalMinutes = currentHour * 60 + currentMinute;
if (startTotalMinutes <= endTotalMinutes) {
// 同一天内的时间范围(如 09:00-18:00)
return currentTotalMinutes >= startTotalMinutes && currentTotalMinutes <= endTotalMinutes;
} else {
// 跨天的时间范围(如 22:00-06:00)
return currentTotalMinutes >= startTotalMinutes || currentTotalMinutes <= endTotalMinutes;
}
}
}

View File

@@ -0,0 +1,19 @@
package org.springblade.modules.appOffline.request;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* @author lzq
*/
@Data
@Accessors(chain = true)
public class WatchVideoRequest implements Serializable {
private Long userId ;
private Long adsId;
}

View File

@@ -0,0 +1,61 @@
/**
* 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.modules.appOffline.vo;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
* 广告表 实体类
*
* @author lzq
* @since 2026-01-28
*/
@Data
@TableName("ads")
public class AppOffLineAdsVO {
private Long id;
/**
* 视频名称
*/
private String name;
/**
* 视频链接
*/
private String url;
/**
* 视频观看时长
*/
private Integer adsTime;
private Integer sort;
}

View File

@@ -0,0 +1,41 @@
package org.springblade.modules.appOffline.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
@Accessors(chain = true)
public class AppOffLineIntegralLogVO implements Serializable {
/**
* 用户手机号
*/
private Long userPhone;
/**
* 用户名称
*/
private String userName;
/**
* 金额
*/
private BigDecimal amount;
private String sourceDetail;
private Long orderId;
private Integer type;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date statisticalDate;
private String remark;
}

View File

@@ -0,0 +1,60 @@
package org.springblade.modules.appOffline.vo;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
@Data
@Accessors(chain = true)
public class AppOffLinePackageInfoVO implements Serializable {
private Long id;
/**
* 积分包名称
*/
private String name;
/**
* 最大购买数量
*/
private Integer buyQty;
/**
* 产出总天数
*/
private Integer dayTotal;
/**
* 总产出福利积分
*/
private BigDecimal amountTotal;
/**
* 购买赠与福利值
*/
private BigDecimal giveAmount;
/**
* 激活比率
*/
private BigDecimal bonus;
/**
* 兑换包需要的福利积分
*/
private BigDecimal userBenefit;
/**
* 兑换包需要的现金券
*/
private BigDecimal userCash;
/**
* 全网最大兑换数量
*/
private Integer maxExchangeQty;
/**
* 已兑换数量
*/
private Integer exchangedQty;
}

View File

@@ -0,0 +1,112 @@
package org.springblade.modules.appOffline.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@Data
@Accessors(chain = true)
public class AppOffLineUserPackInfoVO implements Serializable {
/**
*统计时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date statisticalDate;
/**
* 积分包名称
*/
private String packageName;
/**
* 兑换包需要的福利积分
*/
private BigDecimal userBenefit;
/**
* 兑换包需要的现金券
*/
private BigDecimal userCash;
/**
* 购买赠与福利值
*/
private BigDecimal giveAmount;
/**
* 产出总天数
*/
private Integer dayTotal;
/**
* 总产出福利积分
*/
private BigDecimal amountTotal;
/**
* 每日产出福利积分
*/
private BigDecimal amountDay;
/**
* 已产出福利积分
*/
private BigDecimal amountOut;
/**
* 剩余可产出福利积分
*/
private BigDecimal remainingAmount;
/**
* 已加速多少福利积分
*/
private BigDecimal acceleratedAmount;
/**
* 产出天数 当前包已经产出天数
*/
private Integer outDay;
/**
* 当前包已经经历的天数
*/
private Integer experienceDay;
/**
* 未签到日期详情 (数组)
*/
private List<Long> notSignList;
/**
* 是否完成 0-未完成 1-完成
*/
private Integer isComplete;
/**
* 当前包生效时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date startTime;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date activeTime;
/**
* 过期时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date expiredDate;
/**
* 是否过期 0-未过期 1-已过期
*/
private Integer isExpired;
/**
* 1-积分购买 2-后台划拨
*/
private Integer type;
}

View File

@@ -0,0 +1,28 @@
package org.springblade.modules.appOffline.vo;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
@Data
@Accessors(chain = true)
public class AppOfflineIntegralVO implements Serializable {
/**
* 福利积分
*/
private BigDecimal benefit;
/**
* 现金券
*/
private BigDecimal cash;
/**
* 佣金
*/
private BigDecimal commission;
}

View File

@@ -0,0 +1,21 @@
package org.springblade.modules.appOffline.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
@Data
public class AppOfflineUserDirectVO implements Serializable {
private Long userId;
private String name;
private Long phone;
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
private Date registerTime;
}

View File

@@ -0,0 +1,39 @@
package org.springblade.modules.appOffline.vo;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
@Data
@Accessors(chain = true)
public class AppOfflineUserInfoVO implements Serializable {
private String name;
private Long phone;
private Integer currentLevelId;
private String currentLevelName;
private Long pid;
private String pName;
private Long pPhone;
private Integer pLevel;
private Integer isReal;
private Date realDate;
private String realName;
private String realIdCard;
private Date registerDate;
}

View File

@@ -19,4 +19,10 @@ public interface BladeAuthConstant {
* 账号锁定默认错误次数 * 账号锁定默认错误次数
*/ */
Integer FAIL_COUNT = 5; Integer FAIL_COUNT = 5;
String INVITATION_CODE = "invitation_code";
String BINARY_TEMPLATE = "0123456789ABCDEFGHIJKLMNOPQRSTUV";
} }

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