From 7676948b9541f6694686c637a329ee9146d3dcc3 Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Thu, 31 Mar 2022 14:13:33 +0800 Subject: [PATCH] setter --- app/controller/api/User.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/controller/api/User.php b/app/controller/api/User.php index 8168b0b..684a4d7 100644 --- a/app/controller/api/User.php +++ b/app/controller/api/User.php @@ -168,6 +168,11 @@ class User extends Base throw new ValidateException('用户无效!没有相关的商户信息记录'); } + // 指定时间段内发布的优惠券个数 + $TimeListModeReleaseCount = BusinessRepository::getInstance() + ->getTimeListModeReleaseCount($account->business["code"],$account->business["time_limit_start"],$account->business["time_limit_end"]); + + $businessRes = [ 'avatar' => File::convertCompleteFileUrl($account['avatar_url']), 'nickName' => $account['nick_name'], @@ -182,6 +187,9 @@ class User extends Base 'reason' => $account['business']['reason'], 'balance' => $account['business']['balance'], 'enable' => $account['business']['enable'], + 'model' => $account['business']['model'], + 'time_limit_end' => $account['business']['time_limit_end'], + 'time_limit_release_count' => $account['business']['time_limit_release_count'] - $TimeListModeReleaseCount, // 商家优惠卷情况统计 'couponCountList' => $busRepo->getCountBusinessOnShelf($account['business']['code'], 29), ],