From c187e2cd3354907bf34c36e6ae445176541e7162 Mon Sep 17 00:00:00 2001 From: guojia <445241500@qq.com> Date: Sun, 28 Apr 2024 15:27:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/store/controller/Merchant.php | 17 +++++++++++++++++ public/install/data/install_struct.sql | 5 +++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/app/store/controller/Merchant.php b/app/store/controller/Merchant.php index 3ceffbf6..41343f7a 100644 --- a/app/store/controller/Merchant.php +++ b/app/store/controller/Merchant.php @@ -16,6 +16,7 @@ use app\common\model\store\StoreSettle; use think\response\Json; use app\store\model\Merchant as MerchantModel; use app\common\model\Channel; +use app\store\model\store\User as StoreUserModel; /** * 商户ID、商店ID 隔离商城里面的商户 @@ -24,6 +25,22 @@ use app\common\model\Channel; */ class Merchant extends Controller { + + /** + * 获取当前登录的商城信息 + * @return Json + */ + public function userinfo(): Json + { + $model = new StoreUserModel; + $list = $model->getList($this->request->param()); + print_r($list);die; + + $model2 = new MerchantModel; + $list = $model2->getList($this->request->param()); + return $this->renderSuccess(['storeInfo' => $model2]); + } + /** * 获取当前登录的商城信息 * @return Json diff --git a/public/install/data/install_struct.sql b/public/install/data/install_struct.sql index abaa3138..e3cb8327 100644 --- a/public/install/data/install_struct.sql +++ b/public/install/data/install_struct.sql @@ -1717,7 +1717,7 @@ CREATE TABLE `yoshop_merchant` ( `shop_label` varchar(100) NOT NULL DEFAULT '' COMMENT '标签', `logo_image_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '门店logo图片ID', `license_img_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '营业执照图片ID', -`user_id` varchar(100) NOT NULL DEFAULT '' COMMENT '买家用户ID', +`user_name` varchar(100) NOT NULL DEFAULT '' COMMENT '买家用户名', `sort` int(11) NOT NULL DEFAULT '0' COMMENT '门店排序(数字越小越靠前)', `is_delete` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除', `store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID', @@ -1733,7 +1733,8 @@ CREATE TABLE `yoshop_squarelike` ( `store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID', `square_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '动态ID', `merchant_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商户ID、商店ID 隔离商城里面的商户', - `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '买家用户ID', + `user_name` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '买家用户名', + `real_name` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '真实用户名', `is_delete` int(11) 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 '更新时间',