作者 lyh

gx

@@ -48,6 +48,7 @@ use App\Models\User\ProjectRole; @@ -48,6 +48,7 @@ use App\Models\User\ProjectRole;
48 use App\Models\User\User as UserModel; 48 use App\Models\User\User as UserModel;
49 use App\Models\WebSetting\WebLanguage; 49 use App\Models\WebSetting\WebLanguage;
50 use App\Services\AiBlogService; 50 use App\Services\AiBlogService;
  51 +use App\Services\DingService;
51 use App\Services\ProjectServer; 52 use App\Services\ProjectServer;
52 use App\Services\SyncService; 53 use App\Services\SyncService;
53 use App\Utils\LogUtils; 54 use App\Utils\LogUtils;
@@ -157,6 +158,7 @@ class ProjectLogic extends BaseLogic @@ -157,6 +158,7 @@ class ProjectLogic extends BaseLogic
157 * @param :1->建站中 2->优化中 3->建站完成 6-》错误单 158 * @param :1->建站中 2->优化中 3->建站完成 6-》错误单
158 */ 159 */
159 public function projectSave(){ 160 public function projectSave(){
  161 + $this->checkAiBlog($this->param['main_lang_id'],$this->param['is_ai_blog'],$this->param['company'],$this->param['deploy_optimize']['company_en_name'],$this->param['deploy_optimize']['company_en_description']);
160 DB::beginTransaction(); 162 DB::beginTransaction();
161 try { 163 try {
162 if($this->param['type'] == Project::TYPE_SEVEN){ 164 if($this->param['type'] == Project::TYPE_SEVEN){
@@ -197,6 +199,22 @@ class ProjectLogic extends BaseLogic @@ -197,6 +199,22 @@ class ProjectLogic extends BaseLogic
197 } 199 }
198 200
199 /** 201 /**
  202 + * @remark :开启白帽验证产数
  203 + * @name :checkAiBlog
  204 + * @author :lyh
  205 + * @method :post
  206 + * @time :2025/3/21 17:32
  207 + */
  208 + public function checkAiBlog($main_lang_id,$is_ai_blog,$company,$company_en_name,$company_en_description){
  209 + if($is_ai_blog == 1){
  210 + if(empty($main_lang_id) || empty($company) || empty($company_en_name) || empty($company_en_description)){
  211 + $this->fail('开启ai_blog--请填写主语种+公司名称+公司英文名称+公司英文介绍');
  212 + }
  213 + }
  214 + return true;
  215 + }
  216 +
  217 + /**
200 * @remark :开启AI博客后 218 * @remark :开启AI博客后
201 * @name :setAiBlog 219 * @name :setAiBlog
202 * @author :lyh 220 * @author :lyh