流量分发筛选状态功能

This commit is contained in:
wong
2025-12-11 17:31:33 +08:00
parent 84a51b8f91
commit 61926503cf
4 changed files with 97 additions and 8 deletions

View File

@@ -174,7 +174,8 @@ class AutomaticAssign extends BaseController
public function allotWechatFriend($data = [],$isInner = false,$errorNum = 0)
{
// 获取授权token
$authorization = trim($this->request->header('authorization', $this->authorization));
$authorization = $this->authorization;
if (empty($authorization)) {
if($isInner){
return json_encode(['code'=>500,'msg'=>'缺少授权信息']);
@@ -209,8 +210,8 @@ class AutomaticAssign extends BaseController
// 发送请求
$url = $this->baseUrl . 'api/WechatFriend/allot?wechatFriendId='.$wechatFriendId.'&notifyReceiver='.$notifyReceiver.'&comment='.$comment.'&toAccountId='.$toAccountId.'&optFrom='.$optFrom;
$result = requestCurl($url, [], 'PUT', $header, 'json');
if (empty($result)) {
$response = handleApiResponse($result);
if (empty($response)) {
if($isInner){
return json_encode(['code'=>200,'msg'=>'微信好友分配成功']);
}else{