Explorar el Código

福利商城每月余额提醒增加屏蔽用户手机号或公众号推送

luojianqun hace 1 año
padre
commit
bc26fe740e
Se han modificado 1 ficheros con 14 adiciones y 0 borrados
  1. 14 0
      App/Crontab/BalanceCrontab.php

+ 14 - 0
App/Crontab/BalanceCrontab.php

@@ -93,6 +93,20 @@ class BalanceCrontab implements JobInterface
                     'operators_name' => $val['operators_name'],
                     'status' => 0,
                 ];
+                //公众号消息模板推送屏蔽
+                if($insert['push_type']==1 && !empty($this->set['wechat_msg_id'])){
+                    $wechat_msg_id = explode(",",$this->set['wechat_msg_id']);
+                    if (in_array($insert['member_id'],$wechat_msg_id)) {
+                        continue;
+                    }
+                }
+                //手机短信推送屏蔽
+                if($insert['push_type']==2 && !empty($this->set['sms_id'])){
+                    $sms_id = explode(",",$this->set['sms_id']);
+                    if (in_array($insert['member_id'],$sms_id)) {
+                        continue;
+                    }
+                }
                 $model = BalancePushBody::create($insert);
                 $body_id = $model->save();
                 //开始推送