作者 刘锟

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

... ... @@ -108,18 +108,4 @@ class UpdateKeyword extends Command
return true;
}
/**
* @remark :更新产品关键词
* @name :updatedProductKeyword
* @author :lyh
* @method :post
* @time :2024/11/27 14:26
*/
public function updatedProductKeyword(){
$productModel = new Product();
$lists = $productModel->list();
foreach ($lists as $k => $v){
}
}
}
... ...
... ... @@ -8,6 +8,7 @@ use App\Http\Logic\Bside\Product\KeywordLogic;
use App\Http\Requests\Bside\Product\KeywordRequest;
use App\Models\Product\Keyword;
use App\Models\Product\KeywordPage;
use App\Models\Product\KeywordRelated;
use App\Models\Product\Product;
use App\Rules\Ids;
use Illuminate\Http\Request;
... ... @@ -35,7 +36,7 @@ class KeywordController extends BaseController
$data = $keyword->lists($this->map,$this->page,$this->row,$this->order,$filed);
if(!empty($data)){
foreach ($data['list'] as &$v){
$v['product_num'] = Product::where('keyword_id','like' ,'%,'.$v['id'].',%')->count();
$v['product_num'] = KeywordRelated::where('keyword_id',$v['id'])->count();
if(!empty($v['seo_title']) || !empty($v['seo_keywords']) || !empty($v['seo_description'])){
$v['tdk'] = 1;
}else{
... ...
... ... @@ -43,7 +43,7 @@ class InquiryLogic extends BaseLogic
$ids = $this->request['ids'] ?: [];
$project = (new ProjectLogic())->getProjectInfo($this->user['project_id']);
$domain = (!empty(
$project['deploy_optimize']['domain']) ? ((new DomainInfo())->getDomain($project['deploy_optimize']['domain'])) : '');
$project['deploy_optimize']['domain']) ? ((new DomainInfo())->getDomain($project['deploy_optimize']['domain'])) : $project['deploy_build']['test_domain']);
$list = $this->form_globalso_api->getInquiryList($domain, $search, $page, $page_size, $ids);
//处理格式 免得前端又改
$data = [
... ...
... ... @@ -208,8 +208,11 @@ class ProductLogic extends BaseLogic
public function editList(){
$category_ids = $this->param['category_id'];
$this->param['category_id'] = $this->handleListCategory($this->param['category_id']);
$keyword_arr = $this->param['keyword_id'];
$this->param['keyword_id'] = $this->saveKeyword($this->param['keyword_id']);
$keyword_arr = $this->saveKeyword($this->param['keyword_id']);
$this->param['keyword_id'] = '';
if(!empty($keyword_arr)){
$this->param['keyword_id'] = ','.implode(',',$keyword_arr).',';
}
if(isset($this->param['gallery']) && !empty($this->param['gallery'])){
foreach ($this->param['gallery'] as $k => $v){
$v['url'] = str_replace_url($v['url']);
... ... @@ -242,7 +245,7 @@ class ProductLogic extends BaseLogic
* @time :2023/10/26 9:51
*/
public function saveKeyword($keyword){
$str = '';
$arr = [];
if(isset($keyword) && !empty($keyword)){
$arr = [];
$keywordModel = new Keyword();
... ... @@ -267,9 +270,8 @@ class ProductLogic extends BaseLogic
$arr[] = $info['id'];
}
}
$str = ','.implode(',',$arr).',';
}
return $str;
return $arr;
}
/**
... ...
... ... @@ -569,7 +569,7 @@ class RankDataLogic extends BaseLogic
if(in_array($project_id, array_keys($multiple_api_no_project_ids))){
$api_nos = array_keys($multiple_api_no_project_ids[$project_id]);
//今天其他api_no是否都达标了
$count = RankData::where('project_id', $project_id)->whereIn('api_no', $api_nos)->where('api_no', '<>', $api_no)->where('date', date('Y-m-d'))
$count = RankData::where('project_id', $project_id)->whereIn('api_no', $api_nos)->where('api_no', '<>', $api_no)->where('updated_date', date('Y-m-d'))
->where('is_compliance', 1)->count();
if($count == count($api_nos) - 1){
Project::where('id', $project_id)->update(['is_remain_today' => 1, 'finish_remain_day' => $compliance_day + 1]);
... ...
... ... @@ -34,10 +34,12 @@ class SyncService
$project = Project::with('deploy_build')->with('deploy_optimize')->where(['id'=>$project_id])->first();
// 不满足条件 不同步到表单系统
if (empty($project->deploy_optimize->domain)) {
return false;
}
$domain = '';
}else{
// 生产域名
$domain = (new DomainInfo())->getDomain($project->deploy_optimize->domain);
}
// 收件设置信息
ProjectServer::useProject($project_id);
$receive = WebSettingReceiving::where(['project_id' => $project_id])->get();
... ...
... ... @@ -114,7 +114,10 @@ class SyncSubmitTaskService
public function subscribe($data, $date, $task_id){
$email = $data['data']['email'];
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
$model = new Email();
$model = Email::where('email', $email)->first();
if($model){
return true;
}
$model->email = $email;
$model->save();
}else{
... ...