作者 刘锟

Merge remote-tracking branch 'origin/master' into akun

@@ -173,7 +173,11 @@ class BaseLogic extends Logic @@ -173,7 +173,11 @@ class BaseLogic extends Logic
173 $data['project_id'] = $this->user['project_id']; 173 $data['project_id'] = $this->user['project_id'];
174 $str = http_build_query($data); 174 $str = http_build_query($data);
175 $url = $this->user['domain'].'api/delHtml/?'.$str; 175 $url = $this->user['domain'].'api/delHtml/?'.$str;
176 - shell_exec('curl -k '.$url); 176 + $rs = shell_exec('curl -k "'.$url.'"');
  177 +// if($this->user['project_id'] == 177){
  178 +// @file_put_contents(storage_path('logs/lyh_error.log'), var_export($url, true) . PHP_EOL, FILE_APPEND);
  179 +// @file_put_contents(storage_path('logs/lyh_error.log'), var_export($rs, true) . PHP_EOL, FILE_APPEND);
  180 +// }
177 // curlGet($url); 181 // curlGet($url);
178 return $this->success(); 182 return $this->success();
179 } 183 }
@@ -88,7 +88,7 @@ class CountLogic extends BaseLogic @@ -88,7 +88,7 @@ class CountLogic extends BaseLogic
88 * @time :2023/5/24 14:03 88 * @time :2023/5/24 14:03
89 */ 89 */
90 public function keyword_data_count(){ 90 public function keyword_data_count(){
91 - $yesterday = Carbon::yesterday()->toDateString(); 91 + $yesterday = date('Y-m-d');
92 $rankDataModel = new RankDataModel(); 92 $rankDataModel = new RankDataModel();
93 $param = [ 93 $param = [
94 'updated_date' => $yesterday, 94 'updated_date' => $yesterday,
@@ -96,7 +96,11 @@ class CountLogic extends BaseLogic @@ -96,7 +96,11 @@ class CountLogic extends BaseLogic
96 ]; 96 ];
97 $data = $rankDataModel->read($param,['first_num','first_page_num','first_three_pages_num','first_five_pages_num','first_ten_pages_num']); 97 $data = $rankDataModel->read($param,['first_num','first_page_num','first_three_pages_num','first_five_pages_num','first_ten_pages_num']);
98 if($data === false){ 98 if($data === false){
99 - $data = []; 99 + $param['updated_date'] = Carbon::yesterday()->toDateString();
  100 + $data = $rankDataModel->read($param,['first_num','first_page_num','first_three_pages_num','first_five_pages_num','first_ten_pages_num']);
  101 + if($data === false){
  102 + $data = [];
  103 + }
100 } 104 }
101 return $this->success($data); 105 return $this->success($data);
102 } 106 }
@@ -57,9 +57,12 @@ class CopyProjectJob implements ShouldQueue @@ -57,9 +57,12 @@ class CopyProjectJob implements ShouldQueue
57 $data = $data->getAttributes(); 57 $data = $data->getAttributes();
58 $type = $data['type']; 58 $type = $data['type'];
59 $data['type'] = 0; 59 $data['type'] = 0;
  60 + $data['old_project_id'] = $this->param['project_id'];
60 $data['title'] = $data['title'].'-copy'; 61 $data['title'] = $data['title'].'-copy';
61 unset($data['id']); 62 unset($data['id']);
62 $project_id = $projectModel->insertGetId($data); 63 $project_id = $projectModel->insertGetId($data);
  64 + $hashids = new Hashids($data['from_order_id'], 13, 'abcdefghjkmnpqrstuvwxyz1234567890');
  65 + $projectModel->edit(['from_order_id'=>$hashids->encode($project_id)],['id'=>$project_id]);
63 //复制部署表 66 //复制部署表
64 $buildModel = new DeployBuild(); 67 $buildModel = new DeployBuild();
65 $buildData = $buildModel::where('project_id', $this->param['project_id'])->first(); 68 $buildData = $buildModel::where('project_id', $this->param['project_id'])->first();