多店铺需求
This commit is contained in:
13
sqls/250403/tb_shop_user.sql
Normal file
13
sqls/250403/tb_shop_user.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- ----------------------------
|
||||
-- tb_shop_user表扩展字段
|
||||
-- ----------------------------
|
||||
ALTER TABLE `tb_shop_user`
|
||||
ADD COLUMN `is_merged_to_head` tinyint NULL DEFAULT 0 COMMENT '是否已经合并数据到主店 1-是 0-否 默认0',
|
||||
ADD COLUMN `merged_users` text NULL COMMENT '已经合并过来的用户信息,jsonArray格式,[{\"id\":1,\"shopId\":2,...},{\"id\":1,\"shopId\":2,...}]',
|
||||
ADD COLUMN `all_shop_ids` varchar(1200) NULL COMMENT '适用门店id集合,逗号分隔,例如:0,1,2,3,...查询的时候 all_shop_ids like \'%,1,%\';';
|
||||
|
||||
-- ----------------------------
|
||||
-- 处理历史数据
|
||||
-- ----------------------------
|
||||
update tb_shop_user set is_merged_to_head = 0;
|
||||
update tb_shop_user set all_shop_ids = concat('0,', shop_id, ',');
|
||||
Reference in New Issue
Block a user