|
|
@@ -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();
|