|
@@ -374,7 +374,8 @@ class UserService
|
|
|
$where[] = [function($query) use ($diffNums, $currentTime){
|
|
|
$query->orWhereRaw("check_status IN (-1, 1)")
|
|
|
->orWhereRaw("check_status = 2 AND current_status IN (-1,3,4)")
|
|
|
- ->orWhereRaw("((visit_time + {$diffNums}) - {$currentTime} > 0 AND current_status = 2 AND check_status = 2)");
|
|
|
+ ->orWhereRaw("((visit_time + {$diffNums}) - {$currentTime} > 0 AND current_status = 2 AND check_status = 2)")
|
|
|
+ ->orWhereRaw("((visit_time + {$diffNums}) - {$currentTime} <= 0 AND (visit_time + ({$diffNums} * 4)) - {$currentTime} > 0 AND current_status = 2 AND check_status = 2 AND belong_status = 1)")->whereOr('belong_status','<>', 1);
|
|
|
}];
|
|
|
//客户总量
|
|
|
$customNums = MarketCustomer::where($where)->count();
|