ziwen před 2 roky
rodič
revize
6199f7556d

+ 5 - 4
controller/voice_broadcast/voice_broadcast.go

@@ -209,10 +209,11 @@ func SectionList(c *gin.Context) {
 		for _, s := range sList {
 			if v.VarietyId == s.VarietyId {
 				section := voiceResp.SectionList{
-							SectionId:   s.SectionId,
-							SectionName: s.SectionName,
-							Status:      s.Status,
-						}
+					ImgUrl:      s.ImgUrl,
+					SectionId:   s.SectionId,
+					SectionName: s.SectionName,
+					Status:      s.Status,
+				}
 				sectionList = append(sectionList, section)
 			}
 		}

+ 1 - 0
models/response/voice_broadcast.go

@@ -32,6 +32,7 @@ type VarietyList struct {
 	Children    []SectionList
 }
 type SectionList struct {
+	ImgUrl      string
 	SectionId   int
 	SectionName string
 	Status      int

+ 7 - 6
models/tables/voice_section/voice_section.go

@@ -1,15 +1,16 @@
 package voice_section
 
 type VoiceSection struct {
-	SectionId   int       `orm:"column(section_id);pk" description:"板块id"`
-	SectionName string    `description:"板块名称"`
-	VarietyId   int       `description:"品种id"`
-	VarietyName string    `description:"品种名称"`
-	Status      int       `description:"角色状态"`
+	SectionId   int    `orm:"column(section_id);pk" description:"板块id"`
+	SectionName string `description:"板块名称"`
+	VarietyId   int    `description:"品种id"`
+	VarietyName string `description:"品种名称"`
+	Status      int    `description:"角色状态"`
+	ImgUrl      string `description:"背景图url"`
 	CreateTime  string `description:"创建时间"`
 }
 
 // TableName 表名变更
 func (voiceSection *VoiceSection) TableName() string {
 	return "yb_voice_section"
-}
+}