|
@@ -102,27 +102,6 @@ class push_helper
|
|
|
QueueClient::push('upushSendMsg',$push_param);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- public static function appreciate_bonus($member_id,$to_id)
|
|
|
- {
|
|
|
- $sender = new member_info($member_id);
|
|
|
- $name = $sender->nickname();
|
|
|
- $text = "您的好友{$name}给您文章打赏一个红包,快去查看吧.";
|
|
|
-
|
|
|
- $push_param['alias'] = $to_id;
|
|
|
- $push_param['title'] = "文章打赏";
|
|
|
- $push_param['text'] = $text;
|
|
|
-
|
|
|
- $push_param['extra']['go_type'] = 'bonus';
|
|
|
- $push_param['extra']['title'] = "文章打赏";
|
|
|
- $push_param['extra']['text'] = $text;
|
|
|
- $push_param['extra']['show_type'] = 'pop';
|
|
|
- $push_param['extra']['url'] = 'xmmz://p.lrlz.com/main/index?index=2';
|
|
|
- $push_param['extra']['image'] = $sender->avatar();
|
|
|
-
|
|
|
- QueueClient::push('upushSendMsg',$push_param);
|
|
|
- }
|
|
|
-
|
|
|
public static function bonus_refund($member_id,$amount)
|
|
|
{
|
|
|
$sender = new member_info($member_id);
|
|
@@ -502,6 +481,130 @@ class push_helper
|
|
|
|
|
|
QueueClient::push('upushSendMsg',$push_param);
|
|
|
}
|
|
|
+
|
|
|
+ public static function nofity_ugc_pub($follow,$author_id,$special_id,$title)
|
|
|
+ {
|
|
|
+ $author = new member_info($author_id);
|
|
|
+ $text = "您的好友{$author->nickname()} 发表文章《{$title}》";
|
|
|
+
|
|
|
+ $push_param['alias'] = $follow;
|
|
|
+ $push_param['title'] = "好友发表文章";
|
|
|
+ $push_param['text'] = $text;
|
|
|
+
|
|
|
+ $push_param['extra']['go_type'] = 'bonus';
|
|
|
+ $push_param['extra']['title'] = "好友发表文章";
|
|
|
+ $push_param['extra']['text'] = $text;
|
|
|
+ $push_param['extra']['show_type']= 'pop';
|
|
|
+
|
|
|
+ $push_param['extra']['url'] = schema_helper::ugc($title,$special_id);
|
|
|
+ $push_param['extra']['image'] = $author->avatar();
|
|
|
+
|
|
|
+ QueueClient::push('upushSendMsg',$push_param);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static function nofity_ugc_submit($author,$reader,$special_id,$title)
|
|
|
+ {
|
|
|
+ $user = new member_info($reader);
|
|
|
+ $text = "您的好友{$user->nickname()} 阅读了您的文章《{$title}》";
|
|
|
+
|
|
|
+ $push_param['alias'] = $author;
|
|
|
+ $push_param['title'] = "好友阅读文章";
|
|
|
+ $push_param['text'] = $text;
|
|
|
+
|
|
|
+ $push_param['extra']['go_type'] = 'bonus';
|
|
|
+ $push_param['extra']['title'] = "好友阅读文章";
|
|
|
+ $push_param['extra']['text'] = $text;
|
|
|
+ $push_param['extra']['show_type']= 'pop';
|
|
|
+
|
|
|
+ $push_param['extra']['url'] = schema_helper::ugc($title,$special_id);
|
|
|
+ $push_param['extra']['image'] = $user->avatar();
|
|
|
+
|
|
|
+ QueueClient::push('upushSendMsg',$push_param);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static function nofity_ugc_comment($author,$commender,$fcomment,$special_id,$content,$article_title)
|
|
|
+ {
|
|
|
+ $commender = new member_info($commender);
|
|
|
+ if($fcomment) {
|
|
|
+ $title = '收到留言回复';
|
|
|
+ $text = "您的好友{$commender->nickname()} 回复您的评论:{$content}";
|
|
|
+ } else {
|
|
|
+ $title = '收到文章评论';
|
|
|
+ $text = "您的文章《{$article_title}》收到一个新评论";
|
|
|
+ }
|
|
|
+
|
|
|
+ $push_param['alias'] = $author;
|
|
|
+ $push_param['title'] = $title;
|
|
|
+ $push_param['text'] = $text;
|
|
|
+
|
|
|
+ $push_param['extra']['go_type'] = '';
|
|
|
+ $push_param['extra']['title']= $title;
|
|
|
+ $push_param['extra']['text'] = $text;
|
|
|
+ $push_param['extra']['show_type'] = 'pop';
|
|
|
+ $push_param['extra']['url'] = schema_helper::ugc($article_title,$special_id);
|
|
|
+ $push_param['extra']['image'] = $commender->avatar();
|
|
|
+
|
|
|
+ QueueClient::push('upushSendMsg',$push_param);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static function nofity_ugc_support($author,$commender,$fcomment,$special_id,$content,$article_title)
|
|
|
+ {
|
|
|
+ if($commender > 0)
|
|
|
+ {
|
|
|
+ $commender = new member_info($commender);
|
|
|
+
|
|
|
+ if($fcomment) {
|
|
|
+ $text = "{$commender->nickname()} 点赞您的评论:{$content}";
|
|
|
+ } else {
|
|
|
+ $text = "{$commender->nickname()} 点赞您的文章《{$article_title}》";
|
|
|
+ }
|
|
|
+ $push_param['extra']['image'] = $commender->avatar();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if($fcomment) {
|
|
|
+ $text = "刚刚有人点赞您的评论:{$content}";
|
|
|
+ } else {
|
|
|
+ $text = "刚刚有人点赞您的文章《{$article_title}》";
|
|
|
+ }
|
|
|
+ $push_param['extra']['image'] = "";
|
|
|
+ }
|
|
|
+
|
|
|
+ $push_param['alias'] = $author;
|
|
|
+ $push_param['title'] = '收到点赞';
|
|
|
+ $push_param['text'] = $text;
|
|
|
+
|
|
|
+ $push_param['extra']['go_type'] = '';
|
|
|
+ $push_param['extra']['title']= '收到点赞';
|
|
|
+ $push_param['extra']['text'] = $text;
|
|
|
+ $push_param['extra']['show_type'] = 'pop';
|
|
|
+ $push_param['extra']['url'] = schema_helper::ugc($article_title,$special_id);
|
|
|
+
|
|
|
+ QueueClient::push('upushSendMsg',$push_param);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static function nofity_ugc_appreciate($author,$user,$special_id,$article,$rate,$amount)
|
|
|
+ {
|
|
|
+ $user_info = new member_info($user);
|
|
|
+
|
|
|
+ $name = $user_info->nickname();
|
|
|
+ $desc = self::money_rate_desc($amount,$rate);
|
|
|
+ $text = "{$name}打赏您的文章《{$article}》{$desc}红包,快去查看吧.";
|
|
|
+
|
|
|
+ $push_param['alias'] = $author;
|
|
|
+ $push_param['title'] = "文章打赏";
|
|
|
+ $push_param['text'] = $text;
|
|
|
+
|
|
|
+ $push_param['extra']['go_type'] = 'bonus';
|
|
|
+ $push_param['extra']['title'] = "文章打赏";
|
|
|
+ $push_param['extra']['text'] = $text;
|
|
|
+ $push_param['extra']['show_type'] = 'pop';
|
|
|
+ $push_param['extra']['url'] = schema_helper::ugc($article,$special_id);
|
|
|
+ $push_param['extra']['image'] = $user_info->avatar();
|
|
|
+
|
|
|
+ QueueClient::push('upushSendMsg',$push_param);
|
|
|
+ }
|
|
|
+
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
public static function fcode_unlock($member_id,$num)
|
|
@@ -595,23 +698,6 @@ class push_helper
|
|
|
|
|
|
QueueClient::push('upushSendMsg',$push_param);
|
|
|
}
|
|
|
- public static function comment($member_id,$special_id,$content)
|
|
|
- {
|
|
|
- $minfo = new member_info($member_id);
|
|
|
-
|
|
|
- $push_param['alias'] = $member_id;
|
|
|
- $push_param['title'] = "用户评价";
|
|
|
- $push_param['text'] = $content;
|
|
|
-
|
|
|
- $push_param['extra']['go_type'] = '';
|
|
|
- $push_param['extra']['title']= "用户评价";
|
|
|
- $push_param['extra']['text'] = $content;
|
|
|
- $push_param['extra']['show_type'] = 'pop';
|
|
|
- $push_param['extra']['image'] = $minfo->avatar();
|
|
|
-
|
|
|
- QueueClient::push('upushSendMsg',$push_param);
|
|
|
- }
|
|
|
-
|
|
|
public static function format_msg($member_id,$content)
|
|
|
{
|
|
|
$param['alias'] = $member_id;
|
|
@@ -690,7 +776,7 @@ class push_helper
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-class push_message
|
|
|
+class push_event
|
|
|
{
|
|
|
static public function publish_special($member_ids,$ispub,$count)
|
|
|
{
|