From 9171cf371c3f5a2948b88f0d7f13fd2d5e492870 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E5=98=89?= <445241500@qq.com> Date: Thu, 30 May 2024 18:28:58 +0800 Subject: [PATCH] 1 --- app/store/controller/Controller.php | 5 ++++- public/install/data/install_struct.sql | 24 +++++++++++++++++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/app/store/controller/Controller.php b/app/store/controller/Controller.php index a2e75084..4dad2b6b 100644 --- a/app/store/controller/Controller.php +++ b/app/store/controller/Controller.php @@ -156,9 +156,12 @@ class Controller extends BaseController */ protected function getMerchantId() { + $this->merchantId = 0; $user = StoreUserService::getLoginInfo(); if (!empty($user)) { - $this->merchantId = MerchantModel::getMerchantId($user['user']['user_name']); + if ($user['user']['store']['store_version']) { + $this->merchantId = MerchantModel::getMerchantId($user['user']['user_name']); + } } } diff --git a/public/install/data/install_struct.sql b/public/install/data/install_struct.sql index a4cd0201..b5ecd942 100644 --- a/public/install/data/install_struct.sql +++ b/public/install/data/install_struct.sql @@ -1233,16 +1233,34 @@ CREATE TABLE `yoshop_spec_value` ( DROP TABLE IF EXISTS `yoshop_store`; CREATE TABLE `yoshop_store` ( `store_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '商城ID', - `store_name` varchar(50) NOT NULL DEFAULT '' COMMENT '商城名称', - `describe` varchar(500) NOT NULL DEFAULT '' COMMENT '商城简介', + `store_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '商城名称', + `describe` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '商城简介', `logo_image_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城logo文件ID', `sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序(数字越小越靠前)', `is_recycle` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否回收', `is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除', `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间', `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间', + `user_id` int(11) DEFAULT NULL COMMENT '申请用户id', + `status` tinyint(3) NOT NULL DEFAULT '1' COMMENT '状态 1 正常 0 待审核 2 拒绝', + `auth_platform` varchar(1000) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '苏宁:sn、京东:jd、淘宝:tb、拼多多:pdd', + `phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `group_share_img_id` int(11) unsigned NOT NULL DEFAULT '0', + `min_profit` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '最小利润', + `server_config` text CHARACTER SET utf8mb4 COMMENT '服务配置', + `new_product_img_id` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '新品首发', + `big_brand_img_id` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '大牌正品', + `new_people_order_img_id` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '新人首单', + `presale_img_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预售配置', + `flash_sale_img_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '显示秒杀图片', + `ranking_img_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '排行榜图片', + `is_sync` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否同步', + `open_channel` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '开启渠道数据', + `fliter_condition` text COLLATE utf8mb4_unicode_ci COMMENT '商品过滤条件', + `store_version` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '0单商户,1多商户', + `is_provider_data` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否数据服务商0否1是', PRIMARY KEY (`store_id`) -) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商家(商户)记录表'; +) ENGINE=InnoDB AUTO_INCREMENT=10050 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商家(商户)记录表'; DROP TABLE IF EXISTS `yoshop_store_address`; CREATE TABLE `yoshop_store_address` (