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('用户无审核此委托商品权限'); }