diff --git a/app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go b/app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go index 699f003..74fcb16 100644 --- a/app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go +++ b/app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go @@ -491,6 +491,183 @@ func SetCentralKitchenForSchoolWithSpecByPeriod(c *gin.Context) { return } +func SetCentralKitchenForSchoolWithSpecByMealLabel(c *gin.Context) { + var req md.SetCentralKitchenForSchoolWithSpecByMealLabel + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + + now := time.Now() + mealLabelDb := db.MealLabelDb{} + mealLabelDb.Set(req.EnterpriseId) + for _, v := range req.List { + for _, vv := range v.MealLabelListForBreakfast { + if vv.Id != 0 { + mealLabel, err := mealLabelDb.GetMealLabel(vv.Id) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + mealLabel.Name = vv.Name + mealLabel.Price = vv.Price + _, err = mealLabelDb.MealLabelUpdate(mealLabel, "name", "price") + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + } else { + mealLabel := &model.MealLabel{ + Name: vv.Name, + EnterpriseId: req.EnterpriseId, + PeriodId: v.PeriodId, + Kind: 1, + Price: vv.Price, + CreateAt: now.Format("2006-01-02 15:04:05"), + UpdateAt: now.Format("2006-01-02 15:04:05"), + } + _, err = mealLabelDb.MealLabelInsert(mealLabel) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + } + } + for _, vv := range v.MealLabelListForLunch { + if vv.Id != 0 { + mealLabel, err := mealLabelDb.GetMealLabel(vv.Id) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + mealLabel.Name = vv.Name + mealLabel.Price = vv.Price + _, err = mealLabelDb.MealLabelUpdate(mealLabel, "name", "price") + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + } else { + mealLabel := &model.MealLabel{ + Name: vv.Name, + EnterpriseId: req.EnterpriseId, + PeriodId: v.PeriodId, + Kind: 2, + Price: vv.Price, + CreateAt: now.Format("2006-01-02 15:04:05"), + UpdateAt: now.Format("2006-01-02 15:04:05"), + } + _, err = mealLabelDb.MealLabelInsert(mealLabel) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + } + } + for _, vv := range v.MealLabelListForDinner { + if vv.Id != 0 { + mealLabel, err := mealLabelDb.GetMealLabel(vv.Id) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + mealLabel.Name = vv.Name + mealLabel.Price = vv.Price + _, err = mealLabelDb.MealLabelUpdate(mealLabel, "name", "price") + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + } else { + mealLabel := &model.MealLabel{ + Name: vv.Name, + EnterpriseId: req.EnterpriseId, + PeriodId: v.PeriodId, + Kind: 3, + Price: vv.Price, + CreateAt: now.Format("2006-01-02 15:04:05"), + UpdateAt: now.Format("2006-01-02 15:04:05"), + } + _, err = mealLabelDb.MealLabelInsert(mealLabel) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + } + } + } + + e.OutSuc(c, "success", nil) + return +} + +func GetCentralKitchenForSchoolWithSpecByMealLabel(c *gin.Context) { + enterpriseId := c.DefaultQuery("enterprise_id", "") + periodDb := db.PeriodDb{} + periodDb.Set(utils.StrToInt(enterpriseId)) + periodList, err := periodDb.FindPeriod() + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + + var resp = md.SetCentralKitchenForSchoolWithSpecByMealLabel{} + resp.EnterpriseId = utils.StrToInt(enterpriseId) + mealLabelDb := db.MealLabelDb{} + mealLabelDb.Set(resp.EnterpriseId) + for _, v := range *periodList { + mealLabels, err := mealLabelDb.FindMealLabel(v.Id) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + + var mealLabelListForBreakfast, mealLabelListForLunch, mealLabelListForDinner []md.MealLabelList + for _, vv := range *mealLabels { + if vv.Kind == 1 { + mealLabelListForBreakfast = append(mealLabelListForBreakfast, md.MealLabelList{ + Id: vv.Id, + Name: vv.Name, + Price: vv.Price, + }) + } + if vv.Kind == 2 { + mealLabelListForLunch = append(mealLabelListForLunch, md.MealLabelList{ + Id: vv.Id, + Name: vv.Name, + Price: vv.Price, + }) + } + if vv.Kind == 3 { + mealLabelListForDinner = append(mealLabelListForDinner, md.MealLabelList{ + Id: vv.Id, + Name: vv.Name, + Price: vv.Price, + }) + } + } + resp.List = append(resp.List, struct { + PeriodId int `json:"period_id" binding:"required" label:"学段id"` + Name string `json:"name" label:"学段名称"` + MealLabelListForBreakfast []md.MealLabelList `json:"meal_label_list_for_breakfast" label:"早餐集合"` + MealLabelListForLunch []md.MealLabelList `json:"meal_label_list_for_lunch" label:"午餐集合"` + MealLabelListForDinner []md.MealLabelList `json:"meal_label_list_for_dinner" label:"晚餐集合"` + }{ + PeriodId: v.Id, + Name: v.Name, + MealLabelListForBreakfast: mealLabelListForBreakfast, + MealLabelListForLunch: mealLabelListForLunch, + MealLabelListForDinner: mealLabelListForDinner, + }) + } + + e.OutSuc(c, resp, nil) + return +} + func ListCentralKitchenForSchoolPackage(c *gin.Context) { var req md.ListCentralKitchenForSchoolPackageReq err := c.ShouldBindJSON(&req) diff --git a/app/admin/hdl/hdl_set_center.go b/app/admin/hdl/hdl_set_center.go index a77b0b5..5ae7685 100644 --- a/app/admin/hdl/hdl_set_center.go +++ b/app/admin/hdl/hdl_set_center.go @@ -22,7 +22,9 @@ func SetCenter(c *gin.Context) { sysCfgDb.Set() sysCfgDb.SysCfgUpdate(enum.AdministratorContactInfo, req.AdministratorContactInfo) sysCfgDb.SysCfgUpdate(enum.CentralKitchenForSchoolReserveMealTime, req.CentralKitchenForSchoolReserveMealTime) - sysCfgDb.SysCfgUpdate(enum.CentralKitchenForSchoolCancelMealTime, req.CentralKitchenForSchoolCancelMealTime) + sysCfgDb.SysCfgUpdate(enum.CentralKitchenForSchoolCancelMealTimeForBreakfast, req.CentralKitchenForSchoolCancelMealTimeForBreakfast) + sysCfgDb.SysCfgUpdate(enum.CentralKitchenForSchoolCancelMealTimeForLunch, req.CentralKitchenForSchoolCancelMealTimeForLunch) + sysCfgDb.SysCfgUpdate(enum.CentralKitchenForSchoolCancelMealTimeForDinner, req.CentralKitchenForSchoolCancelMealTimeForDinner) e.OutSuc(c, "success", nil) return } @@ -30,7 +32,10 @@ func SetCenter(c *gin.Context) { func GetCenter(c *gin.Context) { sysCfgDb := db.SysCfgDb{} sysCfgDb.Set() - res := sysCfgDb.SysCfgFindWithDb(enum.AdministratorContactInfo, enum.CentralKitchenForSchoolReserveMealTime, enum.CentralKitchenForSchoolCancelMealTime) + res := sysCfgDb.SysCfgFindWithDb(enum.AdministratorContactInfo, enum.CentralKitchenForSchoolReserveMealTime, + enum.CentralKitchenForSchoolCancelMealTimeForBreakfast, + enum.CentralKitchenForSchoolCancelMealTimeForLunch, + enum.CentralKitchenForSchoolCancelMealTimeForDinner) e.OutSuc(c, res, nil) return } diff --git a/app/admin/md/md_enterprise_manage.go b/app/admin/md/md_enterprise_manage.go index fac2525..63aeceb 100644 --- a/app/admin/md/md_enterprise_manage.go +++ b/app/admin/md/md_enterprise_manage.go @@ -167,6 +167,23 @@ type SetCentralKitchenForSchoolWithSpecByPeriodReq struct { } `json:"list" binding:"required" label:"日期"` } +type SetCentralKitchenForSchoolWithSpecByMealLabel struct { + EnterpriseId int `json:"enterprise_id" binding:"required" label:"企业id"` + List []struct { + PeriodId int `json:"period_id" binding:"required" label:"学段id"` + Name string `json:"name" label:"学段名称"` + MealLabelListForBreakfast []MealLabelList `json:"meal_label_list_for_breakfast" label:"早餐集合"` + MealLabelListForLunch []MealLabelList `json:"meal_label_list_for_lunch" label:"午餐集合"` + MealLabelListForDinner []MealLabelList `json:"meal_label_list_for_dinner" label:"晚餐集合"` + } `json:"list" binding:"required" label:"数据集合"` +} + +type MealLabelList struct { + Id int `json:"id" label:"id"` + Name string `json:"name" binding:"required" label:"餐标名称"` + Price string `json:"price" binding:"required" label:"单价"` +} + type SaveCentralKitchenForSchoolPackageReq struct { PackageId int `json:"package_id" label:"套餐ID"` EnterpriseId int `json:"enterprise_id" binding:"required" label:"企业id"` diff --git a/app/admin/md/md_set_center.go b/app/admin/md/md_set_center.go index c14a029..a401075 100644 --- a/app/admin/md/md_set_center.go +++ b/app/admin/md/md_set_center.go @@ -1,9 +1,11 @@ package md type SetCenterReq struct { - AdministratorContactInfo string `json:"administrator_contact_info" binding:"required" label:"管理员联系方式"` - CentralKitchenForSchoolReserveMealTime string `json:"central_kitchen_for_school_reserve_meal_time" binding:"required" label:"央厨预定用餐时间"` - CentralKitchenForSchoolCancelMealTime string `json:"central_kitchen_for_school_cancel_meal_time" binding:"required" label:"央厨取消用餐时间"` + AdministratorContactInfo string `json:"administrator_contact_info" binding:"required" label:"管理员联系方式"` + CentralKitchenForSchoolReserveMealTime string `json:"central_kitchen_for_school_reserve_meal_time" binding:"required" label:"央厨预定用餐时间"` + CentralKitchenForSchoolCancelMealTimeForBreakfast string `json:"central_kitchen_for_school_cancel_meal_time_for_breakfast" binding:"required" label:"央厨取消用餐时间-早餐"` + CentralKitchenForSchoolCancelMealTimeForLunch string `json:"central_kitchen_for_school_cancel_meal_time_for_lunch" binding:"required" label:"央厨取消用餐时间-午餐"` + CentralKitchenForSchoolCancelMealTimeForDinner string `json:"central_kitchen_for_school_cancel_meal_time_for_dinner" binding:"required" label:"央厨取消用餐时间-晚餐"` } type SetCenterReqForNursingHome struct { diff --git a/app/customer/hdl/hdl_enterprise.go b/app/customer/hdl/hdl_enterprise.go index 6e89eac..9003599 100644 --- a/app/customer/hdl/hdl_enterprise.go +++ b/app/customer/hdl/hdl_enterprise.go @@ -92,7 +92,8 @@ func EnterpriseInfo(c *gin.Context) { sysCfgDb := db.SysCfgDb{} sysCfgDb.Set() - res := sysCfgDb.SysCfgFindWithDb(enum.AdministratorContactInfo, enum.CentralKitchenForSchoolReserveMealTime, enum.CentralKitchenForSchoolCancelMealTime, enum.NursingHomeReserveMealTime, enum.NursingHomeCancelMealTime) + res := sysCfgDb.SysCfgFindWithDb(enum.AdministratorContactInfo, enum.CentralKitchenForSchoolReserveMealTime, enum.CentralKitchenForSchoolCancelMealTime, + enum.CentralKitchenForSchoolCancelMealTimeForBreakfast, enum.CentralKitchenForSchoolCancelMealTimeForLunch, enum.CentralKitchenForSchoolCancelMealTimeForDinner) e.OutSuc(c, map[string]interface{}{ "info": resp, "set_center": res, diff --git a/app/customer/svc/order/svc_central_kitchen_for_school_order.go b/app/customer/svc/order/svc_central_kitchen_for_school_order.go index 7caf6ec..2520387 100644 --- a/app/customer/svc/order/svc_central_kitchen_for_school_order.go +++ b/app/customer/svc/order/svc_central_kitchen_for_school_order.go @@ -77,10 +77,6 @@ func OrderStatistic(req md.CentralKitchenForSchoolOrderListReq, platform string) func CentralKitchenForSchoolOrderRefund(req md.CentralKitchenForSchoolOrderRefundReq) (err error) { sysCfgDb := db.SysCfgDb{} sysCfgDb.Set() - cfg, err := sysCfgDb.SysCfgGetOne(enum.CentralKitchenForSchoolCancelMealTime) - if err != nil { - return - } centralKitchenForSchoolUserWithDayDb := db.CentralKitchenForSchoolUserWithDayDb{} centralKitchenForSchoolUserWithDayDb.Set(0) @@ -103,7 +99,6 @@ func CentralKitchenForSchoolOrderRefund(req md.CentralKitchenForSchoolOrderRefun today, _ := time.ParseInLocation("2006-01-02", time.Now().Format("2006-01-02"), time.Local) tomorrowDay := today.AddDate(0, 0, 1) - centralKitchenForSchoolCancelMealTime, _ := time.ParseInLocation("2006-01-02 15:04:05", now.Format("2006-01-02")+" "+cfg.Val+":00", time.Local) date, _ := time.ParseInLocation("2006-01-02", centralKitchenForSchoolUserWithDay.Date, time.Local) if today.After(date) || today.Equal(date) { //2.2、判断是否小于今天 @@ -112,6 +107,28 @@ func CentralKitchenForSchoolOrderRefund(req md.CentralKitchenForSchoolOrderRefun } if tomorrowDay.Equal(date) { //2.3、判断是否过了明日可订餐时间 + var centralKitchenForSchoolCancelMealTime time.Time + var cfg *model.SysCfg + if centralKitchenForSchoolUserWithDay.Kind == enum.CentralKitchenForSchoolUserWithDayKindForBreakfast { + cfg, err = sysCfgDb.SysCfgGetOne(enum.CentralKitchenForSchoolCancelMealTimeForBreakfast) + if err != nil { + return err + } + } + if centralKitchenForSchoolUserWithDay.Kind == enum.CentralKitchenForSchoolUserWithDayKindForLunch { + cfg, err = sysCfgDb.SysCfgGetOne(enum.CentralKitchenForSchoolCancelMealTimeForLunch) + if err != nil { + return err + } + } + if centralKitchenForSchoolUserWithDay.Kind == enum.CentralKitchenForSchoolUserWithDayKindForDinner { + cfg, err = sysCfgDb.SysCfgGetOne(enum.CentralKitchenForSchoolCancelMealTimeForDinner) + if err != nil { + return err + } + } + + centralKitchenForSchoolCancelMealTime, _ = time.ParseInLocation("2006-01-02 15:04:05", now.Format("2006-01-02")+" "+cfg.Val+":00", time.Local) if now.After(centralKitchenForSchoolCancelMealTime) { err = errors.New("当前订餐不在可退订时间范围内") return diff --git a/app/db/db_meal_label.go b/app/db/db_meal_label.go new file mode 100644 index 0000000..f3c7183 --- /dev/null +++ b/app/db/db_meal_label.go @@ -0,0 +1,70 @@ +package db + +import ( + "applet/app/db/model" + "applet/app/utils/logx" + "reflect" + "xorm.io/xorm" +) + +type MealLabelDb struct { + Db *xorm.Engine `json:"db"` + EnterpriseId int `json:"enterprise_id"` +} + +func (MealLabelDb *MealLabelDb) Set(enterpriseId int) { // set方法 + MealLabelDb.Db = Db + MealLabelDb.EnterpriseId = enterpriseId +} + +func (MealLabelDb *MealLabelDb) FindMealLabel(periodId int) (*[]model.MealLabel, error) { + var m []model.MealLabel + if err := MealLabelDb.Db.Desc("id").Where("enterprise_id =?", MealLabelDb.EnterpriseId).And("period_id =?", periodId).Find(&m); err != nil { + return nil, logx.Error(err) + } + return &m, nil +} + +func (MealLabelDb *MealLabelDb) MealLabelDeleteBySession(id interface{}) (int64, error) { + if reflect.TypeOf(id).Kind() == reflect.Slice { + return MealLabelDb.Db.In("id", id).Delete(model.MealLabel{}) + } else { + return MealLabelDb.Db.Where("id = ?", id).Delete(model.MealLabel{}) + } +} + +func (MealLabelDb *MealLabelDb) ClassDeleteBySessionForEnterprise(session *xorm.Session, enterpriseId interface{}) (int64, error) { + if reflect.TypeOf(enterpriseId).Kind() == reflect.Slice { + return session.In("enterprise_id", enterpriseId).Delete(model.MealLabel{}) + } else { + return session.Where("enterprise_id = ?", enterpriseId).Delete(model.MealLabel{}) + } +} + +func (MealLabelDb *MealLabelDb) MealLabelInsert(m *model.MealLabel) (int, error) { + _, err := MealLabelDb.Db.InsertOne(m) + if err != nil { + return 0, err + } + return m.Id, nil +} + +func (MealLabelDb *MealLabelDb) MealLabelUpdate(m *model.MealLabel, columns ...string) (int64, error) { + affected, err := MealLabelDb.Db.Where("id =?", m.Id).Cols(columns...).Update(m) + if err != nil { + return 0, err + } + return affected, nil +} + +func (MealLabelDb *MealLabelDb) GetMealLabel(id int) (m *model.MealLabel, err error) { + m = new(model.MealLabel) + has, err := MealLabelDb.Db.Where("id =?", id).Get(m) + if err != nil { + return nil, logx.Error(err) + } + if has == false { + return nil, nil + } + return m, nil +} diff --git a/app/db/model/meal_label.go b/app/db/model/meal_label.go new file mode 100644 index 0000000..c51706a --- /dev/null +++ b/app/db/model/meal_label.go @@ -0,0 +1,12 @@ +package model + +type MealLabel struct { + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + Name string `json:"name" xorm:"not null default '' comment('名称') VARCHAR(255)"` + EnterpriseId int `json:"enterprise_id" xorm:"not null default 0 comment('单位id') INT(11)"` + PeriodId int `json:"period_id" xorm:"not null default 0 comment('学段id') INT(11)"` + Kind int32 `json:"kind" xorm:"not null default 0 comment('餐标类型(1:早餐 2:午餐 3:晚餐)') INT(11)"` + Price string `json:"price" xorm:"not null default 0.00 comment('单价') DECIMAL(4,2)"` + CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"` + UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"` +} diff --git a/app/enum/enum_sys_cfg.go b/app/enum/enum_sys_cfg.go index cf87828..dbea8f7 100644 --- a/app/enum/enum_sys_cfg.go +++ b/app/enum/enum_sys_cfg.go @@ -16,30 +16,33 @@ const ( OpenAppletAppPublicKey = "open_applet_app_public_key" OpenAppletPublicKey = "open_applet_public_key" - FileBucketHost = "file_bucket_host" - FileBucketRegion = "file_bucket_region" - FileBucketScheme = "file_bucket_scheme" - FileExt = "file_ext" - FileSecretKey = "file_secret_key" - FileUserUploadMaxSize = "file_user_upload_max_size" - FileAccessKey = "file_access_key" - FileBucket = "file_bucket" - AdministratorContactInfo = "administrator_contact_info" - CentralKitchenForSchoolReserveMealTime = "central_kitchen_for_school_reserve_meal_time" - CentralKitchenForSchoolCancelMealTime = "central_kitchen_for_school_cancel_meal_time" - NursingHomeReserveMealTime = "nursing_home_reserve_meal_time" - NursingHomeCancelMealTime = "nursing_home_cancel_meal_time" - JsapiPayAppAutToken = "jsapi_pay_app_auth_token" - JsapiPayNotifyUrl = "jsapi_pay_notify_url" - WxAppletAppId = "wx_applet_app_id" - WxAppletAppSecret = "wx_applet_app_secret" - WxMchId = "wx_mch_id" - WxSpMchApiV3Key = "wx_sp_mch_api_v3_key" - WxSpMchCertificateSerialNumber = "wx_sp_mch_certificate_serial_number" - WxSpAppId = "wx_sp_app_id" - WxSpMchId = "wx_sp_mch_id" - WxJsapiPayNotifyUrl = "wx_jsapi_pay_notify_url" - WxJsapiRefundPayNotifyUrl = "wx_jsapi_refund_pay_notify_url" + FileBucketHost = "file_bucket_host" + FileBucketRegion = "file_bucket_region" + FileBucketScheme = "file_bucket_scheme" + FileExt = "file_ext" + FileSecretKey = "file_secret_key" + FileUserUploadMaxSize = "file_user_upload_max_size" + FileAccessKey = "file_access_key" + FileBucket = "file_bucket" + AdministratorContactInfo = "administrator_contact_info" + CentralKitchenForSchoolReserveMealTime = "central_kitchen_for_school_reserve_meal_time" + CentralKitchenForSchoolCancelMealTime = "central_kitchen_for_school_cancel_meal_time" + CentralKitchenForSchoolCancelMealTimeForBreakfast = "central_kitchen_for_school_cancel_meal_time_for_breakfast" + CentralKitchenForSchoolCancelMealTimeForDinner = "central_kitchen_for_school_cancel_meal_time_for_dinner" + CentralKitchenForSchoolCancelMealTimeForLunch = "central_kitchen_for_school_cancel_meal_time_for_lunch" + NursingHomeReserveMealTime = "nursing_home_reserve_meal_time" + NursingHomeCancelMealTime = "nursing_home_cancel_meal_time" + JsapiPayAppAutToken = "jsapi_pay_app_auth_token" + JsapiPayNotifyUrl = "jsapi_pay_notify_url" + WxAppletAppId = "wx_applet_app_id" + WxAppletAppSecret = "wx_applet_app_secret" + WxMchId = "wx_mch_id" + WxSpMchApiV3Key = "wx_sp_mch_api_v3_key" + WxSpMchCertificateSerialNumber = "wx_sp_mch_certificate_serial_number" + WxSpAppId = "wx_sp_app_id" + WxSpMchId = "wx_sp_mch_id" + WxJsapiPayNotifyUrl = "wx_jsapi_pay_notify_url" + WxJsapiRefundPayNotifyUrl = "wx_jsapi_refund_pay_notify_url" ) func (gt SysCfg) String() string { @@ -88,6 +91,12 @@ func (gt SysCfg) String() string { return "央厨预定用餐时间" case CentralKitchenForSchoolCancelMealTime: return "央厨取消用餐时间" + case CentralKitchenForSchoolCancelMealTimeForBreakfast: + return "央厨取消用餐时间-早餐" + case CentralKitchenForSchoolCancelMealTimeForLunch: + return "央厨取消用餐时间-午餐" + case CentralKitchenForSchoolCancelMealTimeForDinner: + return "央厨取消用餐时间-晚餐" case NursingHomeReserveMealTime: return "养老院预定用餐时间" case NursingHomeCancelMealTime: diff --git a/app/router/admin_router.go b/app/router/admin_router.go index 0e708bf..8d49737 100644 --- a/app/router/admin_router.go +++ b/app/router/admin_router.go @@ -207,19 +207,21 @@ func rEnterpriseManage(r *gin.RouterGroup) { r.POST("/centralKitchenForSchoolOrderRefundList", hdl2.CentralKitchenForSchoolOrderRefundList) //"央厨-学校"订单退款列表 //r.POST("/centralKitchenForSchoolOrderRefundAudit", hdl2.CentralKitchenForSchoolOrderRefundAudit) //"央厨-学校"订单退款审核 - r.POST("/setBasicCentralKitchenForSchool", hdl.SetBasicCentralKitchenForSchool) //"央厨-学校"设置基础设置 - r.GET("/getBasicCentralKitchenForSchool", hdl.GetBasicCentralKitchenForSchool) //"央厨-学校"获取基础设置 - r.POST("/setCentralKitchenForSchoolWithSpecByTeacher", hdl.SetCentralKitchenForSchoolWithSpecByTeacher) //设置教师"央厨-学校-规格" - r.GET("/getCentralKitchenForSchoolWithSpecByTeacher", hdl.GetCentralKitchenForSchoolWithSpecByTeacher) //获取教师"央厨-学校-规格" - r.POST("/setCentralKitchenForSchoolWithSpecByPeriod", hdl.SetCentralKitchenForSchoolWithSpecByPeriod) //设置学段"央厨-学校-规格" - r.POST("/listCentralKitchenForSchoolPackage", hdl.ListCentralKitchenForSchoolPackage) //"央厨-学校-套餐" 列表 - r.GET("/detailCentralKitchenForSchoolPackage", hdl.DetailCentralKitchenForSchoolPackage) //"央厨-学校-套餐" 详情 - r.POST("/saveCentralKitchenForSchoolPackage", hdl.SaveCentralKitchenForSchoolPackage) //新增/编辑 "央厨-学校-套餐" - r.DELETE("/deleteCentralKitchenForSchoolPackage/:id", hdl.DeleteCentralKitchenForSchoolPackage) //删除 "央厨-学校-套餐" + r.POST("/setBasicCentralKitchenForSchool", hdl.SetBasicCentralKitchenForSchool) //"央厨-学校"设置基础设置 + r.GET("/getBasicCentralKitchenForSchool", hdl.GetBasicCentralKitchenForSchool) //"央厨-学校"获取基础设置 + r.POST("/setCentralKitchenForSchoolWithSpecByTeacher", hdl.SetCentralKitchenForSchoolWithSpecByTeacher) //设置教师"央厨-学校-规格" + r.GET("/getCentralKitchenForSchoolWithSpecByTeacher", hdl.GetCentralKitchenForSchoolWithSpecByTeacher) //获取教师"央厨-学校-规格" + r.POST("/setCentralKitchenForSchoolWithSpecByPeriod", hdl.SetCentralKitchenForSchoolWithSpecByPeriod) //设置学段"央厨-学校-规格" + r.GET("/getCentralKitchenForSchoolWithSpecByMealLabel", hdl.GetCentralKitchenForSchoolWithSpecByMealLabel) //获取学段"央厨-学校-餐标规格" + r.POST("/setCentralKitchenForSchoolWithSpecByMealLabel", hdl.SetCentralKitchenForSchoolWithSpecByMealLabel) //设置学段"央厨-学校-餐标规格" + r.POST("/listCentralKitchenForSchoolPackage", hdl.ListCentralKitchenForSchoolPackage) //"央厨-学校-套餐" 列表 + r.GET("/detailCentralKitchenForSchoolPackage", hdl.DetailCentralKitchenForSchoolPackage) //"央厨-学校-套餐" 详情 + r.POST("/saveCentralKitchenForSchoolPackage", hdl.SaveCentralKitchenForSchoolPackage) //新增/编辑 "央厨-学校-套餐" + r.DELETE("/deleteCentralKitchenForSchoolPackage/:id", hdl.DeleteCentralKitchenForSchoolPackage) //删除 "央厨-学校-套餐" r.POST("/selfSupportForSchool/userUpdate", hdl.SelfSupportForSchoolUserUpdate) //"自营-学校"用户编辑 r.POST("/selfSupportForSchool/userDelete", hdl.SelfSupportForSchoolUserDelete) //"自营-学校"用户删除 - r.POST("/selfSupportForSchool/studentList", hdl.SelfSupportForSchoolStudentList) //"自营-学校"学生列表 + r.POST("/selfSupportForSchool/studentList", hdl.SelfSupportForSchoolStudentList) //"自营-学校"学表 r.POST("/selfSupportForSchool/studentUpdate", hdl.SelfSupportForSchoolStudentUpdate) //"自营-学校"学生编辑 r.POST("/selfSupportForSchool/studentDelete", hdl.SelfSupportForSchoolStudentDelete) //"自营-学校"学生删除 r.POST("/selfSupportForSchool/studentAdmission", hdl.SelfSupportForSchoolStudentAdmission) //"自营-学校"学生升学