StringupdateAuthUser="update auth_user a inner join sso_user b on (a.user_name=b.employeenumber and b.adid is not null ) set a.eid =b.adid";
StringdeleteOrganMccl="delete from sso_organ_mccl";
StringdeleteOrganMccl="delete from sso_organ_mccl";
StringdeleteUserMccl="delete from sso_user_mccl";
StringdeleteUserMccl="delete from sso_user_mccl";
StringinsertOrganMccl="insert into sso_organ_mccl select * from sso_organ so where organizationname like '%MCCL%' or organizationid ='"+organRootId+"'";
StringinsertOrganMccl="insert into sso_organ_mccl select * from sso_organ so where organizationname like '%MCCL%' or organizationid ='"+organRootId+"'";
...
@@ -203,6 +235,7 @@ public class PeopleCenterApi {
...
@@ -203,6 +235,7 @@ public class PeopleCenterApi {
" set a.path=b.path, "+
" set a.path=b.path, "+
" a.idpath=b.idpath "+
" a.idpath=b.idpath "+
" where a.path is null and b.path is not null";
" where a.path is null and b.path is not null";
st.executeUpdate(updateAuthUser);
st.executeUpdate(deleteOrganMccl);
st.executeUpdate(deleteOrganMccl);
st.executeUpdate(deleteUserMccl);
st.executeUpdate(deleteUserMccl);
st.executeUpdate(insertOrganMccl);
st.executeUpdate(insertOrganMccl);
...
@@ -219,8 +252,9 @@ public class PeopleCenterApi {
...
@@ -219,8 +252,9 @@ public class PeopleCenterApi {
}
}
}
}
st.executeUpdate(updateUserPathSql);
st.executeUpdate(updateUserPathSql);
}catch(SQLExceptionthrowables){
log.info("完成Mccl同步");
throwables.printStackTrace();
}catch(Exceptione){
log.error("mccl同步失败",e);
}
}
}
}
...
@@ -251,15 +285,36 @@ public class PeopleCenterApi {
...
@@ -251,15 +285,36 @@ public class PeopleCenterApi {