|
@@ -29,24 +29,49 @@ class ONUService{
|
|
|
$cmessageid=$cmessageid[0];
|
|
|
$data['group_dr_id']=$cmessageid;
|
|
|
$admin = new AdvertAdminAction();
|
|
|
- $where =" where remarks='{$cmessageid}'" ;
|
|
|
- $list = $admin->select_smslog_new_query($where);//牛信云发送日志查询
|
|
|
- $uid =$list[0]['uid'];
|
|
|
+ //根据DID号判断站点
|
|
|
+ $uid =$this->getUid($data['toPhone']);
|
|
|
$data['status']=1;
|
|
|
$data['uid']=$uid;
|
|
|
$data['mobile']=$this->checkMobileCode($data['fromPhone']);
|
|
|
if(stripos($data['content'],'stop')!==false){//客户取消订阅
|
|
|
$data['status']=2;
|
|
|
- var_dump($data['content']);
|
|
|
- exit;
|
|
|
$is_send =2;
|
|
|
if($uid){
|
|
|
$admin->upDidSmsCustomer($is_send,$data['mobile'],$uid);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
$admin->addDidLog($data);
|
|
|
}
|
|
|
+ public function getUid($mobile){
|
|
|
+ $mobile= str_replace('-', '', $mobile);
|
|
|
+ $mobile= str_replace('_', '', $mobile);
|
|
|
+ $mobile= str_replace('(', '', $mobile);
|
|
|
+ $mobile= str_replace(')', '', $mobile);
|
|
|
+ $mobile= str_replace('+', '', $mobile);
|
|
|
+ $mobile= str_replace(' ', '', $mobile);
|
|
|
+ $mobile=trim($mobile);
|
|
|
+ $uid=0;
|
|
|
+ if($mobile==18444795753){//--牛信云 alipearlhair
|
|
|
+ $uid=1;
|
|
|
+ }
|
|
|
+ if($mobile==18332604755){//--牛信云 yolissahair
|
|
|
+ $uid=7;
|
|
|
+ }
|
|
|
+ if($mobile==18332359525){//--牛信云 asteriahair
|
|
|
+ $uid=5;
|
|
|
+ }
|
|
|
+ if($mobile==18444796463){//--牛信云 supernovahair
|
|
|
+ $uid=6;
|
|
|
+ }
|
|
|
+ if($mobile==18444797525){//--牛信云 westkisshair
|
|
|
+ $uid=3;
|
|
|
+ }
|
|
|
+ if($mobile==18337593782){//--牛信云 wigginshair
|
|
|
+ $uid=4;
|
|
|
+ }
|
|
|
+ return $uid;
|
|
|
+ }
|
|
|
public function checkMobileCode($mobile){
|
|
|
$mobile= str_replace('-', '', $mobile);
|
|
|
$mobile= str_replace('_', '', $mobile);
|