diff --git a/app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go b/app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go index 767500e..acff3ee 100644 --- a/app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go +++ b/app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go @@ -2593,7 +2593,7 @@ func CentralKitchenForSchoolClassListBySort(req md.CentralKitchenForSchoolClassL 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) if req.StartDate != "" { sess.And("end_date >= ?", req.StartDate) diff --git a/app/customer/md/md_enterprise.go b/app/customer/md/md_enterprise.go index 3bed5ad..76f2f87 100644 --- a/app/customer/md/md_enterprise.go +++ b/app/customer/md/md_enterprise.go @@ -18,7 +18,7 @@ type CentralKitchenForSchoolInfoResp struct { 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:关闭)"` 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:关闭)"` IsOpenLunch int `json:"is_open_lunch" label:"是否开启午餐(1:开启 0:关闭)"` IsOpenDinner int `json:"is_open_dinner" label:"是否开启晚餐(1:开启 0:关闭)"` diff --git a/app/db/db_central_kitchen_for_school_menu.go b/app/db/db_central_kitchen_for_school_menu.go index 2f0cb00..668c097 100644 --- a/app/db/db_central_kitchen_for_school_menu.go +++ b/app/db/db_central_kitchen_for_school_menu.go @@ -19,7 +19,7 @@ func (CentralKitchenForSchoolMenuDb *CentralKitchenForSchoolMenuDb) Set(enterpri func (CentralKitchenForSchoolMenuDb *CentralKitchenForSchoolMenuDb) GetCentralKitchenForSchoolMenu(date string) (m *model.CentralKitchenForSchoolMenu, err error) { 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 { return nil, logx.Error(err) } diff --git a/app/router/customer_router.go b/app/router/customer_router.go index 7da40ef..395c724 100644 --- a/app/router/customer_router.go +++ b/app/router/customer_router.go @@ -137,7 +137,7 @@ func rApiSuggestedFeedback(r *gin.RouterGroup) { //反馈建议 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) // 每周菜谱 }