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'], ];