作者 Your Name
@@ -139,7 +139,8 @@ class AdsController extends BaseController @@ -139,7 +139,8 @@ class AdsController extends BaseController
139 //是否v6 139 //是否v6
140 $domain_info = DomainInfo::where('domain', $domain)->first(); 140 $domain_info = DomainInfo::where('domain', $domain)->first();
141 if($domain_info){ 141 if($domain_info){
142 - $channel = Project::where('id', $domain_info['project_id'])->value('channel'); 142 + $channel = Project::where('id', $domain_info['project_id'])->where('delete_status', 1)->value('channel');
  143 + if($channel){
143 $data = [ 144 $data = [
144 'is_v6' => 1, 145 'is_v6' => 1,
145 'agent' => trim(explode('-', Channel::getChannelText($channel['user_id']??0))[0]), 146 'agent' => trim(explode('-', Channel::getChannelText($channel['user_id']??0))[0]),
@@ -147,6 +148,7 @@ class AdsController extends BaseController @@ -147,6 +148,7 @@ class AdsController extends BaseController
147 ]; 148 ];
148 return $this->response('success', Code::SUCCESS, $data); 149 return $this->response('success', Code::SUCCESS, $data);
149 } 150 }
  151 + }
150 $res = (new QuanqiusouApi())->getV5Agent($domain); 152 $res = (new QuanqiusouApi())->getV5Agent($domain);
151 if(empty($res['status']) || $res['status'] != 200){ 153 if(empty($res['status']) || $res['status'] != 200){
152 return $this->response($res['msg'] ?? '验证失败,请稍后再试!', Code::USER_ERROR, []); 154 return $this->response($res['msg'] ?? '验证失败,请稍后再试!', Code::USER_ERROR, []);
@@ -228,7 +230,8 @@ class AdsController extends BaseController @@ -228,7 +230,8 @@ class AdsController extends BaseController
228 $domain = trim($request->input('domain')); 230 $domain = trim($request->input('domain'));
229 $company = trim($request->input('company')); 231 $company = trim($request->input('company'));
230 $operator = trim($request->input('operator')); 232 $operator = trim($request->input('operator'));
231 - $num = trim($request->input('num')); 233 + $num = intval($request->input('num'));
  234 + $row = intval($request->input('row', 20));
232 235
233 $result = ReInquiryCount::when($task_id, function ($query, $task_id) { 236 $result = ReInquiryCount::when($task_id, function ($query, $task_id) {
234 return $query->WhereRaw("FIND_IN_SET({$task_id}, `task_ids`)"); 237 return $query->WhereRaw("FIND_IN_SET({$task_id}, `task_ids`)");
@@ -243,7 +246,7 @@ class AdsController extends BaseController @@ -243,7 +246,7 @@ class AdsController extends BaseController
243 return $query->where('num', $operator?:'=', $num); 246 return $query->where('num', $operator?:'=', $num);
244 }) 247 })
245 ->orderBy('num', 'desc') 248 ->orderBy('num', 'desc')
246 - ->paginate(); 249 + ->paginate($row);
247 250
248 foreach ($result as $item){ 251 foreach ($result as $item){
249 $item->tasks = $item->tasks; //调用访问器 252 $item->tasks = $item->tasks; //调用访问器
@@ -15,6 +15,7 @@ use App\Models\RouteMap\RouteMap; @@ -15,6 +15,7 @@ use App\Models\RouteMap\RouteMap;
15 use App\Models\User\ProjectMenu as ProjectMenuModel; 15 use App\Models\User\ProjectMenu as ProjectMenuModel;
16 use App\Models\User\ProjectRole as ProjectRoleModel; 16 use App\Models\User\ProjectRole as ProjectRoleModel;
17 use App\Models\User\User; 17 use App\Models\User\User;
  18 +use Illuminate\Support\Facades\Artisan;
18 use Illuminate\Support\Facades\Cache; 19 use Illuminate\Support\Facades\Cache;
19 20
20 /*** 21 /***
@@ -398,4 +399,15 @@ class ComController extends BaseController @@ -398,4 +399,15 @@ class ComController extends BaseController
398 $this->response('success',Code::SUCCESS,$lists); 399 $this->response('success',Code::SUCCESS,$lists);
399 } 400 }
400 401
  402 + /**
  403 + * @remark :
  404 + * @name :month_count
  405 + * @author :lyh
  406 + * @method :post
  407 + * @time :2024/10/28 11:51
  408 + */
  409 + public function month_count(){
  410 + Artisan::call('month_project '.$this->user['project_id']);
  411 + $this->response('重新刷新中,请稍后刷新查询');
  412 + }
401 } 413 }
@@ -128,6 +128,7 @@ class KeywordLogic extends BaseLogic @@ -128,6 +128,7 @@ class KeywordLogic extends BaseLogic
128 if(!isset($param['is_video_keyword']) || $param['is_video_keyword'] == null){ 128 if(!isset($param['is_video_keyword']) || $param['is_video_keyword'] == null){
129 $param['is_video_keyword'] = 0; 129 $param['is_video_keyword'] = 0;
130 } 130 }
  131 + $param['first_word'] = $this->first_word($param['title']);
131 return $param; 132 return $param;
132 } 133 }
133 134
@@ -140,9 +141,6 @@ class KeywordLogic extends BaseLogic @@ -140,9 +141,6 @@ class KeywordLogic extends BaseLogic
140 */ 141 */
141 public function first_word($title){ 142 public function first_word($title){
142 $first_title = mb_substr($title, 0, 1); 143 $first_title = mb_substr($title, 0, 1);
143 - if (preg_match("/[\x{4e00}-\x{9fa5}]/u", $first_title)) {  
144 - $first_title = 'all'; // 如果是中文字符,则置为空  
145 - }  
146 //返回对应的键 144 //返回对应的键
147 $keywordModel = new Keyword(); 145 $keywordModel = new Keyword();
148 $firstNumWord = $keywordModel->firstNumWord; 146 $firstNumWord = $keywordModel->firstNumWord;
@@ -151,7 +149,7 @@ class KeywordLogic extends BaseLogic @@ -151,7 +149,7 @@ class KeywordLogic extends BaseLogic
151 return $k; 149 return $k;
152 } 150 }
153 } 151 }
154 - return null; 152 + return 27;
155 } 153 }
156 154
157 /** 155 /**
@@ -174,6 +172,7 @@ class KeywordLogic extends BaseLogic @@ -174,6 +172,7 @@ class KeywordLogic extends BaseLogic
174 $param['created_at'] = date('Y-m-d H:i:s'); 172 $param['created_at'] = date('Y-m-d H:i:s');
175 $param['updated_at'] = $param['created_at']; 173 $param['updated_at'] = $param['created_at'];
176 $param['title'] = $v; 174 $param['title'] = $v;
  175 + $param['first_word'] = $this->first_word($param['title']);
177 $this->model->insertGetId($param); 176 $this->model->insertGetId($param);
178 } 177 }
179 } 178 }
@@ -247,7 +246,7 @@ class KeywordLogic extends BaseLogic @@ -247,7 +246,7 @@ class KeywordLogic extends BaseLogic
247 if($v){ 246 if($v){
248 $keyword_info = $this->model->read(['title'=>$v]); 247 $keyword_info = $this->model->read(['title'=>$v]);
249 if(!$keyword_info){ 248 if(!$keyword_info){
250 - $k_id = $this->model->addReturnId(['title'=>$v,'project_id'=>$project_id]); 249 + $k_id = $this->model->addReturnId(['title'=>$v,'first_word' => $this->first_word($v),'project_id'=>$project_id]);
251 $route = RouteMap::setRoute($v, RouteMap::SOURCE_PRODUCT_KEYWORD, $k_id, $project_id); 250 $route = RouteMap::setRoute($v, RouteMap::SOURCE_PRODUCT_KEYWORD, $k_id, $project_id);
252 $this->model->edit(['route'=>$route],['id'=>$k_id]); 251 $this->model->edit(['route'=>$route],['id'=>$k_id]);
253 }else{ 252 }else{