diff --git a/app/home/service/UserService.php b/app/home/service/UserService.php index a04f7ff..9441cc9 100644 --- a/app/home/service/UserService.php +++ b/app/home/service/UserService.php @@ -3,6 +3,7 @@ namespace app\home\service; use app\home\validate\UserValidate; +use app\model\AwsIvsModel; use app\model\CountryModel; use app\model\CustomerRelationalModel; use app\model\FileModel; @@ -242,12 +243,11 @@ class UserService extends BaseHomeService return $this->toData('100400', 'The user does not have a agent.', []); } // 查询代理下的一个主播信息 - $agentGroup = UserChatGroupModel::where(['user_id'=>$info['agent_id']])->find()->toArray(); - if (empty($agentGroup)) { - return $this->toData('100400', 'The chat group is error.', []); + $anchorData = AwsIvsModel::where(['agent_id'=>$info['agent_id']])->find(); + if (empty($anchorData)) { + return $this->toData('100400', 'The anchor information is empty', ['agent_id'=>$info['agent_id']]); } - - return $this->toData('0', 'Modification successful.', $agentGroup); + return $this->toData('0', 'Modification successful.', $anchorData->toArray()); } catch (\Exception $exception) { return $this->toData('100500', 'The system is busy.', [$exception->getMessage(), $exception->getTrace()]); } diff --git a/app/model/AwsIvsModel.php b/app/model/AwsIvsModel.php index 717d7ac..cd0ac77 100644 --- a/app/model/AwsIvsModel.php +++ b/app/model/AwsIvsModel.php @@ -2,5 +2,5 @@ namespace app\model; class AwsIvsModel extends BaseModel { - protected $table = 'aws_ivs'; + protected $name = 'aws_ivs'; } \ No newline at end of file