Bladeren bron

update

add_mode
DengBiao 1 jaar geleden
bovenliggende
commit
0447af0530
2 gewijzigde bestanden met toevoegingen van 21 en 0 verwijderingen
  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 Bestand weergeven

@@ -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 Bestand weergeven

@@ -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) //"自营-学校"添加老师


Laden…
Annuleren
Opslaan