正在显示
4 个修改的文件
包含
9 行增加
和
17 行删除
| @@ -66,7 +66,6 @@ class DomainInfoController extends BaseController | @@ -66,7 +66,6 @@ class DomainInfoController extends BaseController | ||
| 66 | 'remark.required' => '备注不能为空', | 66 | 'remark.required' => '备注不能为空', |
| 67 | 'belong_to.required' => '域名不能为空', | 67 | 'belong_to.required' => '域名不能为空', |
| 68 | ]); | 68 | ]); |
| 69 | - return true; | ||
| 70 | } | 69 | } |
| 71 | 70 | ||
| 72 | /** | 71 | /** |
| @@ -70,13 +70,6 @@ class ProjectGscController extends BaseController | @@ -70,13 +70,6 @@ class ProjectGscController extends BaseController | ||
| 70 | * @time :2023/6/19 16:28 | 70 | * @time :2023/6/19 16:28 |
| 71 | */ | 71 | */ |
| 72 | public function save(GscRequest $gscRequest,GscLogic $gscLogic){ | 72 | public function save(GscRequest $gscRequest,GscLogic $gscLogic){ |
| 73 | - if(isset($this->param['id'])){ | ||
| 74 | - $gscRequest->validate([ | ||
| 75 | - 'id'=>'required' | ||
| 76 | - ],[ | ||
| 77 | - 'id.required' => 'GSC账号ID不能为空' | ||
| 78 | - ]); | ||
| 79 | - } | ||
| 80 | $gscRequest->validated(); | 73 | $gscRequest->validated(); |
| 81 | $gscLogic->GscSave(); | 74 | $gscLogic->GscSave(); |
| 82 | $this->response('success'); | 75 | $this->response('success'); |
| @@ -38,13 +38,6 @@ class ProjectsController extends BaseController | @@ -38,13 +38,6 @@ class ProjectsController extends BaseController | ||
| 38 | * @time :2023/7/11 9:53 | 38 | * @time :2023/7/11 9:53 |
| 39 | */ | 39 | */ |
| 40 | public function save(ProjectsLogic $projectsLogic){ | 40 | public function save(ProjectsLogic $projectsLogic){ |
| 41 | - if(isset($this->param['id']) && !empty($this->param['id'])){ | ||
| 42 | - $this->request->validate([ | ||
| 43 | - 'id'=>'required' | ||
| 44 | - ],[ | ||
| 45 | - 'id.required' => 'ID不能为空' | ||
| 46 | - ]); | ||
| 47 | - } | ||
| 48 | //参数验证 | 41 | //参数验证 |
| 49 | $this->verifyParam(); | 42 | $this->verifyParam(); |
| 50 | $projectsLogic->projectsSave(); | 43 | $projectsLogic->projectsSave(); |
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | 2 | ||
| 3 | namespace App\Models\Manage; | 3 | namespace App\Models\Manage; |
| 4 | 4 | ||
| 5 | +use App\Helper\Common; | ||
| 5 | use App\Models\Base; | 6 | use App\Models\Base; |
| 6 | use Illuminate\Support\Facades\Cache; | 7 | use Illuminate\Support\Facades\Cache; |
| 7 | 8 | ||
| @@ -38,8 +39,14 @@ class Manage extends Base | @@ -38,8 +39,14 @@ class Manage extends Base | ||
| 38 | public function getName($id){ | 39 | public function getName($id){ |
| 39 | $name = ''; | 40 | $name = ''; |
| 40 | if(!empty($id)){ | 41 | if(!empty($id)){ |
| 41 | - $info = $this->read(['id'=>$id],['id','name']); | ||
| 42 | - if($info !== false){ | 42 | + $info = Common::get_user_cache('manager',$id,'A'); |
| 43 | + if($info === false){ | ||
| 44 | + $info = $this->read(['id'=>$id],['id','name']); | ||
| 45 | + if($info !== false){ | ||
| 46 | + $name = $info['name']; | ||
| 47 | + } | ||
| 48 | + Common::set_user_cache('manager',$id,'A'); | ||
| 49 | + }else{ | ||
| 43 | $name = $info['name']; | 50 | $name = $info['name']; |
| 44 | } | 51 | } |
| 45 | } | 52 | } |
-
请 注册 或 登录 后发表评论