作者 李宇航

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

Master server



查看合并请求 !772
... ... @@ -36,13 +36,23 @@ class ProjectKeywordController extends BaseController
if($keywordInfo === false){
$data['search_keywords'] = '';
$data['customer_keywords'] = '';
$this->response('success',Code::SUCCESS,$data);
}else{
$data['search_keywords'] = $keywordInfo['search_keywords'];
$data['customer_keywords'] = $keywordInfo['customer_keywords'];
}
$data['search_keywords'] = $keywordInfo['search_keywords'];
$data['customer_keywords'] = $keywordInfo['customer_keywords'];
$minorLanguageModel = new MinorLanguages();
$data['minor_language'] = $minorLanguageModel->list(['project_id'=>$this->user['project_id']]);
$this->response('success',Code::SUCCESS,$data);
}
/**
* @remark :获取小语种关键词
* @name :minorKeyword
* @author :lyh
* @method :post
* @time :2024/9/20 17:49
*/
public function minorKeyword(){
$minorLanguageModel = new MinorLanguages();
$data = $minorLanguageModel->list(['project_id'=>$this->user['project_id']]);
$this->response('success',Code::SUCCESS,$data);
}
}
... ...
... ... @@ -774,4 +774,23 @@ class ProductController extends BaseController
];
$this->response('success',Code::SUCCESS,$data);
}
/**
* @remark :批量设置产品
* @name :batchSetKeyword
* @author :lyh
* @method :post
* @time :2024/9/20 16:46
*/
public function batchSetKeyword(ProductLogic $logic){
$this->request->validate([
'id'=>'required|array',
'keyword_id'=>'required|array',
],[
'id.required' => '产品ID不能为空',
'category_id.required' => '关键词ID不能为空',
]);
$logic->batchSetKeyword();
$this->response('success');
}
}
... ...
... ... @@ -937,4 +937,17 @@ class ProductLogic extends BaseLogic
$this->model->edit(['keyword_id'=>null],['id'=>$this->param['id']]);
return $this->success(['id'=>$this->param['id']]);
}
/**
* @remark :批量设置产品关键词
* @name :batchSetKeyword
* @author :lyh
* @method :post
* @time :2024/9/20 16:48
*/
public function batchSetKeyword(){
$this->param['keyword_id'] = ','.implode(',',$this->param['keyword_id']).',';
$this->edit(['keyword_id'=>$this->param['keyword_id']],['id'=>['in',$this->param['id']]]);
return $this->success();
}
}
... ...
... ... @@ -13,6 +13,5 @@ use App\Models\Base;
class PhoneData extends Base
{
protected $connection = "custom_mysql";
protected $table = 'gl_phone_data';
}
... ...
... ... @@ -262,7 +262,8 @@ Route::middleware(['bloginauth'])->group(function () {
Route::any('/saveType', [\App\Http\Controllers\Bside\Product\ProductController::class, 'saveType'])->name('product_saveType');
Route::any('/delProductType', [\App\Http\Controllers\Bside\Product\ProductController::class, 'delProductType'])->name('product_delProductType');
Route::any('/getButton', [\App\Http\Controllers\Bside\Product\ProductController::class, 'getButton'])->name('product_getButton');
//产品分类
Route::any('/batchSetKeyword', [\App\Http\Controllers\Bside\Product\ProductController::class, 'batchSetKeyword'])->name('product_batchSetKeyword');
//产品分类batchSetKeyword
Route::get('category', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'index'])->name('product_category');
Route::get('category/info', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'info'])->name('product_category_info');
Route::any('category/categoryTopList', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'categoryTopList'])->name('product_category_categoryTopList');
... ... @@ -506,6 +507,7 @@ Route::middleware(['bloginauth'])->group(function () {
//优化关键词,检索关键词
Route::prefix('project_keyword')->group(function () {
Route::any('/', [\App\Http\Controllers\Bside\Keyword\ProjectKeywordController::class, 'searchKeywords'])->name('searchKeywords');
Route::any('/minorKeyword', [\App\Http\Controllers\Bside\Keyword\ProjectKeywordController::class, 'minorKeyword'])->name('searchKeywords');
});
//自定义模板
Route::prefix('custom_module')->group(function () {
... ...