diff --git a/app/admin/hdl/hdl_enterprise.go b/app/admin/hdl/hdl_enterprise.go index 94b4df2..56e52f5 100644 --- a/app/admin/hdl/hdl_enterprise.go +++ b/app/admin/hdl/hdl_enterprise.go @@ -118,6 +118,21 @@ func SchoolBelowGrade(c *gin.Context) { return } +func PeriodBelowGrade(c *gin.Context) { + periodId := c.DefaultQuery("period_id", "") + gradeDb := db.GradeDb{} + gradeDb.Set(0) + gradeList, err := gradeDb.FindGradeByPeriodId(utils.StrToInt(periodId)) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + e.OutSuc(c, map[string]interface{}{ + "list": gradeList, + }, nil) + return +} + func SchoolBelowPeriod(c *gin.Context) { enterpriseId := c.DefaultQuery("enterprise_id", "") periodDb := db.PeriodDb{} diff --git a/app/router/admin_router.go b/app/router/admin_router.go index da6ebda..4e9cd38 100644 --- a/app/router/admin_router.go +++ b/app/router/admin_router.go @@ -142,6 +142,7 @@ func rEnterprise(r *gin.RouterGroup) { r.POST("/addGrade", hdl2.EnterpriseAddGrade) r.GET("/detail", hdl2.Detail) r.GET("/schoolBelowPeriod", hdl2.SchoolBelowPeriod) //"学校"下学段 + r.GET("/periodBelowGrade", hdl2.PeriodBelowGrade) //"学段"下年级 r.GET("/schoolBelowGrade", hdl2.SchoolBelowGrade) //"学校"下年级 r.GET("/schoolGradeBelowClass", hdl2.SchoolGradeBelowClass) //"学校"年级下班级 r.POST("/setCentralKitchenForSchoolWithSpecForSystem", hdl2.SetCentralKitchenForSchoolWithSpecForSystem) //"央厨-学校-套餐-系统" 价格设置