diff --git a/business/model/food_recipe.go b/business/model/food_recipe.go index 05fe82cb2..6c75cb419 100644 --- a/business/model/food_recipe.go +++ b/business/model/food_recipe.go @@ -13,7 +13,7 @@ type FoodRecipe struct { AuthorID string `orm:"size(48);column(author_id);index" json:"authorID"` Description string `orm:"size(4096)" json:"description"` - Img string `orm:"size(48)" json:"img"` + Img string `orm:"size(1024)" json:"img"` TimeInMinute int `json:"timeInMinute"` // 大约时间(分钟) UpvoteCount int `json:"upvoteCount"` DownvoteCount int `json:"downvoteCount"` @@ -39,7 +39,7 @@ type FoodRecipeStep struct { Name string `orm:"size(48)" json:"name"` Description string `orm:"size(4096)" json:"description"` - Img string `orm:"size(48)" json:"img"` + Img string `orm:"size(1024)" json:"img"` } func (*FoodRecipeStep) TableUnique() [][]string { diff --git a/business/userstore/food_recipe.go b/business/userstore/food_recipe.go index 6db1ce593..99e7e02e0 100644 --- a/business/userstore/food_recipe.go +++ b/business/userstore/food_recipe.go @@ -255,7 +255,7 @@ func VoteFoodRecipe(ctx *jxcontext.Context, recipeID, voteType int) (err error) UserID: userID, } if err = dao.GetEntity(db, recipeUser); err != nil { - if dao.IsNoRowsError(err) { + if !dao.IsNoRowsError(err) { return err } } diff --git a/controllers/cmd_food_recipe.go b/controllers/cms_food_recipe.go similarity index 100% rename from controllers/cmd_food_recipe.go rename to controllers/cms_food_recipe.go