fixed
This commit is contained in:
@@ -209,7 +209,7 @@ class Tasktimer extends Controller
|
|||||||
return Tools::set_fail('有'.$msg.'计划,无ai客服服务该客户');
|
return Tools::set_fail('有'.$msg.'计划,无ai客服服务该客户');
|
||||||
}
|
}
|
||||||
$base_url = $ai_config['server_url'];
|
$base_url = $ai_config['server_url'];
|
||||||
|
$type = 0;
|
||||||
if(!empty($customer_record['rel_group'])){
|
if(!empty($customer_record['rel_group'])){
|
||||||
if(empty($customer_record['wx_nickname'])){
|
if(empty($customer_record['wx_nickname'])){
|
||||||
return Tools::set_fail('客户无绑定微信昵称');
|
return Tools::set_fail('客户无绑定微信昵称');
|
||||||
@@ -221,6 +221,7 @@ class Tasktimer extends Controller
|
|||||||
//@的好友,多个英文逗号分隔。群主或管理员@全部的人,则填写'notify@all'
|
//@的好友,多个英文逗号分隔。群主或管理员@全部的人,则填写'notify@all'
|
||||||
'ats'=>$customer_record['rel_wx'],
|
'ats'=>$customer_record['rel_wx'],
|
||||||
];
|
];
|
||||||
|
$type = 1;
|
||||||
}else{
|
}else{
|
||||||
if(!empty($customer_record['rel_wx'])){
|
if(!empty($customer_record['rel_wx'])){
|
||||||
$data = [
|
$data = [
|
||||||
@@ -228,6 +229,7 @@ class Tasktimer extends Controller
|
|||||||
'toWxid'=>$customer_record['rel_wx'],//是群则发送群消息,否则发个人私人消息
|
'toWxid'=>$customer_record['rel_wx'],//是群则发送群消息,否则发个人私人消息
|
||||||
'content'=>$birthday_record['content'],
|
'content'=>$birthday_record['content'],
|
||||||
];
|
];
|
||||||
|
$type = 2;
|
||||||
}else{
|
}else{
|
||||||
return Tools::set_fail('客户未绑定微信和群');
|
return Tools::set_fail('客户未绑定微信和群');
|
||||||
}
|
}
|
||||||
@@ -237,7 +239,11 @@ class Tasktimer extends Controller
|
|||||||
$logic->setBaseUrl($base_url);
|
$logic->setBaseUrl($base_url);
|
||||||
|
|
||||||
Tools::log_to_write_txt([$msg.'微信群客户,开始:$post_data'=>$data]);
|
Tools::log_to_write_txt([$msg.'微信群客户,开始:$post_data'=>$data]);
|
||||||
|
if ($type == 1){
|
||||||
$res = $logic->postGroupText($data);
|
$res = $logic->postGroupText($data);
|
||||||
|
}else{
|
||||||
|
$res = $logic->postText($data);
|
||||||
|
}
|
||||||
Tools::log_to_write_txt([$msg.'微信群客户,结束:$res'=>$res]);
|
Tools::log_to_write_txt([$msg.'微信群客户,结束:$res'=>$res]);
|
||||||
|
|
||||||
return Tools::set_ok('发送成功');
|
return Tools::set_ok('发送成功');
|
||||||
|
|||||||
Reference in New Issue
Block a user