作者 赵彬吉
... ... @@ -100,14 +100,14 @@ class DomainInfo extends Command
$v->domain_start_time = $valid_time['start'];
$v->domain_end_time = $valid_time['end'];
$v->save();
}
}
//域名到期提醒
if ($v->domain_end_time && $v->domain_end_time < $end_day) {
$is_end = $v->domain_end_time < date('Y-m-d H:i:s') ? 1 : 0;
if ($valid_time['end'] < $end_day) {
$is_end = $valid_time['end'] < date('Y-m-d H:i:s') ? 1 : 0;
$this->domainChatMessage($v['project_id'], $v['id'], $v['domain'], $is_end);
}
}
}
} else {
//除自建站项目外,记录已解析到别的ip的域名
if (!check_domain_record($v['domain'], $servers_ip_info)) {
... ... @@ -141,14 +141,14 @@ class DomainInfo extends Command
$v->domain_start_time = $valid_time['start'];
$v->domain_end_time = $valid_time['end'];
$v->save();
}
}
//域名到期提醒
if ($v->domain_end_time && $v->domain_end_time < $end_day) {
$is_end = $v->domain_end_time < date('Y-m-d H:i:s') ? 1 : 0;
if ($valid_time['end'] < $end_day) {
$is_end = $valid_time['end'] < date('Y-m-d H:i:s') ? 1 : 0;
$this->domainChatMessage($v['project_id'], $v['id'], $v['domain'], $is_end);
}
}
}
if ($v['amp_status'] == 1) {
$domain_array = parse_url($v['domain']);
... ... @@ -412,15 +412,15 @@ class DomainInfo extends Command
->where('binding_app', ProjectAssociation::ENTERPRISE_WECHAT)
->value('friend_id');
if ($friend_id) {
$tips = $is_end ? ' 已经到期' : ' 即将到期';
$message = '【域名到期提醒】' . PHP_EOL . '域名 ' . $domain . $tips . ',请及时处理。';
$tips = $is_end ? ' 已经到期,请及时处理。' : ' 有效期不足一个月,请留意。';
$message = '【域名到期提醒】' . PHP_EOL . '域名 ' . $domain . $tips;
$param = [
'project_id' => $project_id,
'friend_id' => $friend_id,
'type' => MessagePush::TYPE_DOMAIN,
'content' => $message,
'ref_ids' => $domain_id,
'send_time' => date('Y-m-d H:i:s'),
'send_time' => date('Y-m-d 14:00:00'),
'status' => 0,
];
//写入一条推送消息 自动消费
... ...
... ... @@ -354,7 +354,7 @@ class FetchTicketProjects extends Command
// 第一负责人
$engineer_id = $assm_id;
if ($project_cate == 3)
$is_del = !empty($item["go_online"]);
$is_del = empty($item["go_online"]);
else{
// 域途,以服务时间为准 $item['yutu_service_start_time'] 是开始时间 + 有效天数 yutu_planday
$is_del = !empty($item['yutu_service_start_time']) && !empty($item['yutu_planday'])
... ...
... ... @@ -66,6 +66,20 @@ class AsideTicketController extends BaseController
->orWhere('company_name', 'like', '%' . $search . '%');
});
});
})
// 根据TicketProject的status字段筛选
->when($request->input('project_status') !== null, function ($query) use ($request) {
$projectStatus = $request->input('project_status');
return $query->whereHas('project', function ($q) use ($projectStatus) {
$q->where('status', $projectStatus);
});
})
// 根据TicketProject的project_cate字段筛选
->when($request->input('project_cate') !== null, function ($query) use ($request) {
$projectCate = $request->input('project_cate');
return $query->whereHas('project', function ($q) use ($projectCate) {
$q->where('project_cate', $projectCate);
});
});
//TODO::用户部门搜索
if(isset($this->param['dept_id']) && !empty($this->param['dept_id'])){
... ...
... ... @@ -559,7 +559,7 @@ class ProductController extends BaseController
if(!empty($v['og_image'])){
$v['og_image'] = getImageUrl($v['og_image'] ?? '',$this->user['storage_type'],$this->user['project_location']);
}else{
$v['og_image'] = $v['thumb']['url'] ?? '';
$v['og_image'] = '';
}
if(!empty($v['icon'])){
foreach ($v['icon'] as $icon_k => $icon_v){
... ...
... ... @@ -33,6 +33,8 @@ class AsideTicketListRequest extends FormRequest
'size' => 'nullable|integer',
'sort_field' => 'nullable|in:created_at,plan_end_at',
'sort_order' => 'nullable|in:asc,desc',
'project_status' => 'nullable|in:1,2,3|integer',
'project_cate' => 'nullable|in:1,2,3,4|integer',
];
}
}
... ...
... ... @@ -770,7 +770,6 @@ Route::group([], function () {
});
Route::any('/login', [\App\Http\Controllers\Bside\LoginController::class, 'login'])->name('login');
Route::any('/projectLogin', [\App\Http\Controllers\Bside\LoginController::class, 'projectLogin'])->name('projectLogin');
Route::any('/ceshi', [\App\Http\Controllers\Bside\TestController::class, 'ceshi'])->name('ceshi');
Route::any('/file_manager_downLoad', [\App\Http\Controllers\Bside\FileManage\FileManageController::class, 'downLoad'])->name('file_manager_downLoad');
Route::any('/stringTranslation', [\App\Http\Controllers\Bside\LoginController::class, 'stringTranslation'])->name('stringTranslation');
Route::any('/sendLoginSms', [\App\Http\Controllers\Bside\LoginController::class, 'sendLoginSms'])->name('sendLoginSms');
... ...