|
@@ -33,7 +33,15 @@ class MessagePush extends Base |
|
@@ -33,7 +33,15 @@ class MessagePush extends Base |
|
33
|
protected $table = 'gl_workchat_message_push';
|
33
|
protected $table = 'gl_workchat_message_push';
|
|
34
|
|
34
|
|
|
35
|
|
35
|
|
|
36
|
- public static function addInquiryMessage($id, $project_id, $country, $submit_at){
|
36
|
+ /**
|
|
|
|
37
|
+ * @param $id
|
|
|
|
38
|
+ * @param $project_id
|
|
|
|
39
|
+ * @param $country
|
|
|
|
40
|
+ * @param $name
|
|
|
|
41
|
+ * @param $submit_at
|
|
|
|
42
|
+ * @return bool
|
|
|
|
43
|
+ */
|
|
|
|
44
|
+ public static function addInquiryMessage($id, $project_id, $country, $name, $submit_at){
|
|
37
|
if(!ProjectServer::useProject($project_id)){
|
45
|
if(!ProjectServer::useProject($project_id)){
|
|
38
|
return false;
|
46
|
return false;
|
|
39
|
}
|
47
|
}
|
|
@@ -56,7 +64,7 @@ class MessagePush extends Base |
|
@@ -56,7 +64,7 @@ class MessagePush extends Base |
|
56
|
$model->friend_id = $friend_id;
|
64
|
$model->friend_id = $friend_id;
|
|
57
|
$model->type = self::TYPE_INQUIRY;
|
65
|
$model->type = self::TYPE_INQUIRY;
|
|
58
|
$model->ref_ids = $id;
|
66
|
$model->ref_ids = $id;
|
|
59
|
- $model->content = '[' . date('H:i', strtotime($submit_at)) . '] 您的全球搜网站收到来自【' . $country . '】的询盘信息,请登录后台或APP进行查看!';
|
67
|
+ $model->content = '[' . date('H:i', strtotime($submit_at)) . '] 您的全球搜网站收到来自【' . $country . $name . '】的询盘信息,请登录后台或APP进行查看!';
|
|
60
|
}else{
|
68
|
}else{
|
|
61
|
//定时发送时间
|
69
|
//定时发送时间
|
|
62
|
$send_time = $hour >= 9 ? date('Y-m-d 09:00:00', strtotime('+1 day')) : date('Y-m-d 09:00:00');
|
70
|
$send_time = $hour >= 9 ? date('Y-m-d 09:00:00', strtotime('+1 day')) : date('Y-m-d 09:00:00');
|
|
@@ -69,7 +77,7 @@ class MessagePush extends Base |
|
@@ -69,7 +77,7 @@ class MessagePush extends Base |
|
69
|
$model->type = self::TYPE_INQUIRY;
|
77
|
$model->type = self::TYPE_INQUIRY;
|
|
70
|
$model->ref_ids = $id;
|
78
|
$model->ref_ids = $id;
|
|
71
|
$model->send_time = $send_time;
|
79
|
$model->send_time = $send_time;
|
|
72
|
- $model->content = '[09:00] 您的全球搜网站收到来自【' . $country . '】的询盘信息,请登录后台或APP进行查看!';
|
80
|
+ $model->content = '[09:00] 您的全球搜网站收到来自【' . $country . $name . '】的询盘信息,请登录后台或APP进行查看!';
|
|
73
|
}else{
|
81
|
}else{
|
|
74
|
$ref_ids = explode(',', $model->ref_ids);
|
82
|
$ref_ids = explode(',', $model->ref_ids);
|
|
75
|
$ref_ids[] = $id;
|
83
|
$ref_ids[] = $id;
|