Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into bate
正在显示
7 个修改的文件
包含
51 行增加
和
6 行删除
| @@ -54,7 +54,7 @@ class UpdateRoute extends Command | @@ -54,7 +54,7 @@ class UpdateRoute extends Command | ||
| 54 | */ | 54 | */ |
| 55 | public function handle(){ | 55 | public function handle(){ |
| 56 | $projectModel = new Project(); | 56 | $projectModel = new Project(); |
| 57 | - $list = $projectModel->list(['id'=>['in',[221]],'is_upgrade'=>0]); | 57 | + $list = $projectModel->list(['id'=>['in',[68]],'is_upgrade'=>0]); |
| 58 | foreach ($list as $v){ | 58 | foreach ($list as $v){ |
| 59 | echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL; | 59 | echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL; |
| 60 | ProjectServer::useProject($v['id']); | 60 | ProjectServer::useProject($v['id']); |
| @@ -130,4 +130,23 @@ class CustomModuleCategoryController extends BaseController | @@ -130,4 +130,23 @@ class CustomModuleCategoryController extends BaseController | ||
| 130 | $logic->categoryDel(); | 130 | $logic->categoryDel(); |
| 131 | $this->response('success'); | 131 | $this->response('success'); |
| 132 | } | 132 | } |
| 133 | + | ||
| 134 | + /** | ||
| 135 | + * @remark :排序 | ||
| 136 | + * @name :sort | ||
| 137 | + * @author :lyh | ||
| 138 | + * @method :post | ||
| 139 | + * @time :2024/1/3 14:18 | ||
| 140 | + */ | ||
| 141 | + public function sort(CustomModuleCategoryLogic $logic){ | ||
| 142 | + $this->request->validate([ | ||
| 143 | + 'id'=>['required'], | ||
| 144 | + 'sort'=>['required'], | ||
| 145 | + ],[ | ||
| 146 | + 'id.required' => 'ID不能为空', | ||
| 147 | + 'sort.required' => '排序字段不能为空', | ||
| 148 | + ]); | ||
| 149 | + $logic->categorySort(); | ||
| 150 | + $this->response('success'); | ||
| 151 | + } | ||
| 133 | } | 152 | } |
| @@ -219,4 +219,19 @@ class CustomModuleCategoryLogic extends BaseLogic | @@ -219,4 +219,19 @@ class CustomModuleCategoryLogic extends BaseLogic | ||
| 219 | $this->curlDelRoute(['route'=>$info['route']]); | 219 | $this->curlDelRoute(['route'=>$info['route']]); |
| 220 | return $this->success(); | 220 | return $this->success(); |
| 221 | } | 221 | } |
| 222 | + | ||
| 223 | + /** | ||
| 224 | + * @remark :排序 | ||
| 225 | + * @name :categorySort | ||
| 226 | + * @author :lyh | ||
| 227 | + * @method :post | ||
| 228 | + * @time :2023/9/26 17:38 | ||
| 229 | + */ | ||
| 230 | + public function categorySort(){ | ||
| 231 | + $rs = $this->model->edit(['sort'=>$this->param['sort']],['id'=>$this->param['id']]); | ||
| 232 | + if($rs === false){ | ||
| 233 | + $this->fail('系统错误,请联系管理员'); | ||
| 234 | + } | ||
| 235 | + return $this->success(); | ||
| 236 | + } | ||
| 222 | } | 237 | } |
| @@ -202,7 +202,7 @@ class CategoryLogic extends BaseLogic | @@ -202,7 +202,7 @@ class CategoryLogic extends BaseLogic | ||
| 202 | * 产品导入:分类处理 | 202 | * 产品导入:分类处理 |
| 203 | * @param $project_id | 203 | * @param $project_id |
| 204 | * @param $category | 204 | * @param $category |
| 205 | - * @return string | 205 | + * @return array |
| 206 | * @throws \Exception | 206 | * @throws \Exception |
| 207 | * @author Akun | 207 | * @author Akun |
| 208 | * @date 2023/09/21 14:55 | 208 | * @date 2023/09/21 14:55 |
| @@ -227,7 +227,9 @@ class CategoryLogic extends BaseLogic | @@ -227,7 +227,9 @@ class CategoryLogic extends BaseLogic | ||
| 227 | } | 227 | } |
| 228 | //清除缓存 | 228 | //清除缓存 |
| 229 | Common::del_user_cache('product_category',$project_id); | 229 | Common::del_user_cache('product_category',$project_id); |
| 230 | - return $this->getLastCategory($return); | 230 | + $category_id = $this->getLastCategory($return); |
| 231 | + | ||
| 232 | + return ['category_id'=>$category_id,'category_arr'=>$return]; | ||
| 231 | } | 233 | } |
| 232 | 234 | ||
| 233 | /** | 235 | /** |
| @@ -616,10 +616,13 @@ class ProductLogic extends BaseLogic | @@ -616,10 +616,13 @@ class ProductLogic extends BaseLogic | ||
| 616 | if (!$product) { | 616 | if (!$product) { |
| 617 | 617 | ||
| 618 | $category_id = ''; | 618 | $category_id = ''; |
| 619 | + $category_arr = []; | ||
| 619 | if ($data[2]??'') { | 620 | if ($data[2]??'') { |
| 620 | //处理分类 | 621 | //处理分类 |
| 621 | $categoryLogic = new CategoryLogic(); | 622 | $categoryLogic = new CategoryLogic(); |
| 622 | - $category_id = $categoryLogic->importProductCategory($project_id, $data[2]); | 623 | + $category_info = $categoryLogic->importProductCategory($project_id, $data[2]); |
| 624 | + $category_id = $category_info['category_id']; | ||
| 625 | + $category_arr = $category_info['category_arr']; | ||
| 623 | } | 626 | } |
| 624 | 627 | ||
| 625 | $keyword_id = ''; | 628 | $keyword_id = ''; |
| @@ -805,6 +808,11 @@ class ProductLogic extends BaseLogic | @@ -805,6 +808,11 @@ class ProductLogic extends BaseLogic | ||
| 805 | 808 | ||
| 806 | $this->edit(['route' => $route], ['id' => $id]); | 809 | $this->edit(['route' => $route], ['id' => $id]); |
| 807 | 810 | ||
| 811 | + //关联分类 | ||
| 812 | + if($category_arr){ | ||
| 813 | + CategoryRelated::saveRelated($id, $category_arr); | ||
| 814 | + } | ||
| 815 | + | ||
| 808 | return true; | 816 | return true; |
| 809 | } | 817 | } |
| 810 | 818 |
| @@ -65,8 +65,8 @@ class RankDataLogic extends BaseLogic | @@ -65,8 +65,8 @@ class RankDataLogic extends BaseLogic | ||
| 65 | 'cert_info' => $domain_info['cert_info'] ?? '', | 65 | 'cert_info' => $domain_info['cert_info'] ?? '', |
| 66 | 'plan' => Project::planMap()[$project['deploy_build']['plan']], | 66 | 'plan' => Project::planMap()[$project['deploy_build']['plan']], |
| 67 | 'keyword_num' => $project['deploy_build']['keyword_num'], | 67 | 'keyword_num' => $project['deploy_build']['keyword_num'], |
| 68 | - 'compliance_day' => $rank['compliance_day'] ?? 0, | ||
| 69 | - 'remain_day' => $project['deploy_build']['service_duration'] - ($rank['compliance_day'] ?? 0), | 68 | + 'compliance_day' => $project['compliance_day'] ?? 0, |
| 69 | + 'remain_day' => $project['deploy_build']['service_duration'] - ($project['compliance_day'] ?? 0), | ||
| 70 | ]; | 70 | ]; |
| 71 | 71 | ||
| 72 | //小语种列表 | 72 | //小语种列表 |
| @@ -446,6 +446,7 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -446,6 +446,7 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 446 | Route::any('/info', [\App\Http\Controllers\Bside\CustomModule\CustomModuleCategoryController::class, 'info'])->name('custom_category_info'); | 446 | Route::any('/info', [\App\Http\Controllers\Bside\CustomModule\CustomModuleCategoryController::class, 'info'])->name('custom_category_info'); |
| 447 | Route::any('/save', [\App\Http\Controllers\Bside\CustomModule\CustomModuleCategoryController::class, 'save'])->name('custom_category_save'); | 447 | Route::any('/save', [\App\Http\Controllers\Bside\CustomModule\CustomModuleCategoryController::class, 'save'])->name('custom_category_save'); |
| 448 | Route::any('/del', [\App\Http\Controllers\Bside\CustomModule\CustomModuleCategoryController::class, 'del'])->name('custom_category_del'); | 448 | Route::any('/del', [\App\Http\Controllers\Bside\CustomModule\CustomModuleCategoryController::class, 'del'])->name('custom_category_del'); |
| 449 | + Route::any('/sort', [\App\Http\Controllers\Bside\CustomModule\CustomModuleCategoryController::class, 'sort'])->name('custom_category_sort'); | ||
| 449 | }); | 450 | }); |
| 450 | 451 | ||
| 451 | Route::prefix('content')->group(function () { | 452 | Route::prefix('content')->group(function () { |
-
请 注册 或 登录 后发表评论