|
...
|
...
|
@@ -139,13 +139,15 @@ class AdsController extends BaseController |
|
|
|
//是否v6
|
|
|
|
$domain_info = DomainInfo::where('domain', $domain)->first();
|
|
|
|
if($domain_info){
|
|
|
|
$channel = Project::where('id', $domain_info['project_id'])->value('channel');
|
|
|
|
$data = [
|
|
|
|
'is_v6' => 1,
|
|
|
|
'agent' => trim(explode('-', Channel::getChannelText($channel['user_id']??0))[0]),
|
|
|
|
'domain' => $domain,
|
|
|
|
];
|
|
|
|
return $this->response('success', Code::SUCCESS, $data);
|
|
|
|
$channel = Project::where('id', $domain_info['project_id'])->where('delete_status', 1)->value('channel');
|
|
|
|
if($channel){
|
|
|
|
$data = [
|
|
|
|
'is_v6' => 1,
|
|
|
|
'agent' => trim(explode('-', Channel::getChannelText($channel['user_id']??0))[0]),
|
|
|
|
'domain' => $domain,
|
|
|
|
];
|
|
|
|
return $this->response('success', Code::SUCCESS, $data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$res = (new QuanqiusouApi())->getV5Agent($domain);
|
|
|
|
if(empty($res['status']) || $res['status'] != 200){
|
|
...
|
...
|
@@ -228,7 +230,8 @@ class AdsController extends BaseController |
|
|
|
$domain = trim($request->input('domain'));
|
|
|
|
$company = trim($request->input('company'));
|
|
|
|
$operator = trim($request->input('operator'));
|
|
|
|
$num = trim($request->input('num'));
|
|
|
|
$num = intval($request->input('num'));
|
|
|
|
$row = intval($request->input('row', 20));
|
|
|
|
|
|
|
|
$result = ReInquiryCount::when($task_id, function ($query, $task_id) {
|
|
|
|
return $query->WhereRaw("FIND_IN_SET({$task_id}, `task_ids`)");
|
|
...
|
...
|
@@ -243,7 +246,7 @@ class AdsController extends BaseController |
|
|
|
return $query->where('num', $operator?:'=', $num);
|
|
|
|
})
|
|
|
|
->orderBy('num', 'desc')
|
|
|
|
->paginate();
|
|
|
|
->paginate($row);
|
|
|
|
|
|
|
|
foreach ($result as $item){
|
|
|
|
$item->tasks = $item->tasks; //调用访问器
|
...
|
...
|
|