From 3fa64cdd51dc8a9ec29c09dd2c33116bfb497f31 Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Wed, 22 Dec 2021 16:19:36 +0800 Subject: [PATCH] settter --- app/repository/CouponRepository.php | 6 +++--- view/manager/business/business_coupon_list.html | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/repository/CouponRepository.php b/app/repository/CouponRepository.php index 441ce40..4e6b350 100644 --- a/app/repository/CouponRepository.php +++ b/app/repository/CouponRepository.php @@ -39,14 +39,14 @@ class CouponRepository extends Repository */ public function couponMainHasList($id, $keyword, $page, $size) { - return Coupon::findList(["id" => $id], [], $page, $size, function ($q) use ($keyword) { + return Coupon::findList(["coupon_id" => $id], ["*"], $page, $size, function ($q) use ($keyword) { if (!empty($keyword)) { return $q::hasWhere('account', function ($q) use ($keyword) { - $q->where('nick_name', 'like', "%" . $keyword . "%")->field("nick_name,avatar_url"); + $q->where('nick_name', 'like', "%" . $keyword . "%")->field("nick_name,avatar_url,user_code"); }); } else { return $q->with(["account" => function ($query) { - $query->field("nick_name,avatar_url"); + $query->field("nick_name,avatar_url,user_code"); }]); } }, ["id" => "desc"]); diff --git a/view/manager/business/business_coupon_list.html b/view/manager/business/business_coupon_list.html index ee770d5..1f7051b 100644 --- a/view/manager/business/business_coupon_list.html +++ b/view/manager/business/business_coupon_list.html @@ -51,8 +51,7 @@