From 9f9636dc16af23c49e0014eac3cca5c05ee25362 Mon Sep 17 00:00:00 2001 From: wucongxing8150 <815046773@qq.com> Date: Tue, 10 Sep 2024 14:33:27 +0800 Subject: [PATCH] 111 --- api/dto/VideoAuthor.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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), } // 加载数据-医院属性