From 3a808becd5cee570e2686216cd84cbf23b09b0f4 Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Wed, 22 Dec 2021 16:28:48 +0800 Subject: [PATCH] settter --- app/controller/manager/Coupon.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controller/manager/Coupon.php b/app/controller/manager/Coupon.php index ca5f3ef..12420fd 100644 --- a/app/controller/manager/Coupon.php +++ b/app/controller/manager/Coupon.php @@ -68,7 +68,7 @@ class Coupon extends Base $list = $repo->findList($whereMap, [], $page, $size, function ($q) { if (!empty($keyword)) { - return $q::hasWhere('business', function ($q) use ($keyword) { + return $q->hasWhere('business', function ($q) use ($keyword) { $q->where('business_name', 'like', "%" . $keyword . "%") //如果是渠道商或者工作人员 只查看自己的下级商家 ->when(MemberModel::is_agency($this->auth['roles']), function ($q) { @@ -81,7 +81,7 @@ class Coupon extends Base if (MemberModel::is_agency($this->auth['roles'])) { - return $q::hasWhere('business', function ($q) { + return $q->hasWhere('business', function ($q) { $q//如果是渠道商或者工作人员 只查看自己的下级商家 ->where('agency_code', '=', $this->auth['business_code']) ->field("code,business_name,business_subtitle,type,agency_code");