|
@ -3,6 +3,7 @@ |
|
|
namespace app\home\service; |
|
|
namespace app\home\service; |
|
|
|
|
|
|
|
|
use app\home\validate\UserValidate; |
|
|
use app\home\validate\UserValidate; |
|
|
|
|
|
use app\model\AwsIvsModel; |
|
|
use app\model\CountryModel; |
|
|
use app\model\CountryModel; |
|
|
use app\model\CustomerRelationalModel; |
|
|
use app\model\CustomerRelationalModel; |
|
|
use app\model\FileModel; |
|
|
use app\model\FileModel; |
|
@ -242,12 +243,11 @@ class UserService extends BaseHomeService |
|
|
return $this->toData('100400', 'The user does not have a agent.', []); |
|
|
return $this->toData('100400', 'The user does not have a agent.', []); |
|
|
} |
|
|
} |
|
|
// 查询代理下的一个主播信息 |
|
|
// 查询代理下的一个主播信息 |
|
|
$agentGroup = UserChatGroupModel::where(['user_id'=>$info['agent_id']])->find()->toArray(); |
|
|
$anchorData = AwsIvsModel::where(['agent_id'=>$info['agent_id']])->find(); |
|
|
if (empty($agentGroup)) { |
|
|
if (empty($anchorData)) { |
|
|
return $this->toData('100400', 'The chat group is error.', []); |
|
|
return $this->toData('100400', 'The anchor information is empty', ['agent_id'=>$info['agent_id']]); |
|
|
} |
|
|
} |
|
|
|
|
|
return $this->toData('0', 'Modification successful.', $anchorData->toArray()); |
|
|
return $this->toData('0', 'Modification successful.', $agentGroup); |
|
|
|
|
|
} catch (\Exception $exception) { |
|
|
} catch (\Exception $exception) { |
|
|
return $this->toData('100500', 'The system is busy.', [$exception->getMessage(), $exception->getTrace()]); |
|
|
return $this->toData('100500', 'The system is busy.', [$exception->getMessage(), $exception->getTrace()]); |
|
|
} |
|
|
} |
|
|