作者 lyh

gx

... ... @@ -3,7 +3,6 @@
namespace App\Http\Logic\Aside\Project;
use App\Enums\Common\Code;
use App\Helper\Arr;
use App\Helper\Common;
use App\Helper\FormGlobalsoApi;
... ... @@ -14,11 +13,9 @@ use App\Models\Blog\Blog;
use App\Models\Channel\Channel;
use App\Models\Channel\User;
use App\Models\Channel\Zone;
use App\Models\Devops\ServerConfig;
use App\Models\Domain\DomainInfo;
use App\Models\Inquiry\InquirySet;
use App\Models\Manage\Manage;
use App\Models\News\News;
use App\Models\Project\After;
use App\Models\Project\DeployBuild;
use App\Models\Project\DeployOptimize;
... ... @@ -26,9 +23,8 @@ use App\Models\Project\Payment;
use App\Models\Project\Project;
use App\Models\Task\Task;
use App\Services\ProjectServer;
use App\Utils\EncryptUtils;
use Hashids\Hashids;
use Illuminate\Support\Facades\Cache;
use App\Models\User\User as UserModel;
use Illuminate\Support\Facades\DB;
/**
... ... @@ -150,6 +146,16 @@ class ProjectLogic extends BaseLogic
$this->saveDeployBuild($param);
$this->saveDeployOptimize($param);
$this->saveAfter($param);
//创建默认数据库
if($param['type'] == Project::TYPE_ONE){
if(isset($data['mysql_id']) && !empty($data['mysql_id'])){
$this->initializationMysql($res['id']);
}
if(isset($data['mobile'])){
}
}
//更改服务器状态
if(isset($param['serve_id']) && !empty($param['serve_id'])){
$this->updateServe($param['serve_id']);
}
... ... @@ -190,6 +196,25 @@ class ProjectLogic extends BaseLogic
$domainModel->edit(['status'=>$domainModel::STATUS_ONE],['id'=>$serve_id]);
return $this->success();
}
/**
* @remark :创建用户
* @name :createUser
* @author :lyh
* @method :post
* @time :2023/8/28 18:03
*/
public function createUser($mobile,$project_id,$lead_name){
$userModel = new UserModel();
$data = [
'mobile'=>$mobile,
'password'=>base64_encode(md5('123456')),
'project_id'=>$project_id,
'name'=>$lead_name
];
return $userModel->add($data);
}
/**
* @remark :验证域名
* @name :verifyDomain
... ... @@ -384,10 +409,6 @@ class ProjectLogic extends BaseLogic
$this->saveDeployBuild($data);
$this->saveDeployOptimize($data);
$this->saveAfter($data);
//创建默认数据库
if(isset($data['mysql_id']) && !empty($data['mysql_id'])){
$this->initializationMysql($res['id']);
}
DB::commit();
}catch (\Exception $e){
DB::rollBack();
... ...