This commit is contained in:
gazebo
2019-09-17 17:06:08 +08:00
parent 7b0d1d396f
commit d8f684f720
3 changed files with 3 additions and 3 deletions

View File

@@ -13,7 +13,7 @@ type FoodRecipe struct {
AuthorID string `orm:"size(48);column(author_id);index" json:"authorID"` AuthorID string `orm:"size(48);column(author_id);index" json:"authorID"`
Description string `orm:"size(4096)" json:"description"` 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"` // 大约时间(分钟) TimeInMinute int `json:"timeInMinute"` // 大约时间(分钟)
UpvoteCount int `json:"upvoteCount"` UpvoteCount int `json:"upvoteCount"`
DownvoteCount int `json:"downvoteCount"` DownvoteCount int `json:"downvoteCount"`
@@ -39,7 +39,7 @@ type FoodRecipeStep struct {
Name string `orm:"size(48)" json:"name"` Name string `orm:"size(48)" json:"name"`
Description string `orm:"size(4096)" json:"description"` 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 { func (*FoodRecipeStep) TableUnique() [][]string {

View File

@@ -255,7 +255,7 @@ func VoteFoodRecipe(ctx *jxcontext.Context, recipeID, voteType int) (err error)
UserID: userID, UserID: userID,
} }
if err = dao.GetEntity(db, recipeUser); err != nil { if err = dao.GetEntity(db, recipeUser); err != nil {
if dao.IsNoRowsError(err) { if !dao.IsNoRowsError(err) {
return err return err
} }
} }