作者 lyh

gx复制项目

@@ -68,6 +68,7 @@ class AfterDayCount extends Command @@ -68,6 +68,7 @@ class AfterDayCount extends Command
68 $idArr = $this->managerHrModel->selectField(['name'=>['in',$valM]],'id'); 68 $idArr = $this->managerHrModel->selectField(['name'=>['in',$valM]],'id');
69 $project_count = $projectModel->where('gl_project.extend_type',0) 69 $project_count = $projectModel->where('gl_project.extend_type',0)
70 ->where('gl_project.delete_status',0) 70 ->where('gl_project.delete_status',0)
  71 + ->where('gl_project.old_project_id',0)
71 ->where('gl_project.created_at','<=',$todayMidnight) 72 ->where('gl_project.created_at','<=',$todayMidnight)
72 ->whereIn('gl_project_deploy_optimize.optimist_mid',$idArr) 73 ->whereIn('gl_project_deploy_optimize.optimist_mid',$idArr)
73 ->whereIn('gl_project.type',[2,4]) 74 ->whereIn('gl_project.type',[2,4])
@@ -77,6 +78,7 @@ class AfterDayCount extends Command @@ -77,6 +78,7 @@ class AfterDayCount extends Command
77 ->count(); 78 ->count();
78 $qualified_count = $projectModel->where('gl_project.extend_type',0) 79 $qualified_count = $projectModel->where('gl_project.extend_type',0)
79 ->where('gl_project.delete_status',0) 80 ->where('gl_project.delete_status',0)
  81 + ->where('gl_project.old_project_id',0)
80 ->where('gl_project.created_at','<=',$todayMidnight) 82 ->where('gl_project.created_at','<=',$todayMidnight)
81 ->where('gl_project.is_remain_today',1) 83 ->where('gl_project.is_remain_today',1)
82 ->where('gl_project_deploy_build.plan','!=',0) 84 ->where('gl_project_deploy_build.plan','!=',0)
@@ -91,6 +93,7 @@ class AfterDayCount extends Command @@ -91,6 +93,7 @@ class AfterDayCount extends Command
91 $threeMonthsAgo = date('Y-m-d 00:00:00', strtotime('-3 months')); 93 $threeMonthsAgo = date('Y-m-d 00:00:00', strtotime('-3 months'));
92 $three_project_count = $projectModel->where('gl_project.extend_type',0) 94 $three_project_count = $projectModel->where('gl_project.extend_type',0)
93 ->where('gl_project.delete_status',0) 95 ->where('gl_project.delete_status',0)
  96 + ->where('gl_project.old_project_id',0)
94 ->where('gl_project.created_at','<=',$threeMonthsAgo) 97 ->where('gl_project.created_at','<=',$threeMonthsAgo)
95 ->whereIn('gl_project_deploy_optimize.optimist_mid',$idArr) 98 ->whereIn('gl_project_deploy_optimize.optimist_mid',$idArr)
96 ->whereIn('gl_project.type',[2,4]) 99 ->whereIn('gl_project.type',[2,4])
@@ -101,6 +104,7 @@ class AfterDayCount extends Command @@ -101,6 +104,7 @@ class AfterDayCount extends Command
101 $three_qualified_count = $projectModel->where('gl_project.extend_type',0) 104 $three_qualified_count = $projectModel->where('gl_project.extend_type',0)
102 ->whereIn('gl_project.id',$projectIdArr) 105 ->whereIn('gl_project.id',$projectIdArr)
103 ->where('gl_project.delete_status',0) 106 ->where('gl_project.delete_status',0)
  107 + ->where('gl_project.old_project_id',0)
104 ->where('gl_project.created_at','<=',$threeMonthsAgo) 108 ->where('gl_project.created_at','<=',$threeMonthsAgo)
105 ->whereIn('gl_project_deploy_optimize.optimist_mid',$idArr) 109 ->whereIn('gl_project_deploy_optimize.optimist_mid',$idArr)
106 ->whereIn('gl_project.type',[2,4]) 110 ->whereIn('gl_project.type',[2,4])
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :AiVideoService.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2025/4/29 17:39
  8 + */
  9 +
  10 +namespace App\Services;
  11 +
  12 +use App\Helper\Translate;
  13 +use App\Models\Project\ProjectAiSetting;
  14 +
  15 +class AiVideoService
  16 +{
  17 + public $url = 'https://ai-extend.ai.cc/';
  18 +
  19 + public $mch_id = 1;//默认配置
  20 + public $sign = '';//签名
  21 + public $key = 'b3e4c722b821';//默认key
  22 + public $route = '';//回调地址
  23 + public $task_id = '';//任务id
  24 + public $author_id = '';//作者id
  25 +
  26 + public function __construct($project_id = 0)
  27 + {
  28 + if($project_id){
  29 + $projectAiSettingModel = new ProjectAiSetting();
  30 + $aiSettingInfo = $projectAiSettingModel->read(['project_id'=>$project_id]);
  31 + $this->mch_id = $aiSettingInfo['mch_id'];
  32 + $this->key = $aiSettingInfo['key'];
  33 + }
  34 + }
  35 +
  36 + /**
  37 + * @remark :设置路由
  38 + * @name :setRoute
  39 + * @author :lyh
  40 + * @method :post
  41 + * @time :2025/3/25 9:45
  42 + */
  43 + public function setRoute($keyword)
  44 + {
  45 + $this->route = generateRoute(Translate::tran($keyword, 'en'));
  46 + return $this;
  47 + }
  48 +}