临时提交
This commit is contained in:
@@ -7,6 +7,7 @@ use app\api\model\CompanyModel;
|
|||||||
use Library\S2\Logics\AccountLogic;
|
use Library\S2\Logics\AccountLogic;
|
||||||
use think\Db;
|
use think\Db;
|
||||||
use think\facade\Request;
|
use think\facade\Request;
|
||||||
|
use think\facade\Cache;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 账号管理控制器
|
* 账号管理控制器
|
||||||
@@ -174,7 +175,7 @@ class AutomaticAssign extends BaseController
|
|||||||
public function allotWechatFriend($data = [],$isInner = false)
|
public function allotWechatFriend($data = [],$isInner = false)
|
||||||
{
|
{
|
||||||
// 获取授权token
|
// 获取授权token
|
||||||
$authorization = trim($this->request->header('authorization', $this->authorization));
|
$authorization = $this->authorization;
|
||||||
if (empty($authorization)) {
|
if (empty($authorization)) {
|
||||||
if($isInner){
|
if($isInner){
|
||||||
return json_encode(['code'=>500,'msg'=>'缺少授权信息']);
|
return json_encode(['code'=>500,'msg'=>'缺少授权信息']);
|
||||||
@@ -216,6 +217,13 @@ class AutomaticAssign extends BaseController
|
|||||||
return successJson([], '微信好友分配成功');
|
return successJson([], '微信好友分配成功');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
if ($result == '无效路径或登录状态失效'){
|
||||||
|
Cache::rm('system_authorization_token');
|
||||||
|
Cache::rm('system_refresh_token');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if($isInner){
|
if($isInner){
|
||||||
return json_encode(['code'=>500,'msg'=>$result]);
|
return json_encode(['code'=>500,'msg'=>$result]);
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ class SwitchFriendsCommand extends Command
|
|||||||
}else{
|
}else{
|
||||||
$output->writeln('切换好友:' . $friendId . ' 到账号:' . $friend['accountId'] .' 结果:' .$res['msg']);
|
$output->writeln('切换好友:' . $friendId . ' 到账号:' . $friend['accountId'] .' 结果:' .$res['msg']);
|
||||||
}
|
}
|
||||||
sleep(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 过滤掉已切换的,保留未切换和新进来的
|
// 过滤掉已切换的,保留未切换和新进来的
|
||||||
|
|||||||
Reference in New Issue
Block a user