作者 yangfu

fix: 部门判断修改

... ... @@ -126,11 +126,12 @@ func (ptr *PgBatchAddUserService) BatchAddUser(optUser *domain.OperateInfo, user
failRows = append(failRows, user)
continue
}
if dep != nil && !dep.IsChild(optUser.OrgId) {
user.FailReason = fmt.Sprintf("导入的所属部门不是当前登录组织(%v)的子部门:%v", optUserOrg.OrgName, user.Department)
failRows = append(failRows, user)
continue
}
//TODO:子部门判断
//if dep != nil && !dep.IsChild(optUser.OrgId) {
// user.FailReason = fmt.Sprintf("导入的所属部门不是当前登录组织(%v)的子部门:%v", optUserOrg.OrgName, user.Department)
// failRows = append(failRows, user)
// continue
//}
newUser := &domain.User{
CompanyId: user.CompanyId,
UserType: user.UserType,
... ...