1. add store name for application
This commit is contained in:
2026-04-24 23:23:32 +08:00
parent 140fb13702
commit 489fca96ce
11 changed files with 83 additions and 27 deletions

View File

@@ -11,12 +11,19 @@ alter table user_market_info
add merchant_type int4 default 0 not null;
comment on column user_market_info.merchant_type is '自营商家类型 0:未审核 1:个人商家 2:企业商家';
alter table user_market_info
add store_name varchar(255) default '' not null;
comment on column user_market_info.store_name is '店铺名称';
CREATE INDEX idx_market_info_store_name ON user_market_info (store_name) where is_deleted = 0;
drop table if exists merchant_application;
create table merchant_application
(
id int8 not null primary key,
user_id int8 not null,
user_account varchar(20) not null,
type int4 not null,
id int8 not null primary key,
user_id int8 not null,
user_account varchar(20) not null,
type int4 not null,
store_name varchar(255) default '' not null,
company_name varchar(100),
business_license varchar(100),
business_license_url TEXT,
@@ -27,8 +34,8 @@ create table merchant_application
create_time timestamp(6),
update_user int8,
update_time timestamp(6),
status int4 default 1, -- 1: 待审核 -- 2: 已通过 -- 3: 已拒绝
is_deleted int4 default 0
status int4 default 1, -- 1: 待审核 -- 2: 已通过 -- 3: 已拒绝
is_deleted int4 default 0
);
CREATE INDEX idx_merchant_app_type_status ON merchant_application (type, status) where is_deleted = 0;
CREATE INDEX idx_merchant_app_user_acc ON merchant_application (user_account) where is_deleted = 0;
@@ -39,6 +46,7 @@ comment on column merchant_application.id is '主键';
comment on column merchant_application.user_id is '用户id';
comment on column merchant_application.user_account is '用户账号';
comment on column merchant_application.type is '商家类型: 0-未审核, 1-个人商家, 2-企业商家';
comment on column merchant_application.store_name is '店铺名称';
comment on column merchant_application.company_name is '公司名称(企业商家时必填)';
comment on column merchant_application.business_license is '营业执照注册号';
comment on column merchant_application.business_license_url is '营业执照图片URL';
@@ -52,14 +60,24 @@ comment on column merchant_application.update_time is '修改时间';
comment on column merchant_application.status is '状态: 1-待审核 2-已通过 3-已拒绝';
comment on column merchant_application.is_deleted is '是否已删除';
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
VALUES ('2046772140345806850', '1123598815738675201', 'application', '商家入驻', 'menu', '/market/marketMerchantApplication', NULL, 1, 1, 0, 1, NULL, 0);
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
VALUES ('2046772140345806851', '2046772140345806850', 'application_add', '新增', 'add', '/market/marketMerchantApplication/add', 'plus', 1, 2, 1, 1, NULL, 0);
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
VALUES ('2046772140345806852', '2046772140345806850', 'application_edit', '修改', 'edit', '/market/marketMerchantApplication/edit', 'form', 2, 2, 2, 1, NULL, 0);
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
VALUES ('2046772140345806853', '2046772140345806850', 'application_delete', '删除', 'delete', '/api/blade-application/marketMerchantApplication/remove', 'delete', 3, 2, 3, 1, NULL, 0);
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark, is_deleted)
VALUES ('2046772140345806854', '2046772140345806850', 'application_view', '查看', 'view', '/market/marketMerchantApplication/view', 'file-text', 4, 2, 2, 1, NULL, 0);
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
is_deleted)
VALUES ('2046772140345806850', '1123598815738675201', 'application', '商家入驻', 'menu',
'/market/marketMerchantApplication', NULL, 1, 1, 0, 1, NULL, 0);
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
is_deleted)
VALUES ('2046772140345806851', '2046772140345806850', 'application_add', '新增', 'add',
'/market/marketMerchantApplication/add', 'plus', 1, 2, 1, 1, NULL, 0);
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
is_deleted)
VALUES ('2046772140345806852', '2046772140345806850', 'application_edit', '修改', 'edit',
'/market/marketMerchantApplication/edit', 'form', 2, 2, 2, 1, NULL, 0);
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
is_deleted)
VALUES ('2046772140345806853', '2046772140345806850', 'application_delete', '删除', 'delete',
'/api/blade-application/marketMerchantApplication/remove', 'delete', 3, 2, 3, 1, NULL, 0);
INSERT INTO blade_menu(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
is_deleted)
VALUES ('2046772140345806854', '2046772140345806850', 'application_view', '查看', 'view',
'/market/marketMerchantApplication/view', 'file-text', 4, 2, 2, 1, NULL, 0);