|
|
@@ -101,14 +101,9 @@ func NoticeIsPopToCentralKitchen(c *gin.Context) { |
|
|
|
now := time.Now() |
|
|
|
|
|
|
|
if popToCentralKitchen != nil && utils.StrToInt(id) != popToCentralKitchen.Id { |
|
|
|
notice, err1 := noticeDb.GetNotice(utils.StrToInt(id)) |
|
|
|
if err1 != nil { |
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err1.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
notice.IsPopToCentralKitchen = 0 |
|
|
|
notice.UpdateAt = now.Format("2006-01-02 15:04:05") |
|
|
|
_, err = noticeDb.NoticeUpdate(notice, "is_pop_to_central_kitchen", "update_at") |
|
|
|
popToCentralKitchen.IsPopToCentralKitchen = 0 |
|
|
|
popToCentralKitchen.UpdateAt = now.Format("2006-01-02 15:04:05") |
|
|
|
_, err = noticeDb.NoticeUpdate(popToCentralKitchen, "is_pop_to_central_kitchen", "update_at") |
|
|
|
if err != nil { |
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err.Error()) |
|
|
|
return |
|
|
|