|
@@ -42,9 +42,13 @@ class push_helper
|
|
|
$push_param['extra']['image'] = $to_info->avatar();
|
|
|
|
|
|
QueueClient::push('upushSendMsg',$push_param);
|
|
|
+
|
|
|
+ $from = ['nickname' => $to_info->nickname(),'avatar' => $to_info->avatar(),'userid' => $to_info->member_id()];
|
|
|
+ $content = ['type' => 'stolen_bonus','from' => $from,'amount' => $amount,'txt' => "{偷走了您{$amount}元的红包}"];
|
|
|
+ room\factory_client::instance()->notice_users([$from_info->member_id()],room\proto_type::push_notify,$content,$text);
|
|
|
}
|
|
|
|
|
|
- public static function fly_bonus(member_info $from_info,member_info $to_info,$amount)
|
|
|
+ public static function fly_bonus(member_info $from_info,member_info $to_info,$amount,$type_sn)
|
|
|
{
|
|
|
$name = $from_info->nickname();
|
|
|
$text = "{$name}的{$amount}元的红包,在向您飞来~.";
|
|
@@ -61,6 +65,11 @@ class push_helper
|
|
|
$push_param['extra']['image'] = $from_info->avatar();
|
|
|
|
|
|
QueueClient::push('upushSendMsg',$push_param);
|
|
|
+
|
|
|
+ $from = ['nickname' => $from_info->nickname(),'avatar' => $from_info->avatar(),'userid' => $from_info->member_id()];
|
|
|
+ $shema = schema_helper::bonus_detail($type_sn);
|
|
|
+ $content = ['type' => 'fly_bonus','from' => $from,'amount' => $amount,'schema' => $shema,'txt' => "{$name}摇飞了{$amount}元红包,到你账户."];
|
|
|
+ room\factory_client::instance()->notice_users([$to_info->member_id()],room\proto_type::push_notify,$content,$text);
|
|
|
}
|
|
|
|
|
|
public static function order_refund_bonus($member_id,$amount)
|
|
@@ -82,14 +91,15 @@ class push_helper
|
|
|
QueueClient::push('upushSendMsg',$push_param);
|
|
|
}
|
|
|
|
|
|
- public static function send_bonus($member_id,$to_ids)
|
|
|
+ public static function send_bonus($member_id,$to_ids,$type_sn)
|
|
|
{
|
|
|
$sender = new member_info($member_id);
|
|
|
$name = $sender->nickname();
|
|
|
+ $text = "新的红包:您的好友{$name}给您发了一个红包,请查收.";
|
|
|
+
|
|
|
foreach ($to_ids as $member_id)
|
|
|
{
|
|
|
$push_param = [];
|
|
|
- $text = "新的红包:您的好友{$name}给您发了一个红包,请查收.";
|
|
|
|
|
|
$push_param['alias'] = $member_id;
|
|
|
$push_param['title'] = "新到红包";
|
|
@@ -104,8 +114,14 @@ class push_helper
|
|
|
|
|
|
QueueClient::push('upushSendMsg',$push_param);
|
|
|
}
|
|
|
+
|
|
|
+ $from = ['nickname' => $sender->nickname(),'avatar' => $sender->avatar(),'userid' => $sender->member_id()];
|
|
|
+ $shema = schema_helper::bonus_detail($type_sn);
|
|
|
+ $content = ['type' => 'receive_bonus','from' => $from,'schema' => $shema,'txt' => "给您发了一个红包"];
|
|
|
+ room\factory_client::instance()->notice_users($to_ids,room\proto_type::push_notify,$content,$text);
|
|
|
}
|
|
|
- public static function bonus_refund($member_id,$amount)
|
|
|
+
|
|
|
+ public static function bonus_refund($member_id,$amount,$type_sn)
|
|
|
{
|
|
|
$sender = new member_info($member_id);
|
|
|
$text = "红包退还通知:您发送的红包已超过24小时,退还未被领取的金额{$amount}元,您可以重新发送并通知小伙伴及时领取.";
|
|
@@ -122,6 +138,11 @@ class push_helper
|
|
|
$push_param['extra']['image'] = $sender->avatar();
|
|
|
|
|
|
QueueClient::push('upushSendMsg',$push_param);
|
|
|
+
|
|
|
+ $from = ['nickname' => $sender->nickname(),'avatar' => $sender->avatar(),'userid' => $sender->member_id()];
|
|
|
+ $shema = schema_helper::bonus_detail($type_sn);
|
|
|
+ $content = ['type' => 'bonus_refund','from' => $from,'schema' => $shema,'txt' => "红包过期退款¥{$amount}"];
|
|
|
+ room\factory_client::instance()->notice_users([$member_id],room\proto_type::push_notify,$content,$text);
|
|
|
}
|
|
|
|
|
|
public static function invite_bonus($member_id,$money)
|
|
@@ -141,6 +162,11 @@ class push_helper
|
|
|
$push_param['extra']['image'] = $minfo->avatar();
|
|
|
|
|
|
QueueClient::push('upushSendMsg',$push_param);
|
|
|
+
|
|
|
+// $from = ['nickname' => $minfo->nickname(),'avatar' => $minfo->avatar(),'userid' => $minfo->member_id()];
|
|
|
+// $shema = schema_helper::bonus_detail($type_sn);
|
|
|
+// $content = ['type' => 'bonus_refund','from' => $from,'schema' => $shema,'txt' => "红包过期退款¥{$amount}"];
|
|
|
+// room\factory_client::instance()->notice_users([$member_id],room\proto_type::push_notify,$content,$text);
|
|
|
}
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
@@ -795,7 +821,7 @@ class push_helper
|
|
|
}
|
|
|
$param['text'] = $text;
|
|
|
|
|
|
- $param['extra']['go_type'] = 'fcode';
|
|
|
+ $param['extra']['go_type'] = 'fcode';
|
|
|
$param['extra']['title']= "用户评价";
|
|
|
$param['extra']['text'] = $text;
|
|
|
$param['extra']['show_type'] = 'pop';
|