소스 검색

修复图片列表查询

kobe6258 8 달 전
부모
커밋
3423af5942
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      models/image_sources.go

+ 5 - 3
models/image_sources.go

@@ -23,15 +23,17 @@ type ImageSourceView struct {
 	Id             int       ` description:"Id"`
 	ImgName        string    `description:"图片名称"`
 	SrcUrl         string    `description:"图片资源"`
+	PermissionId   int       `description:"品种名称"`
 	PermissionName string    `description:"品种名称"`
 	CreatedTime    time.Time `description:"创建时间"`
 }
 
 func (i *ImageSource) ToView() (item *ImageSourceView, err error) {
 	item = &ImageSourceView{
-		Id:      i.Id,
-		ImgName: i.ImgName,
-		SrcUrl:  i.SrcUrl,
+		Id:           i.Id,
+		ImgName:      i.ImgName,
+		SrcUrl:       i.SrcUrl,
+		PermissionId: i.PermissionId,
 	}
 	name, err := GetPermissionNameById(i.PermissionId)
 	if err != nil {