正在显示
3 个修改的文件
包含
27 行增加
和
8 行删除
| @@ -3,6 +3,7 @@ | @@ -3,6 +3,7 @@ | ||
| 3 | namespace App\Http\Controllers\Aside\Project; | 3 | namespace App\Http\Controllers\Aside\Project; |
| 4 | 4 | ||
| 5 | use App\Enums\Common\Code; | 5 | use App\Enums\Common\Code; |
| 6 | +use App\Helper\Common; | ||
| 6 | use App\Http\Controllers\Aside\BaseController; | 7 | use App\Http\Controllers\Aside\BaseController; |
| 7 | use App\Http\Logic\Aside\Project\OnlineCheckLogic; | 8 | use App\Http\Logic\Aside\Project\OnlineCheckLogic; |
| 8 | use App\Http\Logic\Aside\Project\ProcessRecordsLogic; | 9 | use App\Http\Logic\Aside\Project\ProcessRecordsLogic; |
| @@ -72,6 +73,13 @@ class ProjectController extends BaseController | @@ -72,6 +73,13 @@ class ProjectController extends BaseController | ||
| 72 | return $this->success($data); | 73 | return $this->success($data); |
| 73 | } | 74 | } |
| 74 | 75 | ||
| 76 | + /** | ||
| 77 | + * @remark :获取数据详情 | ||
| 78 | + * @name :info | ||
| 79 | + * @author :lyh | ||
| 80 | + * @method :post | ||
| 81 | + * @time :2023/8/17 16:42 | ||
| 82 | + */ | ||
| 75 | public function info(Request $request, ProjectLogic $logic){ | 83 | public function info(Request $request, ProjectLogic $logic){ |
| 76 | $request->validate([ | 84 | $request->validate([ |
| 77 | 'id'=>'required' | 85 | 'id'=>'required' |
| @@ -82,6 +90,13 @@ class ProjectController extends BaseController | @@ -82,6 +90,13 @@ class ProjectController extends BaseController | ||
| 82 | $this->response('success',Code::SUCCESS,$data); | 90 | $this->response('success',Code::SUCCESS,$data); |
| 83 | } | 91 | } |
| 84 | 92 | ||
| 93 | + /** | ||
| 94 | + * @remark :保存数据 | ||
| 95 | + * @name :save | ||
| 96 | + * @author :lyh | ||
| 97 | + * @method :post | ||
| 98 | + * @time :2023/8/17 16:42 | ||
| 99 | + */ | ||
| 85 | public function save(ProjectRequest $request, ProjectLogic $logic) | 100 | public function save(ProjectRequest $request, ProjectLogic $logic) |
| 86 | { | 101 | { |
| 87 | $data = $logic->save($this->param); | 102 | $data = $logic->save($this->param); |
| @@ -13,7 +13,6 @@ class DomainInfoLogic extends BaseLogic | @@ -13,7 +13,6 @@ class DomainInfoLogic extends BaseLogic | ||
| 13 | public function __construct() | 13 | public function __construct() |
| 14 | { | 14 | { |
| 15 | parent::__construct(); | 15 | parent::__construct(); |
| 16 | - | ||
| 17 | $this->model = new DomainInfo(); | 16 | $this->model = new DomainInfo(); |
| 18 | } | 17 | } |
| 19 | 18 |
| @@ -109,13 +109,17 @@ class ProjectLogic extends BaseLogic | @@ -109,13 +109,17 @@ class ProjectLogic extends BaseLogic | ||
| 109 | * @time :2023/7/28 17:11 | 109 | * @time :2023/7/28 17:11 |
| 110 | */ | 110 | */ |
| 111 | public function getProjectInfo($id){ | 111 | public function getProjectInfo($id){ |
| 112 | - $info = $this->model->with('payment')->with('deploy_build') | ||
| 113 | - ->with('deploy_optimize')->with('online_check') | ||
| 114 | - ->with('project_after')->where(['id'=>$id])->first(); | ||
| 115 | - $info['online_check']['name'] = (new Manage())->read(['id'=>$info['online_check']['created_manage_id']])['name'] ?? ''; | ||
| 116 | - $info['deploy_optimize']['minor_keywords'] = json_decode($info['deploy_optimize']['minor_keywords']) ?? ''; | ||
| 117 | - if($info['extend_type'] != 0){ | ||
| 118 | - $info['type'] = $info['extend_type']; | 112 | + $info = Common::get_user_cache($this->model,$id); |
| 113 | + if(empty($info)){ | ||
| 114 | + $info = $this->model->with('payment')->with('deploy_build') | ||
| 115 | + ->with('deploy_optimize')->with('online_check') | ||
| 116 | + ->with('project_after')->where(['id'=>$id])->first(); | ||
| 117 | + $info['online_check']['name'] = (new Manage())->read(['id'=>$info['online_check']['created_manage_id']])['name'] ?? ''; | ||
| 118 | + $info['deploy_optimize']['minor_keywords'] = json_decode($info['deploy_optimize']['minor_keywords']) ?? ''; | ||
| 119 | + if($info['extend_type'] != 0){ | ||
| 120 | + $info['type'] = $info['extend_type']; | ||
| 121 | + } | ||
| 122 | + Common::set_user_cache($info,$this->model,$id); | ||
| 119 | } | 123 | } |
| 120 | return $this->success($info); | 124 | return $this->success($info); |
| 121 | } | 125 | } |
| @@ -140,6 +144,7 @@ class ProjectLogic extends BaseLogic | @@ -140,6 +144,7 @@ class ProjectLogic extends BaseLogic | ||
| 140 | $this->saveDeployBuild($param); | 144 | $this->saveDeployBuild($param); |
| 141 | $this->saveDeployOptimize($param); | 145 | $this->saveDeployOptimize($param); |
| 142 | $this->saveAfter($param); | 146 | $this->saveAfter($param); |
| 147 | + Common::del_user_cache($this->model,$res['id']); | ||
| 143 | DB::commit(); | 148 | DB::commit(); |
| 144 | }catch (\Exception $e){ | 149 | }catch (\Exception $e){ |
| 145 | DB::rollBack(); | 150 | DB::rollBack(); |
-
请 注册 或 登录 后发表评论