Browse Source

anchor

master
chuan 2 months ago
parent
commit
9bc7942580
  1. 10
      app/home/service/UserService.php
  2. 2
      app/model/AwsIvsModel.php

10
app/home/service/UserService.php

@ -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()]);
} }

2
app/model/AwsIvsModel.php

@ -2,5 +2,5 @@
namespace app\model; namespace app\model;
class AwsIvsModel extends BaseModel class AwsIvsModel extends BaseModel
{ {
protected $table = 'aws_ivs'; protected $name = 'aws_ivs';
} }
Loading…
Cancel
Save