This commit is contained in:
wucongxing8150 2024-09-10 14:33:27 +08:00
parent 3505c11223
commit 9f9636dc16

View File

@ -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),
}
// 加载数据-医院属性