stanley-king 6 лет назад
Родитель
Сommit
c6b96c4aeb
2 измененных файлов с 10 добавлено и 10 удалено
  1. 1 1
      helper/account_helper.php
  2. 9 9
      helper/push_helper.php

+ 1 - 1
helper/account_helper.php

@@ -56,7 +56,7 @@ class account_helper
         $ret = bonus_helper::make_bonus($param, $param['rate_money']);
         if ($ret != false) {
             $type_sn = $ret['type_sn'];
-            push_helper::invite_bonus($relay_id,$to_minfo,$amount);
+            push_helper::invite_bonus($relay_id,$param['rate_money']['amount'],$type_sn);
 
             return $type_sn;
         } else {

+ 9 - 9
helper/push_helper.php

@@ -44,7 +44,7 @@ class push_helper
         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}元的红包}"];
+        $content = ['type' => 'stolen_bonus','from' => $from,'amount' => $amount,'note' => "{偷走了您{$amount}元的红包}"];
         room\factory_client::instance()->notice_users([$from_info->member_id()],room\proto_type::push_notify,$content,$text);
     }
 
@@ -68,7 +68,7 @@ class push_helper
 
         $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}元红包,到你账户."];
+        $content = ['type' => 'fly_bonus','from' => $from,'amount' => $amount,'schema' => $shema,'note' => "{$name}摇飞了{$amount}元红包,到你账户."];
         room\factory_client::instance()->notice_users([$to_info->member_id()],room\proto_type::push_notify,$content,$text);
     }
 
@@ -117,7 +117,7 @@ class push_helper
 
         $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' => "给您发了一个红包"];
+        $content = ['type' => 'receive_bonus','from' => $from,'schema' => $shema,'note' => "给您发了一个红包"];
         room\factory_client::instance()->notice_users($to_ids,room\proto_type::push_notify,$content,$text);
     }
 
@@ -141,11 +141,11 @@ class push_helper
 
         $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}"];
+        $content = ['type' => 'bonus_refund','from' => $from,'schema' => $shema,'note' => "红包过期退款¥{$amount}"];
         room\factory_client::instance()->notice_users([$member_id],room\proto_type::push_notify,$content,$text);
     }
 
-    public static function invite_bonus($member_id,$money)
+    public static function invite_bonus($member_id,$money,$type_sn)
     {
         $minfo = new member_info($member_id);
         $text = "好东西就要与好盆友一起分享,感谢您的热情推荐,特奖励您{$money}元的友情红包,请查收~.";
@@ -163,10 +163,10 @@ class push_helper
 
         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);
+        $from = ['nickname' => $minfo->nickname(),'avatar' => $minfo->avatar(),'userid' => $minfo->member_id()];
+        $shema = schema_helper::bonus_detail($type_sn);
+        $content = ['type' => 'invite_bonus','from' => $from,'schema' => $shema,'note' => "收到邀请奖励¥{$money}"];
+        room\factory_client::instance()->notice_users([$member_id],room\proto_type::push_notify,$content,$text);
     }
 
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////