|
@@ -65,6 +65,12 @@ class CustomService
|
|
|
$query->orWhere('name', 'like', "%{$keywords}%")->orWhere('mobile', 'like', "%{$keywords}%");
|
|
|
}];
|
|
|
}
|
|
|
+ if (!empty($params['mobile'])) {
|
|
|
+ $mobile = $params['mobile'];
|
|
|
+ $where[] = [function($query) use ($mobile) {
|
|
|
+ $query->where('mobile', 'like', "%{$mobile}%");
|
|
|
+ }];
|
|
|
+ }
|
|
|
if (!empty($params['report_status'])) {
|
|
|
if ($params['report_status'] == -1) {
|
|
|
//待审核
|
|
@@ -162,6 +168,42 @@ class CustomService
|
|
|
}];
|
|
|
}
|
|
|
}
|
|
|
+ if (isset($params['require_area'])) {
|
|
|
+ if (is_numeric($params['require_area'])) {
|
|
|
+ $where[] = ['require_area', '=', ($params['require_area'] + 1)];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (isset($params['requirement'])) {
|
|
|
+ if (is_numeric($params['requirement'])) {
|
|
|
+ $where[] = ['requirement', '=', ($params['requirement'] + 1)];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (isset($params['age_range'])) {
|
|
|
+ if (is_numeric($params['age_range'])) {
|
|
|
+ $where[] = ['age_range', '=', ($params['age_range'] + 1)];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (isset($params['visit_type'])) {
|
|
|
+ if (is_numeric($params['visit_type'])) {
|
|
|
+ $where[] = ['visit_type', '=', $params['visit_type']];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (isset($params['region'])) {
|
|
|
+ if (is_numeric($params['region'])) {
|
|
|
+ $where[] = ['region', '=', ($params['region'] + 1)];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (isset($params['purpose'])) {
|
|
|
+ if (is_numeric($params['purpose'])) {
|
|
|
+ $where[] = ['purpose', '=', ($params['purpose'] + 1)];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (isset($params['level'])) {
|
|
|
+ if (is_numeric($params['level'])) {
|
|
|
+ $where[] = ['level', '=', ($params['level'] + 1)];
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return $where;
|
|
|
}
|
|
|
|