作者 yangfu

公告发布修改

@@ -310,9 +310,11 @@ func GetBulletin(id int, companyId int64, request *protocol.GetBulletinRequest) @@ -310,9 +310,11 @@ func GetBulletin(id int, companyId int64, request *protocol.GetBulletinRequest)
310 Type: int(question.Type), 310 Type: int(question.Type),
311 Title: question.Title, 311 Title: question.Title,
312 } 312 }
313 - if err = json.Unmarshal([]byte(question.Content), &rsp.Question.Content); err != nil {  
314 - log.Error(err.Error())  
315 - return 313 + if len(question.Content) > 0 {
  314 + if err = json.Unmarshal([]byte(question.Content), &rsp.Question.Content); err != nil {
  315 + log.Error(err.Error())
  316 + return
  317 + }
316 } 318 }
317 for i := range rsp.Question.Content { 319 for i := range rsp.Question.Content {
318 if rsp.Question.Content[i].Id == -1 && len(rsp.Question.Content[i].Content) == 0 { 320 if rsp.Question.Content[i].Id == -1 && len(rsp.Question.Content[i].Content) == 0 {