master
wangxinglong 2021-12-22 16:28:48 +08:00
parent 3fa64cdd51
commit 3a808becd5
1 changed files with 2 additions and 2 deletions

View File

@ -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");