fix(fe): 修社区图片撑破网格;发帖限 3 张;上传偶发失败自动重试 #5
@@ -229,8 +229,9 @@ func (s *Service) GetPoster(userID, petID string) (*Poster, error) {
|
||||
s.db.Model(&model.HealthRecord{}).Where("pet_id = ? AND type = ? AND occurred_at >= ?", petID, model.RecordVaccine, weekAgo).Count(&vaccineRecs)
|
||||
s.db.Model(&model.HealthRecord{}).Where("pet_id = ? AND type = ? AND category = ? AND occurred_at >= ?", petID, model.RecordSymptom, "高", weekAgo).Count(&highRisk)
|
||||
|
||||
// ownedPet 只填了 Age,头像 URL 得在这里从 file id 解析(否则是空的)
|
||||
return &Poster{
|
||||
PetName: pet.Name, PetEmoji: pet.Emoji, PetAvatarURL: pet.AvatarURL,
|
||||
PetName: pet.Name, PetEmoji: pet.Emoji, PetAvatarURL: s.fileURL(pet.AvatarFileID),
|
||||
Age: pet.Age, Weight: pet.Weight, Stage: pet.Stage,
|
||||
Period: weekAgo.Format("01.02") + " - " + now.Format("01.02"),
|
||||
TasksCompleted: tasksDone, WeightRecords: weightRecs, VaccineRecords: vaccineRecs,
|
||||
|
||||
Reference in New Issue
Block a user