diff --git a/api/dto/VideoAuthor.go b/api/dto/VideoAuthor.go index 183fb3d..5edb668 100644 --- a/api/dto/VideoAuthor.go +++ b/api/dto/VideoAuthor.go @@ -1,12 +1,16 @@ package dto import ( + "fmt" "vote-admin-api/api/model" ) type VideoAuthorDto struct { - AuthorName string `json:"author_name"` // 作者姓名 + AuthorId string `json:"author_id"` // 主键id + VideoId string `json:"video_id"` // 文章id + HospitalId string `json:"hospital_id"` // 作者所属id HospitalName string `json:"hospital_name"` // 作者所属医院 + AuthorName string `json:"author_name"` // 作者姓名 } // GetVideoAuthorListDto 列表-分页 @@ -17,7 +21,10 @@ func GetVideoAuthorListDto(m []*model.VideoAuthor) []*VideoAuthorDto { if len(m) > 0 { for i, v := range m { response := &VideoAuthorDto{ + AuthorId: fmt.Sprintf("%d", v.AuthorId), + VideoId: fmt.Sprintf("%d", v.VideoId), AuthorName: v.AuthorName, + HospitalId: fmt.Sprintf("%d", v.HospitalId), } // 加载数据-医院属性