作者 赵彬吉
@@ -260,7 +260,13 @@ class FetchTicketProjects extends Command @@ -260,7 +260,13 @@ class FetchTicketProjects extends Command
260 $seom_id = 0; 260 $seom_id = 0;
261 // 第一负责人 261 // 第一负责人
262 $engineer_id = $assm_id; 262 $engineer_id = $assm_id;
263 - $is_del = 0; 263 + if ($project_cate == 3)
  264 + $is_del = !empty($item["go_online"]);
  265 + else{
  266 + // 域途,以服务时间为准 $item['yutu_service_start_time'] 是开始时间 + 有效天数 yutu_planday
  267 + $is_del = !empty($item['yutu_service_start_time']) && !empty($item['yutu_planday'])
  268 + && (strtotime($item['yutu_service_start_time']) + $item['yutu_planday'] * 86400) < time();
  269 + }
264 270
265 $fields = [ 271 $fields = [
266 'company_name' => $item['company'], 272 'company_name' => $item['company'],
@@ -6,6 +6,7 @@ use App\Enums\Common\Code; @@ -6,6 +6,7 @@ use App\Enums\Common\Code;
6 use App\Http\Controllers\Aside\BaseController; 6 use App\Http\Controllers\Aside\BaseController;
7 use App\Http\Logic\Aside\Domain\DomainInfoLogic; 7 use App\Http\Logic\Aside\Domain\DomainInfoLogic;
8 use App\Http\Requests\Aside\Domain\DomainInfoRequest; 8 use App\Http\Requests\Aside\Domain\DomainInfoRequest;
  9 +use App\Models\Devops\ServersIp;
9 use App\Models\Domain\CountryCode; 10 use App\Models\Domain\CountryCode;
10 use App\Models\Domain\DomainInfo; 11 use App\Models\Domain\DomainInfo;
11 use App\Models\Project\Project; 12 use App\Models\Project\Project;
@@ -34,17 +35,24 @@ class DomainInfoController extends BaseController @@ -34,17 +35,24 @@ class DomainInfoController extends BaseController
34 $lists = $domainModel->lists($this->map,$this->page,$this->row,$this->order); 35 $lists = $domainModel->lists($this->map,$this->page,$this->row,$this->order);
35 if(!empty($lists)){ 36 if(!empty($lists)){
36 $project_model = new Project(); 37 $project_model = new Project();
  38 + $serverIpModel = new ServersIp();
37 foreach ($lists['list'] as $k=>$v){ 39 foreach ($lists['list'] as $k=>$v){
38 - $company = '';  
39 - $pro_info = $project_model->read(['id'=>$v['project_id']],'company');  
40 - if($pro_info){  
41 - $company = $pro_info['company']; 40 + $v['company'] = '';
  41 + $v['ip_domain'] = [];
  42 + $pro_info = $project_model->read(['id'=>$v['project_id']],['company','serve_id']);
  43 + if($pro_info !== false){
  44 + $v['company'] = $pro_info['company'];
  45 + if(!empty($pro_info['serve_id'])){
  46 + $serveInfo = $serverIpModel->read(['id'=>$pro_info['serve_id']],['domain','ip']);
  47 + $v['ip_domain'] = $serveInfo;
  48 + }
42 } 49 }
43 - $lists['list'][$k]['company'] = $company; 50 + $lists['list'][$k] = $v;
44 } 51 }
45 } 52 }
46 - $lists['y_status'] = $domainModel->counts(['status'=>1]);  
47 - $lists['n_status'] = $domainModel->counts(['status'=>0]); 53 + $lists['total_count'] = $domainModel->counts();
  54 + $lists['y_count'] = $domainModel->counts(['status'=>1]);
  55 + $lists['n_count'] = $domainModel->counts(['status'=>0]);
48 return $this->response('success', Code::SUCCESS, $lists); 56 return $this->response('success', Code::SUCCESS, $lists);
49 } 57 }
50 58
@@ -162,7 +162,7 @@ class Base extends Model @@ -162,7 +162,7 @@ class Base extends Model
162 * @method :post 162 * @method :post
163 * @time :2024/9/26 10:52 163 * @time :2024/9/26 10:52
164 */ 164 */
165 - public function counts($condition){ 165 + public function counts($condition = []){
166 $condition = $this->filterRequestData($condition); 166 $condition = $this->filterRequestData($condition);
167 return $this->formatQuery($condition)->count(); 167 return $this->formatQuery($condition)->count();
168 } 168 }