接口对接
This commit is contained in:
@@ -68,22 +68,26 @@ func (s *scheduleService) List(ctx context.Context, req *dto.ListScheduleReq) (r
|
||||
for _, item := range scheduleList {
|
||||
// 获取主播信息
|
||||
anchorName := ""
|
||||
anchor, _ := dao.Anchor.GetOne(ctx, &dto.GetAnchorReq{Id: int64(item.AnchorId)})
|
||||
if anchor != nil {
|
||||
anchorName = anchor.Name
|
||||
if item.AnchorId > 0 {
|
||||
anchor, _ := dao.Anchor.GetOne(ctx, &dto.GetAnchorReq{Id: int64(item.AnchorId)})
|
||||
if anchor != nil {
|
||||
anchorName = anchor.Name
|
||||
}
|
||||
}
|
||||
|
||||
// 获取账号信息
|
||||
accountName := ""
|
||||
platform := ""
|
||||
account, _ := dao.LiveAccount.GetOne(ctx, &dto.GetLiveAccountReq{Id: int64(item.AccountId)})
|
||||
if account != nil {
|
||||
accountName = account.AccountName
|
||||
platform = account.Platform
|
||||
if item.AccountId > 0 {
|
||||
account, _ := dao.LiveAccount.GetOne(ctx, &dto.GetLiveAccountReq{Id: int64(item.AccountId)})
|
||||
if account != nil {
|
||||
accountName = account.AccountName
|
||||
platform = account.Platform
|
||||
}
|
||||
}
|
||||
|
||||
list = append(list, dto.ScheduleItem{
|
||||
Id: item.Id,
|
||||
Id: int64(item.Id),
|
||||
AnchorId: item.AnchorId,
|
||||
AnchorName: anchorName,
|
||||
AccountId: item.AccountId,
|
||||
|
||||
Reference in New Issue
Block a user