@@ -2593,7 +2593,7 @@ func CentralKitchenForSchoolClassListBySort(req md.CentralKitchenForSchoolClassL | |||||
return | return | ||||
} | } | ||||
func CentralKitchenForSchoolMenuList(req md.CentralKitchenForSchoolMenuListReq) (m []*model.Grade, count int64, err error) { | |||||
func CentralKitchenForSchoolMenuList(req md.CentralKitchenForSchoolMenuListReq) (m []*model.CentralKitchenForSchoolMenu, count int64, err error) { | |||||
sess := db.Db.Where("enterprise_id =?", req.EnterpriseId) | sess := db.Db.Where("enterprise_id =?", req.EnterpriseId) | ||||
if req.StartDate != "" { | if req.StartDate != "" { | ||||
sess.And("end_date >= ?", req.StartDate) | sess.And("end_date >= ?", req.StartDate) | ||||
@@ -18,7 +18,7 @@ type CentralKitchenForSchoolInfoResp struct { | |||||
IsOpenTeacherReportMealForDay int `json:"is_open_teacher_report_meal_for_day" label:"开启教师按天报餐(1:开启 2:关闭)"` | IsOpenTeacherReportMealForDay int `json:"is_open_teacher_report_meal_for_day" label:"开启教师按天报餐(1:开启 2:关闭)"` | ||||
IsOpenTeacherReportMealForMonth int `json:"is_open_teacher_report_meal_for_month" label:"开启教师按月报餐(1:开启 2:关闭)"` | IsOpenTeacherReportMealForMonth int `json:"is_open_teacher_report_meal_for_month" label:"开启教师按月报餐(1:开启 2:关闭)"` | ||||
IsOpenTeacherReportMealForSemester int `json:"is_open_teacher_report_meal_for_semester" label:"开启教师按学期报餐(1:开启 2:关闭)"` | IsOpenTeacherReportMealForSemester int `json:"is_open_teacher_report_meal_for_semester" label:"开启教师按学期报餐(1:开启 2:关闭)"` | ||||
IsOpenLimitOrderFood int `json:"is_open_limit_order_food" label:"开启按学期教师报餐(1:开启 2:关闭)-教师"` | |||||
IsOpenLimitOrderFood int `json:"is_open_limit_order_food" label:"是否开启限制订餐(1:开启 2:关闭)"` | |||||
IsOpenBreakfast int `json:"is_open_breakfast" label:"是否开启早餐(1:开启 0:关闭)"` | IsOpenBreakfast int `json:"is_open_breakfast" label:"是否开启早餐(1:开启 0:关闭)"` | ||||
IsOpenLunch int `json:"is_open_lunch" label:"是否开启午餐(1:开启 0:关闭)"` | IsOpenLunch int `json:"is_open_lunch" label:"是否开启午餐(1:开启 0:关闭)"` | ||||
IsOpenDinner int `json:"is_open_dinner" label:"是否开启晚餐(1:开启 0:关闭)"` | IsOpenDinner int `json:"is_open_dinner" label:"是否开启晚餐(1:开启 0:关闭)"` | ||||
@@ -19,7 +19,7 @@ func (CentralKitchenForSchoolMenuDb *CentralKitchenForSchoolMenuDb) Set(enterpri | |||||
func (CentralKitchenForSchoolMenuDb *CentralKitchenForSchoolMenuDb) GetCentralKitchenForSchoolMenu(date string) (m *model.CentralKitchenForSchoolMenu, err error) { | func (CentralKitchenForSchoolMenuDb *CentralKitchenForSchoolMenuDb) GetCentralKitchenForSchoolMenu(date string) (m *model.CentralKitchenForSchoolMenu, err error) { | ||||
m = new(model.CentralKitchenForSchoolMenu) | m = new(model.CentralKitchenForSchoolMenu) | ||||
has, err := CentralKitchenForSchoolMenuDb.Db.Where("enterprise_id =?", CentralKitchenForSchoolMenuDb.EnterpriseId).And("start_date >=? and end_date <= ?", date, date).Get(m) | |||||
has, err := CentralKitchenForSchoolMenuDb.Db.Where("enterprise_id =?", CentralKitchenForSchoolMenuDb.EnterpriseId).And("start_date <=? and end_date >= ?", date, date).Get(m) | |||||
if err != nil { | if err != nil { | ||||
return nil, logx.Error(err) | return nil, logx.Error(err) | ||||
} | } | ||||
@@ -137,7 +137,7 @@ func rApiSuggestedFeedback(r *gin.RouterGroup) { //反馈建议 | |||||
r.POST("/add", hdl.SuggestedFeedbackAdd) // 新增 | r.POST("/add", hdl.SuggestedFeedbackAdd) // 新增 | ||||
} | } | ||||
func rApiFoodMenu(r *gin.RouterGroup) { //反馈建议 | |||||
r.Use(mw.Auth) //检测登录状态 | |||||
r.GET("/thisWeek", hdl.WeekFoodMenu) // 每周菜谱 | |||||
func rApiFoodMenu(r *gin.RouterGroup) { //菜谱 | |||||
r.Use(mw.Auth) //检测登录状态 | |||||
r.POST("/weekFoodMenu", hdl.WeekFoodMenu) // 每周菜谱 | |||||
} | } |