作者 周海龙

合并分支 'zhl' 到 'master'

询盘消息推送时间调整到8点



查看合并请求 !2313
... ... @@ -66,7 +66,7 @@ class MessagePush extends Base
//9-21 点,每条消息及时通知
//21-第二天 9 点,整合一起通知
$hour = date('H', strtotime($submit_at));
if(($hour >= 9 && $hour < 21) || in_array($project_id, $special_project_ids)) {
if(($hour >= 8 && $hour < 21) || in_array($project_id, $special_project_ids)) {
$model = new self();
$model->project_id = $project_id;
$model->friend_id = $friend_id;
... ... @@ -76,7 +76,7 @@ class MessagePush extends Base
$model->send_time = $submit_at;
}else{
//定时发送时间
$send_time = $hour >= 9 ? date('Y-m-d 09:00:00', strtotime($submit_at . '+1 day')) : date('Y-m-d 09:00:00', strtotime($submit_at));
$send_time = $hour >= 8 ? date('Y-m-d 08:00:00', strtotime($submit_at . '+1 day')) : date('Y-m-d 08:00:00', strtotime($submit_at));
$model = self::where('project_id', $project_id)->where('type', self::TYPE_INQUIRY)->where('send_time', $send_time)->first();
if(!$model){
$model = new self();
... ... @@ -86,7 +86,7 @@ class MessagePush extends Base
$model->ref_ids = $id;
$model->countries = $country;
$model->send_time = $send_time;
$model->content = '[09:00] 您的全球搜网站收到来自【' . $country . $name . '】的询盘信息,请登录后台或APP进行查看!';
$model->content = '[08:00] 您的全球搜网站收到来自【' . $country . $name . '】的询盘信息,请登录后台或APP进行查看!';
}else{
$ref_ids = explode(',', $model->ref_ids);
$ref_ids[] = $id;
... ... @@ -105,7 +105,7 @@ class MessagePush extends Base
$country = implode(',', $countries);
}
}
$model->content = '[09:00] 您的全球搜网站收到来自【' . $country . '】'.$count.'条询盘信息,请登录后台或APP进行查看!';
$model->content = '[08:00] 您的全球搜网站收到来自【' . $country . '】'.$count.'条询盘信息,请登录后台或APP进行查看!';
}
}
$model->save();
... ...