合并分支 'lyh-server' 到 'master'
Lyh server 查看合并请求 !2445
正在显示
3 个修改的文件
包含
37 行增加
和
2 行删除
| @@ -1283,4 +1283,39 @@ class ProjectController extends BaseController | @@ -1283,4 +1283,39 @@ class ProjectController extends BaseController | ||
| 1283 | NoticeLog::createLog(NoticeLog::TYPE_UPDATE_PROJECT_TDK, ['project_id' => $this->param['project_id'],'url'=>$this->param['url']]); | 1283 | NoticeLog::createLog(NoticeLog::TYPE_UPDATE_PROJECT_TDK, ['project_id' => $this->param['project_id'],'url'=>$this->param['url']]); |
| 1284 | $this->response('success',Code::SUCCESS,['url'=>$this->param['url']]); | 1284 | $this->response('success',Code::SUCCESS,['url'=>$this->param['url']]); |
| 1285 | } | 1285 | } |
| 1286 | + | ||
| 1287 | + /** | ||
| 1288 | + * @remark :统计剩余服务时常 | ||
| 1289 | + * @name :serviceNumCount | ||
| 1290 | + * @author :lyh | ||
| 1291 | + * @method :post | ||
| 1292 | + * @time :2025/7/29 14:12 | ||
| 1293 | + */ | ||
| 1294 | + public function serviceNumCount(){ | ||
| 1295 | + $this->request->validate([ | ||
| 1296 | + 'end_date'=>'required', | ||
| 1297 | + 'project_id'=>'required', | ||
| 1298 | + 'renewal_record'=>'required', | ||
| 1299 | + ],[ | ||
| 1300 | + 'end_date.required' => '结束时常不能为空', | ||
| 1301 | + 'project_id.required' => '项目id不能为空', | ||
| 1302 | + 'renewal_record.required' => '续费记录不能为空', | ||
| 1303 | + ]); | ||
| 1304 | + if(isset($this->param['renewal_record']) && !empty($this->param['renewal_record'])){ | ||
| 1305 | + $paymentModel = new Payment(); | ||
| 1306 | + $renewal_record = Arr::a2s($this->param['renewal_record']); | ||
| 1307 | + $paymentModel->edit(['renewal_record'=>$renewal_record],['project_id'=>$this->param['project_id']]); | ||
| 1308 | + } | ||
| 1309 | + $projectModel = new Project(); | ||
| 1310 | + $projectInfo = $projectModel->read(['project_id'=>$this->param['project_id']],['uptime','project_type']); | ||
| 1311 | + $diff = (strtotime($this->param['end_time']) - strtotime($projectInfo['uptime'])) / (60 * 60 * 24); | ||
| 1312 | + $deployBuildModel = new DeployBuild(); | ||
| 1313 | + if($projectModel['project_type'] == Project::PROJECT_TYPE_SEO){ | ||
| 1314 | + $param = ['seo_service_duration'=>$diff]; | ||
| 1315 | + }else{ | ||
| 1316 | + $param = ['service_duration'=>$diff]; | ||
| 1317 | + } | ||
| 1318 | + $deployBuildModel->edit($param,['project_id'=>$this->param['project_id']]); | ||
| 1319 | + $this->response('success'); | ||
| 1320 | + } | ||
| 1286 | } | 1321 | } |
| @@ -114,7 +114,7 @@ class RenewProjectController extends BaseController | @@ -114,7 +114,7 @@ class RenewProjectController extends BaseController | ||
| 114 | * @time :2023/8/18 14:33 | 114 | * @time :2023/8/18 14:33 |
| 115 | */ | 115 | */ |
| 116 | public function notHaveRenewItems(Project $project){ | 116 | public function notHaveRenewItems(Project $project){ |
| 117 | - $this->map['extend_type'] = $project::TYPE_FIVE;//未续费网站 if(!empty($param['search']) && !empty($param['search_type'])){ | 117 | + $this->map['extend_type'] = $project::TYPE_FIVE;//未续费网站 |
| 118 | if(!empty($this->map['title'])){ | 118 | if(!empty($this->map['title'])){ |
| 119 | $this->map['title'] = ['like', '%'.$this->map['title'].'%']; | 119 | $this->map['title'] = ['like', '%'.$this->map['title'].'%']; |
| 120 | } | 120 | } |
| @@ -131,7 +131,6 @@ class RenewProjectController extends BaseController | @@ -131,7 +131,6 @@ class RenewProjectController extends BaseController | ||
| 131 | if(!empty($lists)){ | 131 | if(!empty($lists)){ |
| 132 | $lists = $lists->toArray(); | 132 | $lists = $lists->toArray(); |
| 133 | $manageModel = new ManageHr(); | 133 | $manageModel = new ManageHr(); |
| 134 | - | ||
| 135 | foreach ($lists['list'] as $k=>$item){ | 134 | foreach ($lists['list'] as $k=>$item){ |
| 136 | $item = $this->handleParam($item,$manageModel,$domainModel); | 135 | $item = $this->handleParam($item,$manageModel,$domainModel); |
| 137 | $lists['list'][$k] = $item; | 136 | $lists['list'][$k] = $item; |
| @@ -205,6 +205,7 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -205,6 +205,7 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 205 | Route::any('/setIsParticiple', [Aside\Project\ProjectController::class, 'setIsParticiple'])->name('admin.project_setIsParticiple');//开启/关闭分词 | 205 | Route::any('/setIsParticiple', [Aside\Project\ProjectController::class, 'setIsParticiple'])->name('admin.project_setIsParticiple');//开启/关闭分词 |
| 206 | Route::any('/saveSiteStatus', [Aside\Project\ProjectController::class, 'saveSiteStatus'])->name('admin.project_saveSiteStatus'); | 206 | Route::any('/saveSiteStatus', [Aside\Project\ProjectController::class, 'saveSiteStatus'])->name('admin.project_saveSiteStatus'); |
| 207 | Route::any('/updateTdk', [Aside\Project\ProjectController::class, 'updateTdk'])->name('admin.project_updateTdk');//更新项目tdk | 207 | Route::any('/updateTdk', [Aside\Project\ProjectController::class, 'updateTdk'])->name('admin.project_updateTdk');//更新项目tdk |
| 208 | + Route::any('/serviceNumCount', [Aside\Project\ProjectController::class, 'serviceNumCount'])->name('admin.project_serviceNumCount');//根据续费记录统计剩余服务时常 | ||
| 208 | //获取关键词前缀和后缀 | 209 | //获取关键词前缀和后缀 |
| 209 | Route::prefix('keyword')->group(function () { | 210 | Route::prefix('keyword')->group(function () { |
| 210 | Route::any('/getKeywordPrefix', [Aside\Project\KeywordPrefixController::class, 'getKeywordPrefix'])->name('admin.keyword_getKeywordPrefix'); | 211 | Route::any('/getKeywordPrefix', [Aside\Project\KeywordPrefixController::class, 'getKeywordPrefix'])->name('admin.keyword_getKeywordPrefix'); |
-
请 注册 或 登录 后发表评论