Browse Source

update

add_mode
DengBiao 1 year ago
parent
commit
0447af0530
2 changed files with 21 additions and 0 deletions
  1. +20
    -0
      app/admin/hdl/enterprise_manage/hdl_self_support_for_school.go
  2. +1
    -0
      app/router/admin_router.go

+ 20
- 0
app/admin/hdl/enterprise_manage/hdl_self_support_for_school.go View File

@@ -587,6 +587,26 @@ func SelfSupportForSchoolClassDelete(c *gin.Context) {
return
}

func SelfSupportForSchoolClassDeleteCheck(c *gin.Context) {
classId := c.Param("id")
classWithUserDb := db.ClassWithUserDb{}
classWithUserDb.Set()
classWithUsers, err := classWithUserDb.FindUserIdentity(classId)
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}
var isHasStudent = false
if len(*classWithUsers) > 0 {
isHasStudent = true
}

e.OutSuc(c, map[string]interface{}{
"is_has_student": isHasStudent,
}, nil)
return
}

func SelfSupportForSchoolAddWorker(c *gin.Context) {
var req md.SelfSupportForSchoolAddWorkerReq
err := c.ShouldBindJSON(&req)


+ 1
- 0
app/router/admin_router.go View File

@@ -211,6 +211,7 @@ func rEnterpriseManage(r *gin.RouterGroup) {
r.DELETE("/selfSupportForSchool/gradeDelete/:id", hdl.SelfSupportForSchoolGradeDelete) //"自营-学校"年级删除
r.POST("/selfSupportForSchool/classList", hdl.SelfSupportForSchoolClassList) //"自营-学校"班级列表
r.DELETE("/selfSupportForSchool/classDelete/:id", hdl.SelfSupportForSchoolClassDelete) //"自营-学校"班级删除
r.DELETE("/selfSupportForSchool/classDeleteCheck/:id", hdl.SelfSupportForSchoolClassDeleteCheck) //"自营-学校"班级删除
r.POST("/selfSupportForSchool/addStudent", hdl.SelfSupportForSchoolAddStudent) //"自营-学校"添加学生
r.POST("/selfSupportForSchool/addWorker", hdl.SelfSupportForSchoolAddWorker) //"自营-学校"添加工作人员
r.POST("/selfSupportForSchool/addTeacher", hdl.SelfSupportForSchoolAddTeacher) //"自营-学校"添加老师


Loading…
Cancel
Save