作者 赵彬吉

update

@@ -4,7 +4,7 @@ namespace App\Console\Commands; @@ -4,7 +4,7 @@ namespace App\Console\Commands;
4 4
5 5
6 use App\Models\Devops\DevopsTaskLog; 6 use App\Models\Devops\DevopsTaskLog;
7 -use App\Models\Project; 7 +use App\Models\Project\Project;
8 use Illuminate\Console\Command; 8 use Illuminate\Console\Command;
9 use App\Models\Devops\DevopsTask as DevopsTaskModel; 9 use App\Models\Devops\DevopsTask as DevopsTaskModel;
10 10
@@ -3,8 +3,8 @@ @@ -3,8 +3,8 @@
3 namespace App\Http\Controllers\Bside; 3 namespace App\Http\Controllers\Bside;
4 4
5 use App\Enums\Common\Code; 5 use App\Enums\Common\Code;
6 -use App\Models\Project;  
7 -use App\Models\Project as ProjectModel; 6 +use App\Models\Project\Project;
  7 +use App\Models\Project\Project as ProjectModel;
8 use App\Models\User\ProjectMenu as ProjectMenuModel; 8 use App\Models\User\ProjectMenu as ProjectMenuModel;
9 use App\Models\User\ProjectRole as ProjectRoleModel; 9 use App\Models\User\ProjectRole as ProjectRoleModel;
10 use App\Models\User\User as UserModel; 10 use App\Models\User\User as UserModel;
@@ -41,7 +41,8 @@ class ProjectLogic extends BaseLogic @@ -41,7 +41,8 @@ class ProjectLogic extends BaseLogic
41 public function save($param){ 41 public function save($param){
42 DB::beginTransaction(); 42 DB::beginTransaction();
43 try { 43 try {
44 - parent::save($param); 44 + $res = parent::save($param);
  45 + $param['id'] = $res['id'];
45 $this->savePayment($param); 46 $this->savePayment($param);
46 $this->saveDeployBuild($param); 47 $this->saveDeployBuild($param);
47 $this->saveDeployOptimize($param); 48 $this->saveDeployOptimize($param);
@@ -112,7 +112,7 @@ class Logic @@ -112,7 +112,7 @@ class Logic
112 if (!$info) { 112 if (!$info) {
113 $info = $this->model->with($this->with)->find($id); 113 $info = $this->model->with($this->with)->find($id);
114 if($info){ 114 if($info){
115 - Cache::put($this->getInfoCacheKey($id), $info); 115 + Cache::put($this->getInfoCacheKey($id), $info, 24 * 3600);
116 } 116 }
117 } 117 }
118 }else{ 118 }else{
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 namespace App\Services; 9 namespace App\Services;
10 10
11 -use App\Models\Project; 11 +use App\Models\Project\Project;
12 use Illuminate\Support\Facades\DB; 12 use Illuminate\Support\Facades\DB;
13 use Illuminate\Support\Facades\Schema; 13 use Illuminate\Support\Facades\Schema;
14 14