diff --git a/model/gmodel/fs_preprocess_logo_logic.go b/model/gmodel/fs_preprocess_logo_logic.go index be1dce38..70300d95 100644 --- a/model/gmodel/fs_preprocess_logo_logic.go +++ b/model/gmodel/fs_preprocess_logo_logic.go @@ -13,7 +13,6 @@ import ( type PreLogoSearchResult struct { Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // 自增的唯一id - LocationCode *string `gorm:"index;default:'';" json:"location_code"` // RestaurantName *string `gorm:"index;default:'';" json:"restaurant_name"` // ResourceUrl *string `gorm:"default:'';" json:"resource_url"` // RestaurantType *string `gorm:"default:'';" json:"restaurant_type"` // @@ -42,6 +41,9 @@ func (p *FsPreprocessLogoModel) PreLogoSearch(ctx context.Context, zipcode strin } for i := range resp { + if resp[i].RestaurantType == nil { + resp[i].RestaurantType = FsString("") + } resp[i].ResourceUrl = FsString(testData[rand.Uint64()%uint64(len(testData))]) }