|
|
|
@ -374,8 +374,12 @@ func (s *Rpc) UpdateBaseOrganization(ctx context.Context, in *BaseOrganizationPr
|
|
|
|
|
model.MainSchoolType = 1
|
|
|
|
|
//查看它有没有父校?
|
|
|
|
|
list := SqlKit.QueryByIds([]string{in.OrgId}, "t_base_organization")
|
|
|
|
|
if list == nil || len(list) == 0 {
|
|
|
|
|
reply.Success = false
|
|
|
|
|
reply.Message = "没有找到此OrgId!"
|
|
|
|
|
return &reply, err
|
|
|
|
|
}
|
|
|
|
|
mainSchoolId := list[0]["main_school_id"]
|
|
|
|
|
|
|
|
|
|
if mainSchoolId != "" {
|
|
|
|
|
//如果有父校,父校ID是不是还有其它孩子
|
|
|
|
|
count, err := BaseOrganizationDao.GetChildSchoolCount(mainSchoolId.(string))
|
|
|
|
|