From cb42e2d8ce32a5f06d988568413ecdc18dbf6d58 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Tue, 5 Sep 2023 14:53:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AE=A1=E6=A0=B8=E5=A7=94?= =?UTF-8?q?=E6=89=98=E5=95=86=E5=93=81=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/community/Community.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controller/api/community/Community.php b/app/controller/api/community/Community.php index 0a5fc65e..93fc3d12 100644 --- a/app/controller/api/community/Community.php +++ b/app/controller/api/community/Community.php @@ -640,8 +640,9 @@ class Community extends BaseController $communityInfo = Db::name('community')->where('uid', $this->request->uid())->where('community_id', $id)->where('is_del', 0)->find(); if (!$communityInfo) { return app('json')->fail('委托商品不存在'); - } - $entrustInfo = Db::name('entrust')->where('community_id', $id)->where('entrust_mer_id', $this->request->uid())->where('is_del', 0)->where('status', 0)->fetchSql(false)->find(); + } + $merchantId = Db::name('merchant')->where('uid', $this->request->uid())->value('mer_id'); + $entrustInfo = Db::name('entrust')->where('community_id', $id)->where('entrust_mer_id', $merchantId)->where('is_del', 0)->where('status', 0)->fetchSql(false)->find(); if (!$entrustInfo) { return app('json')->fail('用户无审核此委托商品权限'); }