Merge remote-tracking branch 'origin/master' into akun
正在显示
11 个修改的文件
包含
177 行增加
和
4 行删除
| @@ -105,7 +105,7 @@ class RemainDay extends Command | @@ -105,7 +105,7 @@ class RemainDay extends Command | ||
| 105 | } | 105 | } |
| 106 | //todo::优化项目中途达标计时切换为按天计时 | 106 | //todo::优化项目中途达标计时切换为按天计时 |
| 107 | if(in_array($item['id'],$this->projectSwitchId)){ | 107 | if(in_array($item['id'],$this->projectSwitchId)){ |
| 108 | - $this->project->edit(['remain_day'=>$item['remain_day'] - 1,'finish_remain_day'=>$item['finish_remain_day'] + 1],['id'=>$item['id']]); | 108 | + $this->project->edit(['remain_day'=>($item['remain_day'] - 1),'finish_remain_day'=>($item['finish_remain_day'] + 1)],['id'=>$item['id']]); |
| 109 | continue; | 109 | continue; |
| 110 | } | 110 | } |
| 111 | //白帽版本单独计算 | 111 | //白帽版本单独计算 |
| @@ -29,6 +29,27 @@ class GeoConfirmController extends BaseController | @@ -29,6 +29,27 @@ class GeoConfirmController extends BaseController | ||
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | /** | 31 | /** |
| 32 | + * @remark :确认信息详情 | ||
| 33 | + * @name :getInfo | ||
| 34 | + * @author :lyh | ||
| 35 | + * @method :post | ||
| 36 | + * @time :2025/10/30 09:08 | ||
| 37 | + */ | ||
| 38 | + public function getInfo() | ||
| 39 | + { | ||
| 40 | + $this->request->validate([ | ||
| 41 | + 'project_id' => 'required', | ||
| 42 | + 'type' => 'required|integer', | ||
| 43 | + ], [ | ||
| 44 | + 'project_id.required' => '项目ID不能为空', | ||
| 45 | + 'type.required' => '确定数据类型不能为空', | ||
| 46 | + 'type.integer' => '确定数据类型不正确', | ||
| 47 | + ]); | ||
| 48 | + $data = $this->logic->getConfirmInfo(); | ||
| 49 | + $this->response('success', Code::SUCCESS, $data); | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + /** | ||
| 32 | * 保存确认数据, 并推送微信群 | 53 | * 保存确认数据, 并推送微信群 |
| 33 | * @param Request $request | 54 | * @param Request $request |
| 34 | * @throws \App\Exceptions\AsideGlobalException | 55 | * @throws \App\Exceptions\AsideGlobalException |
| @@ -462,7 +462,7 @@ class ProjectController extends BaseController | @@ -462,7 +462,7 @@ class ProjectController extends BaseController | ||
| 462 | } | 462 | } |
| 463 | $manageModel = new ManageHr(); | 463 | $manageModel = new ManageHr(); |
| 464 | //geo项目 | 464 | //geo项目 |
| 465 | - if (($item['plan'] == 0) && ($item['seo_plan'] != 0)) { | 465 | + if (($item['seo_plan'] != 0) && ($item['seo_plan'] != 9 || $item['plan'] == 0)) { |
| 466 | //geo项目负责人 | 466 | //geo项目负责人 |
| 467 | $geoConfModel = new GeoConf(); | 467 | $geoConfModel = new GeoConf(); |
| 468 | $manage_id = $geoConfModel->getValue(['project_id' => $item['id']], 'manager_id'); | 468 | $manage_id = $geoConfModel->getValue(['project_id' => $item['id']], 'manager_id'); |
| @@ -236,8 +236,11 @@ class CNoticeController extends BaseController | @@ -236,8 +236,11 @@ class CNoticeController extends BaseController | ||
| 236 | if(!$project_info){ | 236 | if(!$project_info){ |
| 237 | $this->fail('未查询到项目数据'); | 237 | $this->fail('未查询到项目数据'); |
| 238 | } | 238 | } |
| 239 | + $project_ids = [ | ||
| 240 | + 4041,4094,3514 | ||
| 241 | + ]; | ||
| 239 | // --------------------------------------------------- 特殊处理通知生成页面 -------------------------------------------------------------- | 242 | // --------------------------------------------------- 特殊处理通知生成页面 -------------------------------------------------------------- |
| 240 | - if ($type == 2 && ($project_id != 4041) && ($project_id != 4094) && ($project_info['main_lang_id'] == 8)) { | 243 | + if ($type == 2 && !in_array($project_id,$project_ids) && ($project_info['main_lang_id'] == 8)) { |
| 241 | $this->fail('申请项目主语种为俄语,禁止翻译小语种,如若需要翻译小语种, 请联系售后人员确认!'); | 244 | $this->fail('申请项目主语种为俄语,禁止翻译小语种,如若需要翻译小语种, 请联系售后人员确认!'); |
| 242 | } | 245 | } |
| 243 | 246 |
| @@ -12,6 +12,7 @@ namespace App\Http\Controllers\Bside\Setting; | @@ -12,6 +12,7 @@ namespace App\Http\Controllers\Bside\Setting; | ||
| 12 | use App\Enums\Common\Code; | 12 | use App\Enums\Common\Code; |
| 13 | use App\Http\Controllers\Bside\BaseController; | 13 | use App\Http\Controllers\Bside\BaseController; |
| 14 | use App\Http\Logic\Bside\Setting\SettingFaqLogic; | 14 | use App\Http\Logic\Bside\Setting\SettingFaqLogic; |
| 15 | +use App\Models\RouteMap\RouteMap; | ||
| 15 | use Illuminate\Http\Request; | 16 | use Illuminate\Http\Request; |
| 16 | 17 | ||
| 17 | class SettingFaqController extends BaseController | 18 | class SettingFaqController extends BaseController |
| @@ -24,6 +25,18 @@ class SettingFaqController extends BaseController | @@ -24,6 +25,18 @@ class SettingFaqController extends BaseController | ||
| 24 | } | 25 | } |
| 25 | 26 | ||
| 26 | /** | 27 | /** |
| 28 | + * @remark :获取所有路由 | ||
| 29 | + * @name :getRouteList | ||
| 30 | + * @author :lyh | ||
| 31 | + * @method :post | ||
| 32 | + * @time :2025/10/30 09:35 | ||
| 33 | + */ | ||
| 34 | + public function getRouteList(){ | ||
| 35 | + $data = $this->logic->getRouteList(); | ||
| 36 | + $this->response('success',Code::SUCCESS,$data); | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + /** | ||
| 27 | * @remark :faq列表页数据 | 40 | * @remark :faq列表页数据 |
| 28 | * @name :lists | 41 | * @name :lists |
| 29 | * @author :lyh | 42 | * @author :lyh |
| @@ -35,4 +48,58 @@ class SettingFaqController extends BaseController | @@ -35,4 +48,58 @@ class SettingFaqController extends BaseController | ||
| 35 | $lists = $this->logic->getFaqLists($this->map,$this->page,$this->row,$this->order); | 48 | $lists = $this->logic->getFaqLists($this->map,$this->page,$this->row,$this->order); |
| 36 | $this->response('success',Code::SUCCESS,$lists); | 49 | $this->response('success',Code::SUCCESS,$lists); |
| 37 | } | 50 | } |
| 51 | + | ||
| 52 | + /** | ||
| 53 | + * @remark :获取详情 | ||
| 54 | + * @name :getInfo | ||
| 55 | + * @author :lyh | ||
| 56 | + * @method :post | ||
| 57 | + * @time :2025/10/30 09:28 | ||
| 58 | + */ | ||
| 59 | + public function getInfo() | ||
| 60 | + { | ||
| 61 | + $this->request->validate([ | ||
| 62 | + 'id'=>'required', | ||
| 63 | + ],[ | ||
| 64 | + 'id.required' => 'ID不能为空', | ||
| 65 | + ]); | ||
| 66 | + $data = $this->logic->getFaqInfo(); | ||
| 67 | + $this->response('success',Code::SUCCESS,$data); | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + /** | ||
| 71 | + * @remark :保存faq数据 | ||
| 72 | + * @name :saveFaq | ||
| 73 | + * @author :lyh | ||
| 74 | + * @method :post | ||
| 75 | + * @time :2025/10/29 17:21 | ||
| 76 | + */ | ||
| 77 | + public function saveFaq() | ||
| 78 | + { | ||
| 79 | + $this->request->validate([ | ||
| 80 | + 'route'=>'required', | ||
| 81 | + ],[ | ||
| 82 | + 'route.required' => '路由不能为空', | ||
| 83 | + ]); | ||
| 84 | + $data = $this->logic->saveFaq(); | ||
| 85 | + $this->response('success',Code::SUCCESS,$data); | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + /** | ||
| 89 | + * @remark :删除对应数据 | ||
| 90 | + * @name :deleteFaq | ||
| 91 | + * @author :lyh | ||
| 92 | + * @method :post | ||
| 93 | + * @time :2025/10/29 17:23 | ||
| 94 | + */ | ||
| 95 | + public function deleteFaq(){ | ||
| 96 | + $this->request->validate([ | ||
| 97 | + 'id'=>'required|array', | ||
| 98 | + ],[ | ||
| 99 | + 'id.required' => 'ID不能为空', | ||
| 100 | + 'id.array' => 'ID为数组', | ||
| 101 | + ]); | ||
| 102 | + $data = $this->logic->deleteFaq(); | ||
| 103 | + $this->response('success',Code::SUCCESS,$data); | ||
| 104 | + } | ||
| 38 | } | 105 | } |
| @@ -57,4 +57,17 @@ class GeoConfirmLogic extends BaseLogic | @@ -57,4 +57,17 @@ class GeoConfirmLogic extends BaseLogic | ||
| 57 | } | 57 | } |
| 58 | return $this->success(['id'=>$id]); | 58 | return $this->success(['id'=>$id]); |
| 59 | } | 59 | } |
| 60 | + | ||
| 61 | + /** | ||
| 62 | + * @remark :获取数据详情 | ||
| 63 | + * @name :getInfo | ||
| 64 | + * @author :lyh | ||
| 65 | + * @method :post | ||
| 66 | + * @time :2025/10/30 09:13 | ||
| 67 | + */ | ||
| 68 | + public function getConfirmInfo() | ||
| 69 | + { | ||
| 70 | + $data = $this->model->read($this->param); | ||
| 71 | + return $this->success($data); | ||
| 72 | + } | ||
| 60 | } | 73 | } |
| @@ -242,6 +242,7 @@ class TicketUploadDataLogic extends BaseLogic | @@ -242,6 +242,7 @@ class TicketUploadDataLogic extends BaseLogic | ||
| 242 | 'name' => $info['text']['title'], | 242 | 'name' => $info['text']['title'], |
| 243 | 'image'=>$info['text']['image'], | 243 | 'image'=>$info['text']['image'], |
| 244 | 'text'=>$info['text']['remark'], | 244 | 'text'=>$info['text']['remark'], |
| 245 | + 'remark'=>$info['text']['intro'] ?? '', | ||
| 245 | 'category_id'=>$category_id ?? '', | 246 | 'category_id'=>$category_id ?? '', |
| 246 | 'status'=>1, | 247 | 'status'=>1, |
| 247 | ]; | 248 | ]; |
| @@ -276,6 +277,7 @@ class TicketUploadDataLogic extends BaseLogic | @@ -276,6 +277,7 @@ class TicketUploadDataLogic extends BaseLogic | ||
| 276 | 'name' => $info['text']['title'], | 277 | 'name' => $info['text']['title'], |
| 277 | 'image'=>$info['text']['image'], | 278 | 'image'=>$info['text']['image'], |
| 278 | 'text'=>$info['text']['remark'], | 279 | 'text'=>$info['text']['remark'], |
| 280 | + 'remark'=>$info['text']['intro'] ?? '', | ||
| 279 | 'category_id'=>$category_id ?? '', | 281 | 'category_id'=>$category_id ?? '', |
| 280 | 'status'=>1, | 282 | 'status'=>1, |
| 281 | ]; | 283 | ]; |
| @@ -10,6 +10,7 @@ | @@ -10,6 +10,7 @@ | ||
| 10 | namespace App\Http\Logic\Bside\Setting; | 10 | namespace App\Http\Logic\Bside\Setting; |
| 11 | 11 | ||
| 12 | use App\Http\Logic\Bside\BaseLogic; | 12 | use App\Http\Logic\Bside\BaseLogic; |
| 13 | +use App\Models\RouteMap\RouteMap; | ||
| 13 | use App\Models\WebSetting\SettingFaq; | 14 | use App\Models\WebSetting\SettingFaq; |
| 14 | 15 | ||
| 15 | class SettingFaqLogic extends BaseLogic | 16 | class SettingFaqLogic extends BaseLogic |
| @@ -22,6 +23,20 @@ class SettingFaqLogic extends BaseLogic | @@ -22,6 +23,20 @@ class SettingFaqLogic extends BaseLogic | ||
| 22 | } | 23 | } |
| 23 | 24 | ||
| 24 | /** | 25 | /** |
| 26 | + * @remark :获取数据 | ||
| 27 | + * @name :getRouteList | ||
| 28 | + * @author :lyh | ||
| 29 | + * @method :post | ||
| 30 | + * @time :2025/10/30 09:36 | ||
| 31 | + */ | ||
| 32 | + public function getRouteList($map = []) | ||
| 33 | + { | ||
| 34 | + $routeModel = new RouteMap(); | ||
| 35 | + $list = $routeModel->list($map,'id',['*'],'desc',20); | ||
| 36 | + return $this->success($list); | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + /** | ||
| 25 | * @remark :获取列表页数据 | 40 | * @remark :获取列表页数据 |
| 26 | * @name :getFaqLists | 41 | * @name :getFaqLists |
| 27 | * @author :lyh | 42 | * @author :lyh |
| @@ -35,6 +50,18 @@ class SettingFaqLogic extends BaseLogic | @@ -35,6 +50,18 @@ class SettingFaqLogic extends BaseLogic | ||
| 35 | } | 50 | } |
| 36 | 51 | ||
| 37 | /** | 52 | /** |
| 53 | + * @remark :获取详情数据 | ||
| 54 | + * @name :getFaqById | ||
| 55 | + * @author :lyh | ||
| 56 | + * @method :post | ||
| 57 | + * @time :2025/10/30 09:29 | ||
| 58 | + */ | ||
| 59 | + public function getFaqInfo(){ | ||
| 60 | + $data = $this->model->read($this->param); | ||
| 61 | + return $this->success($data); | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + /** | ||
| 38 | * @remark :保存数据 | 65 | * @remark :保存数据 |
| 39 | * @name :saveFaq | 66 | * @name :saveFaq |
| 40 | * @author :lyh | 67 | * @author :lyh |
| @@ -43,7 +70,15 @@ class SettingFaqLogic extends BaseLogic | @@ -43,7 +70,15 @@ class SettingFaqLogic extends BaseLogic | ||
| 43 | */ | 70 | */ |
| 44 | public function saveFaq() | 71 | public function saveFaq() |
| 45 | { | 72 | { |
| 46 | - | 73 | + //todo::根据路由获取对应数据详情 |
| 74 | + $routeModel = new RouteMap(); | ||
| 75 | + $routeInfo = $routeModel->read(['route'=>$this->param['route']],['source','source_id']); | ||
| 76 | + if($routeInfo === false){ | ||
| 77 | + $this->fail('路由不存在'); | ||
| 78 | + } | ||
| 79 | + $this->param['qa'] = json_encode($this->param['qa'],true); | ||
| 80 | + $this->param['source'] = $routeInfo['source']; | ||
| 81 | + $this->param['source_id'] = $routeInfo['source_id']; | ||
| 47 | if(isset($this->param['id']) && !empty($this->param['id'])){ | 82 | if(isset($this->param['id']) && !empty($this->param['id'])){ |
| 48 | $id = $this->param['id']; | 83 | $id = $this->param['id']; |
| 49 | $this->model->edit($this->param,['id'=>$id]); | 84 | $this->model->edit($this->param,['id'=>$id]); |
| @@ -52,4 +87,16 @@ class SettingFaqLogic extends BaseLogic | @@ -52,4 +87,16 @@ class SettingFaqLogic extends BaseLogic | ||
| 52 | } | 87 | } |
| 53 | return $this->success(['id' => $id]); | 88 | return $this->success(['id' => $id]); |
| 54 | } | 89 | } |
| 90 | + | ||
| 91 | + /** | ||
| 92 | + * @remark :删除数据 | ||
| 93 | + * @name :deleteFaq | ||
| 94 | + * @author :lyh | ||
| 95 | + * @method :post | ||
| 96 | + * @time :2025/10/29 17:27 | ||
| 97 | + */ | ||
| 98 | + public function deleteFaq(){ | ||
| 99 | + $this->model->del(['id'=>['in',$this->param['id']]]); | ||
| 100 | + return $this->success(); | ||
| 101 | + } | ||
| 55 | } | 102 | } |
| @@ -9,9 +9,19 @@ | @@ -9,9 +9,19 @@ | ||
| 9 | 9 | ||
| 10 | namespace App\Models\WebSetting; | 10 | namespace App\Models\WebSetting; |
| 11 | 11 | ||
| 12 | +use App\Helper\Arr; | ||
| 12 | use App\Models\Base; | 13 | use App\Models\Base; |
| 13 | 14 | ||
| 14 | class SettingFaq extends Base | 15 | class SettingFaq extends Base |
| 15 | { | 16 | { |
| 16 | protected $table = 'gl_setting_faq'; | 17 | protected $table = 'gl_setting_faq'; |
| 18 | + | ||
| 19 | + //连接数据库 | ||
| 20 | + protected $connection = 'custom_mysql'; | ||
| 21 | + | ||
| 22 | + public function getQaAttribute($value) | ||
| 23 | + { | ||
| 24 | + $value = Arr::s2a($value); | ||
| 25 | + return $value; | ||
| 26 | + } | ||
| 17 | } | 27 | } |
| @@ -595,6 +595,7 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -595,6 +595,7 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 595 | //geo客户确认信息 | 595 | //geo客户确认信息 |
| 596 | Route::prefix('confirm')->group(function () { | 596 | Route::prefix('confirm')->group(function () { |
| 597 | Route::any('/saveConfirmContent', [Aside\Geo\GeoConfirmController::class, 'saveConfirmContent'])->name('admin.geo_confirm_saveConfirmContent'); | 597 | Route::any('/saveConfirmContent', [Aside\Geo\GeoConfirmController::class, 'saveConfirmContent'])->name('admin.geo_confirm_saveConfirmContent'); |
| 598 | + Route::any('/getInfo', [Aside\Geo\GeoConfirmController::class, 'getInfo'])->name('admin.geo_confirm_getInfo'); | ||
| 598 | }); | 599 | }); |
| 599 | //geoai文章任务管理 | 600 | //geoai文章任务管理 |
| 600 | Route::prefix('writing_task')->group(function () { | 601 | Route::prefix('writing_task')->group(function () { |
| @@ -768,6 +768,15 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -768,6 +768,15 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 768 | Route::any('/getSearchDate', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getSearchDate'])->name('geo_result_getSearchDate');//搜索记录时间 | 768 | Route::any('/getSearchDate', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getSearchDate'])->name('geo_result_getSearchDate');//搜索记录时间 |
| 769 | Route::any('/getPlatformCount', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getPlatformCount'])->name('geo_result_getPlatformCount');//搜索记录时间 | 769 | Route::any('/getPlatformCount', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getPlatformCount'])->name('geo_result_getPlatformCount');//搜索记录时间 |
| 770 | }); | 770 | }); |
| 771 | + | ||
| 772 | + //faq渲染数据 | ||
| 773 | + Route::prefix('faq')->group(function () { | ||
| 774 | + Route::any('/', [\App\Http\Controllers\Bside\Setting\SettingFaqController::class,'lists'])->name('faq_lists'); | ||
| 775 | + Route::any('/getRouteList', [\App\Http\Controllers\Bside\Setting\SettingFaqController::class,'getRouteList'])->name('faq_getRouteList'); | ||
| 776 | + Route::any('/saveFaq', [\App\Http\Controllers\Bside\Setting\SettingFaqController::class,'saveFaq'])->name('faq_saveFaq'); | ||
| 777 | + Route::any('/deleteFaq', [\App\Http\Controllers\Bside\Setting\SettingFaqController::class,'deleteFaq'])->name('faq_deleteFaq'); | ||
| 778 | + Route::any('/getInfo', [\App\Http\Controllers\Bside\Setting\SettingFaqController::class,'getInfo'])->name('faq_getInfo'); | ||
| 779 | + }); | ||
| 771 | }); | 780 | }); |
| 772 | //无需登录验证的路由组 | 781 | //无需登录验证的路由组 |
| 773 | Route::group([], function () { | 782 | Route::group([], function () { |
-
请 注册 或 登录 后发表评论