Merge remote-tracking branch 'origin/master' into akun
正在显示
9 个修改的文件
包含
54 行增加
和
3 行删除
| @@ -76,6 +76,8 @@ class RemainDay extends Command | @@ -76,6 +76,8 @@ class RemainDay extends Command | ||
| 76 | $item->remain_day = $remain_day > 0 ? $remain_day : 0; | 76 | $item->remain_day = $remain_day > 0 ? $remain_day : 0; |
| 77 | if($item->remain_day == 0){ | 77 | if($item->remain_day == 0){ |
| 78 | $item->extend_type = Project::TYPE_FIVE; | 78 | $item->extend_type = Project::TYPE_FIVE; |
| 79 | + $item->site_status = Project::TYPE_ONE;//关闭站点 | ||
| 80 | + //TODO::未续费网站禁止登录及通知C端禁止网站 | ||
| 79 | } | 81 | } |
| 80 | $item->save(); | 82 | $item->save(); |
| 81 | } | 83 | } |
| @@ -169,12 +169,15 @@ class ServersIpController extends BaseController | @@ -169,12 +169,15 @@ class ServersIpController extends BaseController | ||
| 169 | $info = $serverModel->read(['id'=>$this->map['servers_id']]); | 169 | $info = $serverModel->read(['id'=>$this->map['servers_id']]); |
| 170 | $data = []; | 170 | $data = []; |
| 171 | $serversIpModel = new ServersIpModel(); | 171 | $serversIpModel = new ServersIpModel(); |
| 172 | + $this->map['status'] = 0; | ||
| 172 | $list = $serversIpModel->list($this->map); | 173 | $list = $serversIpModel->list($this->map); |
| 174 | + if(!empty($list)){ | ||
| 173 | foreach ($list as $v){ | 175 | foreach ($list as $v){ |
| 174 | $position = strpos($v['domain'], '.'); | 176 | $position = strpos($v['domain'], '.'); |
| 175 | $result = substr($v['domain'], 0, $position); | 177 | $result = substr($v['domain'], 0, $position); |
| 176 | $data[] = ['记录类型'=>'A','主机记录'=>$result,'解析线路'=>'默认','记录值'=>$v['ip'],'MAX优先级'=>'','TTL值'=>600,'状态(暂停/启用)'=>'启用','备注'=>$info['server_name']]; | 178 | $data[] = ['记录类型'=>'A','主机记录'=>$result,'解析线路'=>'默认','记录值'=>$v['ip'],'MAX优先级'=>'','TTL值'=>600,'状态(暂停/启用)'=>'启用','备注'=>$info['server_name']]; |
| 177 | } | 179 | } |
| 180 | + } | ||
| 178 | $this->response('success',Code::SUCCESS,$data); | 181 | $this->response('success',Code::SUCCESS,$data); |
| 179 | } | 182 | } |
| 180 | } | 183 | } |
| @@ -92,6 +92,7 @@ class ProjectController extends BaseController | @@ -92,6 +92,7 @@ class ProjectController extends BaseController | ||
| 92 | 'gl_project.is_upgrade AS is_upgrade', | 92 | 'gl_project.is_upgrade AS is_upgrade', |
| 93 | 'gl_project.created_at AS created_at', | 93 | 'gl_project.created_at AS created_at', |
| 94 | 'gl_project.cooperate_date AS cooperate_date', | 94 | 'gl_project.cooperate_date AS cooperate_date', |
| 95 | + 'gl_project.site_status AS site_status', | ||
| 95 | 'gl_project_online_check.id AS online_check_id', | 96 | 'gl_project_online_check.id AS online_check_id', |
| 96 | 'gl_project_online_check.question AS question', | 97 | 'gl_project_online_check.question AS question', |
| 97 | 'gl_project_online_check.optimist_status AS optimist_status', | 98 | 'gl_project_online_check.optimist_status AS optimist_status', |
| @@ -273,6 +274,12 @@ class ProjectController extends BaseController | @@ -273,6 +274,12 @@ class ProjectController extends BaseController | ||
| 273 | if(isset($this->map['optimize_optimist_mid'])){ | 274 | if(isset($this->map['optimize_optimist_mid'])){ |
| 274 | $query = $query->where('gl_project_deploy_optimize.optimist_mid',$this->map['optimize_optimist_mid']); | 275 | $query = $query->where('gl_project_deploy_optimize.optimist_mid',$this->map['optimize_optimist_mid']); |
| 275 | } | 276 | } |
| 277 | + if(isset($this->map['plan'])){ | ||
| 278 | + $query = $query->where('gl_project_deploy_build.plan',$this->map['plan']); | ||
| 279 | + } | ||
| 280 | + if(isset($this->map['site_status'])){ | ||
| 281 | + $query = $query->where('gl_project.site_status',$this->map['site_status']); | ||
| 282 | + } | ||
| 276 | return $query; | 283 | return $query; |
| 277 | } | 284 | } |
| 278 | 285 | ||
| @@ -1047,4 +1054,26 @@ class ProjectController extends BaseController | @@ -1047,4 +1054,26 @@ class ProjectController extends BaseController | ||
| 1047 | $deployBuildModel->edit(['is_participle'=>$this->param['is_participle']],['project_id'=>$this->param['project_id']]); | 1054 | $deployBuildModel->edit(['is_participle'=>$this->param['is_participle']],['project_id'=>$this->param['project_id']]); |
| 1048 | $this->response('success'); | 1055 | $this->response('success'); |
| 1049 | } | 1056 | } |
| 1057 | + | ||
| 1058 | + /** | ||
| 1059 | + * @remark :(on/off)站点 | ||
| 1060 | + * @param : site_status(站点状态0/1:开启/关闭),id(项目id) | ||
| 1061 | + * @name :saveSiteStatus | ||
| 1062 | + * @author :lyh | ||
| 1063 | + * @method :post | ||
| 1064 | + * @time :2024/7/29 17:12 | ||
| 1065 | + */ | ||
| 1066 | + public function saveSiteStatus(){ | ||
| 1067 | + $projectModel = new Project(); | ||
| 1068 | + $this->request->validate([ | ||
| 1069 | + 'project_id'=>'required', | ||
| 1070 | + 'site_status'=>'required' | ||
| 1071 | + ],[ | ||
| 1072 | + 'project_id.required' => '项目id不能为空', | ||
| 1073 | + 'site_status.required' => '状态不能为空', | ||
| 1074 | + ]); | ||
| 1075 | + $projectModel->edit(['site_status'=>$this->map['site_status']],['id'=>$this->param['id']]); | ||
| 1076 | + //TODO::通知C端 | ||
| 1077 | + $this->response('success'); | ||
| 1078 | + } | ||
| 1050 | } | 1079 | } |
| @@ -108,7 +108,9 @@ class RenewProjectController extends BaseController | @@ -108,7 +108,9 @@ class RenewProjectController extends BaseController | ||
| 108 | */ | 108 | */ |
| 109 | public function notHaveRenewItems(Project $project){ | 109 | public function notHaveRenewItems(Project $project){ |
| 110 | $this->map['extend_type'] = $project::TYPE_FIVE;//未续费网站 if(!empty($param['search']) && !empty($param['search_type'])){ | 110 | $this->map['extend_type'] = $project::TYPE_FIVE;//未续费网站 if(!empty($param['search']) && !empty($param['search_type'])){ |
| 111 | - $this->map['title'] = ['like', '%'.$this->map['title'].'title']; | 111 | + if(!empty($this->map['title'])){ |
| 112 | + $this->map['title'] = ['like', '%'.$this->map['title'].'%']; | ||
| 113 | + } | ||
| 112 | $lists = $project->where($this->map)->with('payment')->with('deploy_build') | 114 | $lists = $project->where($this->map)->with('payment')->with('deploy_build') |
| 113 | ->with('deploy_optimize')->with('online_check') | 115 | ->with('deploy_optimize')->with('online_check') |
| 114 | ->with('project_after')->paginate($this->row, ['*'], 'page', $this->page); | 116 | ->with('project_after')->paginate($this->row, ['*'], 'page', $this->page); |
| @@ -165,6 +167,7 @@ class RenewProjectController extends BaseController | @@ -165,6 +167,7 @@ class RenewProjectController extends BaseController | ||
| 165 | 'optimist_status'=>$item['online_check']['optimist_status'] ?? 0, | 167 | 'optimist_status'=>$item['online_check']['optimist_status'] ?? 0, |
| 166 | 'qa_status'=>$item['online_check']['qa_status'] ?? 0, | 168 | 'qa_status'=>$item['online_check']['qa_status'] ?? 0, |
| 167 | 'service_day'=>$item['remain_day'] ?? 0, | 169 | 'service_day'=>$item['remain_day'] ?? 0, |
| 170 | + 'site_status'=>$item['site_status'], | ||
| 168 | ]; | 171 | ]; |
| 169 | return $item; | 172 | return $item; |
| 170 | } | 173 | } |
| @@ -159,6 +159,7 @@ class ProductController extends BaseController | @@ -159,6 +159,7 @@ class ProductController extends BaseController | ||
| 159 | $query = $query->whereIn('id',$product_id_arr); | 159 | $query = $query->whereIn('id',$product_id_arr); |
| 160 | } | 160 | } |
| 161 | if(isset($this->map['title']) && !empty($this->map['title'])){ | 161 | if(isset($this->map['title']) && !empty($this->map['title'])){ |
| 162 | + $this->map['title'] = str_replace('+',' ',$this->map['title']); | ||
| 162 | $query = $query->where('title','like','%'.$this->map['title'].'%'); | 163 | $query = $query->where('title','like','%'.$this->map['title'].'%'); |
| 163 | } | 164 | } |
| 164 | if(isset($this->map['status'])){ | 165 | if(isset($this->map['status'])){ |
| @@ -220,7 +220,7 @@ class RankDataController extends BaseController | @@ -220,7 +220,7 @@ class RankDataController extends BaseController | ||
| 220 | $res = HttpUtils::get('http://rank.waimaoq.com/luminati_rank', $param); | 220 | $res = HttpUtils::get('http://rank.waimaoq.com/luminati_rank', $param); |
| 221 | if ($res) { | 221 | if ($res) { |
| 222 | $res = Arr::s2a($res); | 222 | $res = Arr::s2a($res); |
| 223 | - $data['position'] = $res['position']; | 223 | + $data['position'] = $res['position'] ?? ''; |
| 224 | } | 224 | } |
| 225 | } | 225 | } |
| 226 | 226 |
| @@ -82,6 +82,13 @@ class ServersIpLogic extends BaseLogic | @@ -82,6 +82,13 @@ class ServersIpLogic extends BaseLogic | ||
| 82 | if(empty($v)){ | 82 | if(empty($v)){ |
| 83 | continue; | 83 | continue; |
| 84 | } | 84 | } |
| 85 | + $ipInfo = $this->model->read(['ip'=>$v]); | ||
| 86 | + if($ipInfo !== false){ | ||
| 87 | + if($ipInfo['status'] == 1){ | ||
| 88 | + $this->model->edit(['status'=>0],['id'=>$ipInfo['id']]); | ||
| 89 | + } | ||
| 90 | + continue; | ||
| 91 | + } | ||
| 85 | $param = [ | 92 | $param = [ |
| 86 | 'ip'=>$v, | 93 | 'ip'=>$v, |
| 87 | 'domain'=>ip_to_unique_string($v).'.'.$info['domain'], | 94 | 'domain'=>ip_to_unique_string($v).'.'.$info['domain'], |
| @@ -156,6 +156,9 @@ class UserLoginLogic | @@ -156,6 +156,9 @@ class UserLoginLogic | ||
| 156 | */ | 156 | */ |
| 157 | public function autoAssembleParam($info){ | 157 | public function autoAssembleParam($info){ |
| 158 | $project = $this->getProjectInfo($info['project_id']); | 158 | $project = $this->getProjectInfo($info['project_id']); |
| 159 | + if($project['site_status'] != 0){//关闭站点 | ||
| 160 | + $this->fail('当前网站已过期,请联系管理员及时续费。'); | ||
| 161 | + } | ||
| 159 | $info['title'] = $project['title'] ?? ''; | 162 | $info['title'] = $project['title'] ?? ''; |
| 160 | $info['company'] = $project['company'] ?? ''; | 163 | $info['company'] = $project['company'] ?? ''; |
| 161 | $info['from_order_id'] = $project['from_order_id'] ?? ''; | 164 | $info['from_order_id'] = $project['from_order_id'] ?? ''; |
| @@ -257,6 +260,9 @@ class UserLoginLogic | @@ -257,6 +260,9 @@ class UserLoginLogic | ||
| 257 | $info = $this->model->read(['mobile'=>$mobile,'project_id'=>$project_id],['id','mobile','status','role_id','token','name','wechat','project_id']); | 260 | $info = $this->model->read(['mobile'=>$mobile,'project_id'=>$project_id],['id','mobile','status','role_id','token','name','wechat','project_id']); |
| 258 | //获取项目详情 | 261 | //获取项目详情 |
| 259 | $project = $this->getProjectInfo($project_id); | 262 | $project = $this->getProjectInfo($project_id); |
| 263 | + if($project['site_status'] != 0){//关闭站点 | ||
| 264 | + $this->fail('当前网站已过期,请联系管理员及时续费。'); | ||
| 265 | + } | ||
| 260 | $info['title'] = $project['title'] ?? ''; | 266 | $info['title'] = $project['title'] ?? ''; |
| 261 | $info['company'] = $project['company'] ?? ''; | 267 | $info['company'] = $project['company'] ?? ''; |
| 262 | $info['from_order_id'] = $project['from_order_id'] ?? ''; | 268 | $info['from_order_id'] = $project['from_order_id'] ?? ''; |
| @@ -190,7 +190,7 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -190,7 +190,7 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 190 | Route::any('/saveWebTrafficConfig', [Aside\Project\ProjectController::class, 'saveWebTrafficConfig'])->name('admin.project_web_traffic_config_save');//保存引流配置 | 190 | Route::any('/saveWebTrafficConfig', [Aside\Project\ProjectController::class, 'saveWebTrafficConfig'])->name('admin.project_web_traffic_config_save');//保存引流配置 |
| 191 | Route::any('/updateProjectManager', [Aside\Project\ProjectController::class, 'updateProjectManager'])->name('admin.project_updateProjectManager');//更改项目人员配置 | 191 | Route::any('/updateProjectManager', [Aside\Project\ProjectController::class, 'updateProjectManager'])->name('admin.project_updateProjectManager');//更改项目人员配置 |
| 192 | Route::any('/setIsParticiple', [Aside\Project\ProjectController::class, 'setIsParticiple'])->name('admin.project_setIsParticiple');//开启/关闭分词 | 192 | Route::any('/setIsParticiple', [Aside\Project\ProjectController::class, 'setIsParticiple'])->name('admin.project_setIsParticiple');//开启/关闭分词 |
| 193 | - | 193 | + Route::any('/saveSiteStatus', [Aside\Project\ProjectController::class, 'saveSiteStatus'])->name('admin.project_saveSiteStatus'); |
| 194 | //获取关键词前缀和后缀 | 194 | //获取关键词前缀和后缀 |
| 195 | Route::prefix('keyword')->group(function () { | 195 | Route::prefix('keyword')->group(function () { |
| 196 | Route::any('/getKeywordPrefix', [Aside\Project\KeywordPrefixController::class, 'getKeywordPrefix'])->name('admin.keyword_getKeywordPrefix'); | 196 | Route::any('/getKeywordPrefix', [Aside\Project\KeywordPrefixController::class, 'getKeywordPrefix'])->name('admin.keyword_getKeywordPrefix'); |
-
请 注册 或 登录 后发表评论