Merge remote-tracking branch 'origin/master' into akun
正在显示
12 个修改的文件
包含
88 行增加
和
24 行删除
| @@ -59,12 +59,14 @@ class RemainDay extends Command | @@ -59,12 +59,14 @@ class RemainDay extends Command | ||
| 59 | */ | 59 | */ |
| 60 | protected $description = '网站服务剩余时长'; | 60 | protected $description = '网站服务剩余时长'; |
| 61 | 61 | ||
| 62 | + public $project_id = 0; | ||
| 62 | 63 | ||
| 63 | /** | 64 | /** |
| 64 | * @return bool | 65 | * @return bool |
| 65 | */ | 66 | */ |
| 66 | public function handle() | 67 | public function handle() |
| 67 | { | 68 | { |
| 69 | + $this->project = new Project(); | ||
| 68 | $this->_action(); | 70 | $this->_action(); |
| 69 | return true; | 71 | return true; |
| 70 | } | 72 | } |
| @@ -174,6 +176,7 @@ class RemainDay extends Command | @@ -174,6 +176,7 @@ class RemainDay extends Command | ||
| 174 | if($item['version'] == 7.5 && $deploy_build['seo_plan'] != 0 && $deploy_build['plan'] != 0){ | 176 | if($item['version'] == 7.5 && $deploy_build['seo_plan'] != 0 && $deploy_build['plan'] != 0){ |
| 175 | $geoCountModel = new GeoCount(); | 177 | $geoCountModel = new GeoCount(); |
| 176 | $is_qualify = $geoCountModel->where('project_id', $item['id'])->orderBy('id', 'desc')->value('is_qualify'); | 178 | $is_qualify = $geoCountModel->where('project_id', $item['id'])->orderBy('id', 'desc')->value('is_qualify'); |
| 179 | + $remain_day = $item['remain_day']; | ||
| 177 | if($item['is_remain_today'] > 0 && $is_qualify > 0){ | 180 | if($item['is_remain_today'] > 0 && $is_qualify > 0){ |
| 178 | $remain_day = $item['remain_day'] - 1; | 181 | $remain_day = $item['remain_day'] - 1; |
| 179 | } | 182 | } |
| @@ -59,6 +59,12 @@ class GeoWritingsTask extends Command | @@ -59,6 +59,12 @@ class GeoWritingsTask extends Command | ||
| 59 | $main = $gptHelper->openai_chat_qqs($aiCommand2); | 59 | $main = $gptHelper->openai_chat_qqs($aiCommand2); |
| 60 | $images = explode(',',$info['img']); | 60 | $images = explode(',',$info['img']); |
| 61 | //组装一条数据 | 61 | //组装一条数据 |
| 62 | + if(isset($images[0]) && !empty($images[0])){ | ||
| 63 | + $images[0] = '<img src="' . $images[0] . '" alt="">'; | ||
| 64 | + } | ||
| 65 | + if(isset($images[1]) && !empty($images[1])){ | ||
| 66 | + $images[1] = '<img src="' . $images[1] . '" alt="">'; | ||
| 67 | + } | ||
| 62 | try { | 68 | try { |
| 63 | $saveData = [ | 69 | $saveData = [ |
| 64 | 'title'=>$info['title'], | 70 | 'title'=>$info['title'], |
| @@ -85,10 +85,10 @@ class GeoController extends BaseController | @@ -85,10 +85,10 @@ class GeoController extends BaseController | ||
| 85 | $geoWritingsModel = new GeoWritings(); | 85 | $geoWritingsModel = new GeoWritings(); |
| 86 | $info = $geoWritingsModel->read(['uniqid' => $token]); | 86 | $info = $geoWritingsModel->read(['uniqid' => $token]); |
| 87 | if ($info === false){ | 87 | if ($info === false){ |
| 88 | - return $this->error('非法请求'); | 88 | + return $this->response('非法请求',Code::SYSTEM_ERROR); |
| 89 | } | 89 | } |
| 90 | if ($info['status'] == GeoWritings::STATUS_FINISH){ | 90 | if ($info['status'] == GeoWritings::STATUS_FINISH){ |
| 91 | - return $this->error('当前文章已确认,不可再次确认'); | 91 | + return $this->response('当前文章已确认,不可再次确认',Code::SYSTEM_ERROR); |
| 92 | } | 92 | } |
| 93 | $this->param['confirm_ip'] = $this->request->ip(); | 93 | $this->param['confirm_ip'] = $this->request->ip(); |
| 94 | $this->param['confirm_at'] = date('Y-m-d H:i:s'); | 94 | $this->param['confirm_at'] = date('Y-m-d H:i:s'); |
| @@ -108,7 +108,7 @@ class GeoController extends BaseController | @@ -108,7 +108,7 @@ class GeoController extends BaseController | ||
| 108 | $token = trim($this->param['token']); | 108 | $token = trim($this->param['token']); |
| 109 | $data = GeoConfirm::where(['uniqid' => $token])->first(); | 109 | $data = GeoConfirm::where(['uniqid' => $token])->first(); |
| 110 | if (empty($data)){ | 110 | if (empty($data)){ |
| 111 | - return $this->error('确认链接已重置,请查看最新推送链接!'); | 111 | + return $this->response('确认链接已重置,请查看最新推送链接!',Code::SYSTEM_ERROR); |
| 112 | } | 112 | } |
| 113 | $content = explode("\n", $data->content); | 113 | $content = explode("\n", $data->content); |
| 114 | $confirm = explode("\n", $data->confirm); | 114 | $confirm = explode("\n", $data->confirm); |
| @@ -57,13 +57,13 @@ class GeoController extends BaseController | @@ -57,13 +57,13 @@ class GeoController extends BaseController | ||
| 57 | 'manager_id' => 'nullable|integer', | 57 | 'manager_id' => 'nullable|integer', |
| 58 | 'company' => 'nullable|max:200', | 58 | 'company' => 'nullable|max:200', |
| 59 | 'brand' => 'nullable|max:200', | 59 | 'brand' => 'nullable|max:200', |
| 60 | - 'description' => 'nullable|max:500', | 60 | +// 'description' => 'nullable|max:500', |
| 61 | ], [ | 61 | ], [ |
| 62 | 'project_id.required' => '项目ID不能为空', | 62 | 'project_id.required' => '项目ID不能为空', |
| 63 | 'manager_id.integer' => '管理员参数非法', | 63 | 'manager_id.integer' => '管理员参数非法', |
| 64 | 'company.max' => '公司名称不能超过200个字符', | 64 | 'company.max' => '公司名称不能超过200个字符', |
| 65 | 'brand.max' => '品牌名不能超过200个字符', | 65 | 'brand.max' => '品牌名不能超过200个字符', |
| 66 | - 'description.max' => '描述不能超过500个字符', | 66 | +// 'description.max' => '描述不能超过500个字符', |
| 67 | ]); | 67 | ]); |
| 68 | $data = $this->logic->saveConfig($this->param); | 68 | $data = $this->logic->saveConfig($this->param); |
| 69 | $this->response('success', Code::SUCCESS, $data); | 69 | $this->response('success', Code::SUCCESS, $data); |
| @@ -49,6 +49,24 @@ class GeoWritingsController extends BaseController | @@ -49,6 +49,24 @@ class GeoWritingsController extends BaseController | ||
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | /** | 51 | /** |
| 52 | + * @remark :获取详情数据 | ||
| 53 | + * @name :info | ||
| 54 | + * @author :lyh | ||
| 55 | + * @method :post | ||
| 56 | + * @time :2025/11/7 11:09 | ||
| 57 | + */ | ||
| 58 | + public function info() | ||
| 59 | + { | ||
| 60 | + $this->request->validate([ | ||
| 61 | + 'id'=>'required', | ||
| 62 | + ],[ | ||
| 63 | + 'id.required' => 'id不能为空', | ||
| 64 | + ]); | ||
| 65 | + $data = $this->logic->infoWriting(); | ||
| 66 | + $this->response('success',Code::SUCCESS,$data); | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + /** | ||
| 52 | * @remark :保存geoAi文章生成数据 | 70 | * @remark :保存geoAi文章生成数据 |
| 53 | * @name :lists | 71 | * @name :lists |
| 54 | * @author :lyh | 72 | * @author :lyh |
| @@ -4,6 +4,7 @@ namespace App\Http\Controllers\Aside\Manage; | @@ -4,6 +4,7 @@ namespace App\Http\Controllers\Aside\Manage; | ||
| 4 | use App\Enums\Common\Code; | 4 | use App\Enums\Common\Code; |
| 5 | use App\Http\Controllers\Aside\BaseController; | 5 | use App\Http\Controllers\Aside\BaseController; |
| 6 | use App\Http\Requests\Aside\Manage\ManagerHrRequest; | 6 | use App\Http\Requests\Aside\Manage\ManagerHrRequest; |
| 7 | +use App\Models\Geo\GeoConf; | ||
| 7 | use App\Models\Manage\ManageHr; | 8 | use App\Models\Manage\ManageHr; |
| 8 | use App\Http\Logic\Aside\Manage\HrLogic; | 9 | use App\Http\Logic\Aside\Manage\HrLogic; |
| 9 | 10 | ||
| @@ -121,4 +122,18 @@ class HrController extends BaseController | @@ -121,4 +122,18 @@ class HrController extends BaseController | ||
| 121 | $hrLogic->setSort(); | 122 | $hrLogic->setSort(); |
| 122 | $this->response('success'); | 123 | $this->response('success'); |
| 123 | } | 124 | } |
| 125 | + | ||
| 126 | + /** | ||
| 127 | + * @remark :获取geo项目负责人 | ||
| 128 | + * @name :getGeoManagerList | ||
| 129 | + * @author :lyh | ||
| 130 | + * @method :post | ||
| 131 | + * @time :2025/11/7 14:31 | ||
| 132 | + */ | ||
| 133 | + public function getGeoManagerList() | ||
| 134 | + { | ||
| 135 | + $geoConfModel = new GeoConf(); | ||
| 136 | + $geo_manage_list = $geoConfModel->geoManage($this->param['name'] ?? ''); | ||
| 137 | + $this->response('success',Code::SUCCESS,$geo_manage_list); | ||
| 138 | + } | ||
| 124 | } | 139 | } |
| @@ -360,6 +360,12 @@ class ProjectController extends BaseController | @@ -360,6 +360,12 @@ class ProjectController extends BaseController | ||
| 360 | } | 360 | } |
| 361 | 361 | ||
| 362 | } | 362 | } |
| 363 | + if(isset($this->param['geo_manage_id'])){ | ||
| 364 | + //geo项目负责人 | ||
| 365 | + $geoConfModel = new GeoConf(); | ||
| 366 | + $ids = $geoConfModel->selectField(['manager_id' => $this->param['geo_manage_id']], 'project_id'); | ||
| 367 | + $query = $query->whereIn('gl_project.id', $ids); | ||
| 368 | + } | ||
| 363 | return $query; | 369 | return $query; |
| 364 | } | 370 | } |
| 365 | 371 |
| @@ -25,9 +25,6 @@ class LinkDataController extends BaseController | @@ -25,9 +25,6 @@ class LinkDataController extends BaseController | ||
| 25 | * @time :2025/3/14 16:33 | 25 | * @time :2025/3/14 16:33 |
| 26 | */ | 26 | */ |
| 27 | public function lists(GeoLink $linkData){ | 27 | public function lists(GeoLink $linkData){ |
| 28 | - if(!isset($this->map['type']) || empty($this->map['type'])){ | ||
| 29 | - $this->map['type'] = $linkData::TYPE_LINK; | ||
| 30 | - } | ||
| 31 | $this->map['project_id'] = $this->user['project_id']; | 28 | $this->map['project_id'] = $this->user['project_id']; |
| 32 | $lists = $linkData->lists($this->map,$this->page,$this->row); | 29 | $lists = $linkData->lists($this->map,$this->page,$this->row); |
| 33 | $this->response('success',Code::SUCCESS,$lists); | 30 | $this->response('success',Code::SUCCESS,$lists); |
| @@ -41,6 +41,19 @@ class GeoWritingsLogic extends BaseLogic | @@ -41,6 +41,19 @@ class GeoWritingsLogic extends BaseLogic | ||
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | /** | 43 | /** |
| 44 | + * @remark :获取详情 | ||
| 45 | + * @name :infoWriting | ||
| 46 | + * @author :lyh | ||
| 47 | + * @method :post | ||
| 48 | + * @time :2025/11/7 11:02 | ||
| 49 | + */ | ||
| 50 | + public function infoWriting() | ||
| 51 | + { | ||
| 52 | + $data = $this->model->read($this->param); | ||
| 53 | + return $this->success($data); | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + /** | ||
| 44 | * @remark :手动上传数据 | 57 | * @remark :手动上传数据 |
| 45 | * @name :saveWriting | 58 | * @name :saveWriting |
| 46 | * @author :lyh | 59 | * @author :lyh |
| @@ -35,15 +35,12 @@ class GeoWritingsTaskRequest extends FormRequest | @@ -35,15 +35,12 @@ class GeoWritingsTaskRequest extends FormRequest | ||
| 35 | 'company' => 'required|string', | 35 | 'company' => 'required|string', |
| 36 | 'brand' => 'required|string', | 36 | 'brand' => 'required|string', |
| 37 | 'keyword' => 'required|string', | 37 | 'keyword' => 'required|string', |
| 38 | - 'prefix' => 'required|string', | ||
| 39 | - 'suffix' => 'required|string', | 38 | +// 'prefix' => 'required|string', |
| 39 | +// 'suffix' => 'required|string', | ||
| 40 | 'event_title' => 'required|string', | 40 | 'event_title' => 'required|string', |
| 41 | 'event_content' => 'required|string', | 41 | 'event_content' => 'required|string', |
| 42 | 'title' => 'required|string|max:120', | 42 | 'title' => 'required|string|max:120', |
| 43 | 'description' => 'required|string', | 43 | 'description' => 'required|string', |
| 44 | - 'footer' => 'required|string', | ||
| 45 | - 'img' => 'required|string', | ||
| 46 | - 'ai_model' => 'required|string', | ||
| 47 | ]; | 44 | ]; |
| 48 | } | 45 | } |
| 49 | } | 46 | } |
| @@ -24,21 +24,28 @@ class GeoConf extends Base | @@ -24,21 +24,28 @@ class GeoConf extends Base | ||
| 24 | protected $table = 'gl_project_geo_conf'; | 24 | protected $table = 'gl_project_geo_conf'; |
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | - /** | ||
| 28 | - * GEO 负责人集合 | ||
| 29 | - * TODO 负责人:优化师 + 陶婵 + 艾媛媛 | ||
| 30 | - * @return array | ||
| 31 | - */ | ||
| 32 | - public function geoManage() | 27 | + public function geoManage($name = '') |
| 33 | { | 28 | { |
| 29 | + // 如果有搜索条件,直接查询(不缓存) | ||
| 30 | + if (!empty($name)) { | ||
| 31 | + $optimize = ManageHr::where(function($query) { | ||
| 32 | + $query->where(['status' => ManageHr::STATUS_ONE, 'entry_position' => 46]) | ||
| 33 | + ->orWhereIn('id', [11, 207, 875, 893]); | ||
| 34 | + })->where('name', 'like', '%' . $name . '%') | ||
| 35 | + ->pluck('name', 'id') | ||
| 36 | + ->toArray(); | ||
| 37 | + | ||
| 38 | + ksort($optimize); | ||
| 39 | + return $optimize; | ||
| 40 | + } | ||
| 41 | + // 没有搜索条件时使用缓存 | ||
| 34 | $key = 'geo_manage_list_' . date('Ymd'); | 42 | $key = 'geo_manage_list_' . date('Ymd'); |
| 35 | $optimize = Cache::get($key); | 43 | $optimize = Cache::get($key); |
| 36 | if (empty($optimize)) { | 44 | if (empty($optimize)) { |
| 37 | - $optimize = ManageHr::where(['status' => ManageHr::STATUS_ONE, 'entry_position' => 46])->pluck('name', 'id')->toArray(); | ||
| 38 | - $optimize[11] = '陶婵'; | ||
| 39 | - $optimize[207] = '吴雨静'; | ||
| 40 | - $optimize[875] = '艾媛媛'; | ||
| 41 | - $optimize[893] = '杨汀'; | 45 | + $optimize = ManageHr::where(function($query) { |
| 46 | + $query->where(['status' => ManageHr::STATUS_ONE, 'entry_position' => 46]) | ||
| 47 | + ->orWhereIn('id', [11, 207, 875, 893]); | ||
| 48 | + })->pluck('name', 'id')->toArray(); | ||
| 42 | ksort($optimize); | 49 | ksort($optimize); |
| 43 | Cache::put($key, $optimize, 3600); | 50 | Cache::put($key, $optimize, 3600); |
| 44 | } | 51 | } |
| @@ -153,6 +153,7 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -153,6 +153,7 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 153 | Route::any('/info', [Aside\Manage\HrController::class, 'info'])->name('admin.hr_info'); | 153 | Route::any('/info', [Aside\Manage\HrController::class, 'info'])->name('admin.hr_info'); |
| 154 | Route::post('/save', [Aside\Manage\HrController::class, 'save'])->name('admin.hr_save'); | 154 | Route::post('/save', [Aside\Manage\HrController::class, 'save'])->name('admin.hr_save'); |
| 155 | Route::post('/sort', [Aside\Manage\HrController::class, 'sort'])->name('admin.hr_sort'); | 155 | Route::post('/sort', [Aside\Manage\HrController::class, 'sort'])->name('admin.hr_sort'); |
| 156 | + Route::post('/getGeoManagerList', [Aside\Manage\HrController::class, 'getGeoManagerList'])->name('admin.hr_getGeoManagerList'); | ||
| 156 | Route::any('/getSearchParamsList', [Aside\Manage\HrController::class, 'getSearchParamsList'])->name('admin.hr_getSearchParamsList'); | 157 | Route::any('/getSearchParamsList', [Aside\Manage\HrController::class, 'getSearchParamsList'])->name('admin.hr_getSearchParamsList'); |
| 157 | }); | 158 | }); |
| 158 | 159 | ||
| @@ -609,6 +610,7 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -609,6 +610,7 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 609 | //geo文章管理 | 610 | //geo文章管理 |
| 610 | Route::prefix('writing')->group(function () { | 611 | Route::prefix('writing')->group(function () { |
| 611 | Route::any('/', [Aside\Geo\GeoWritingsController::class, 'lists'])->name('admin.geo_writing_task'); | 612 | Route::any('/', [Aside\Geo\GeoWritingsController::class, 'lists'])->name('admin.geo_writing_task'); |
| 613 | + Route::any('/info', [Aside\Geo\GeoWritingsController::class, 'info'])->name('admin.geo_writing_info'); | ||
| 612 | Route::any('/saveWriting', [Aside\Geo\GeoWritingsController::class, 'saveWriting'])->name('admin.geo_writing_saveWriting'); | 614 | Route::any('/saveWriting', [Aside\Geo\GeoWritingsController::class, 'saveWriting'])->name('admin.geo_writing_saveWriting'); |
| 613 | Route::any('/delWriting', [Aside\Geo\GeoWritingsController::class, 'delWriting'])->name('admin.geo_writing_delWriting'); | 615 | Route::any('/delWriting', [Aside\Geo\GeoWritingsController::class, 'delWriting'])->name('admin.geo_writing_delWriting'); |
| 614 | Route::any('/sendWechatMessage', [Aside\Geo\GeoWritingsController::class, 'sendWechatMessage'])->name('admin.geo_writing_sendWechatMessage'); | 616 | Route::any('/sendWechatMessage', [Aside\Geo\GeoWritingsController::class, 'sendWechatMessage'])->name('admin.geo_writing_sendWechatMessage'); |
-
请 注册 或 登录 后发表评论