|
...
|
...
|
@@ -232,6 +232,7 @@ class AdsController extends BaseController |
|
|
|
$form_id = intval($request->input('form_id'));
|
|
|
|
$country = intval($request->input('country'));
|
|
|
|
$page_size = intval($request->input('row', '20'));
|
|
|
|
$domain = trim($request->input('domain', ''));
|
|
|
|
$result = ReInquiryDetail::with('detailLog')
|
|
|
|
->when($status, function ($query, $status) {
|
|
|
|
return $query->where('status', $status);
|
|
...
|
...
|
@@ -245,6 +246,9 @@ class AdsController extends BaseController |
|
|
|
->when($country, function ($query, $country) {
|
|
|
|
return $query->where('country', 'like', '%'.$country.'%');
|
|
|
|
})
|
|
|
|
->when($domain, function ($query, $domain) {
|
|
|
|
return $query->where('re_website', 'like', '%'.$domain.'%');
|
|
|
|
})
|
|
|
|
->orderBy('id', 'desc')
|
|
|
|
->paginate($page_size);
|
|
|
|
return $this->response('success', Code::SUCCESS, $result);
|
|
...
|
...
|
@@ -275,7 +279,18 @@ class AdsController extends BaseController |
|
|
|
|
|
|
|
foreach ($result as &$item){
|
|
|
|
$item->tasks = $item->tasks; //调用访问器
|
|
|
|
$item['project_id'] = DomainInfo::where('domain', $item['domain'])->value('project_id') ?: 0;
|
|
|
|
$is_v6 = 0;
|
|
|
|
foreach ($item->tasks as $task){
|
|
|
|
if($task['is_v6']){
|
|
|
|
$is_v6 = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if($is_v6){
|
|
|
|
$item['project_id'] = DomainInfo::where('domain', $item['domain'])->value('project_id') ?: 0;
|
|
|
|
}else{
|
|
|
|
$item['project_id'] = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return $this->response('success', Code::SUCCESS, $result);
|
...
|
...
|
|