作者 李宇航

合并分支 'master-server' 到 'master'

Master server



查看合并请求 !959
... ... @@ -107,5 +107,5 @@ class UpdateKeyword extends Command
shell_exec('curl -k "'.$url.'"');
return true;
}
}
... ...
... ... @@ -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{
... ...
... ... @@ -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;
}
/**
... ...