Przeglądaj źródła

用户端个人中心-修复权益卡数量统计问题

whitefang 1 rok temu
rodzic
commit
5e5b1bfa27
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      app/api/logic/UserLogic.php

+ 1 - 1
app/api/logic/UserLogic.php

@@ -63,7 +63,7 @@ class UserLogic extends BaseLogic
 
         //查询用户优惠券、权益卡、保修卡、返修工单数量
         $user['coupon_count'] = UserCoupon::where(['user_id' => $userInfo['user_id'] , 'voucher_status'=>0])->where('expire_time','>',time())->where('voucher_count','>',0)->count();
-        $user['equity_count'] = UserEquity::where(['user_id' => $userInfo['user_id']])->where('number','>',0)->count();
+        $user['equity_count'] = UserEquity::where(['user_id' => $userInfo['user_id']])->where('number','>',0)->where('end_time','>=',time())->count();
         $user['effective_count'] = OrderEffectiveLog::where(['user_id' => $userInfo['user_id']])->where('end_effective_time','>',time())->where('effective_num','>',0)->count();
         $user['return_work_count'] = ReturnWork::where(['user_id' => $userInfo['user_id']])->where('return_work_status','<>',2)->count();
         return $user->toArray();