|
|
@@ -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) |
|
|
|