From 33b64c6955b9028d65e225ac3cd3c9cdcfb987c0 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Sun, 6 Dec 2020 22:41:47 +0800 Subject: [PATCH] 333333 --- hyhproject/app/controller/UserLevel.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hyhproject/app/controller/UserLevel.php b/hyhproject/app/controller/UserLevel.php index e5f04a7..1d56253 100755 --- a/hyhproject/app/controller/UserLevel.php +++ b/hyhproject/app/controller/UserLevel.php @@ -46,8 +46,11 @@ class UserLevel extends Base if (!empty($helpSaleInfo)) { $helpSaleNum = $helpSaleInfo['helpSaleNum']; } + $zgTimes = Db::name('orders')->where(compact('userId','goodsType'))->count(); + if ($zgTimes <= 0) $zgTimes = 1; + if ($helpSaleNum <= 0) $helpSaleNum = 1; return [ - 'zgTimes'=>Db::name('orders')->where(compact('userId','goodsType'))->count(), + 'zgTimes'=>$zgTimes, 'myZgA'=>$helpSaleNum, 'zgAmounts'=>$sysData['toPaySlow'], ];