public void deleteEP(ActionRequest request, ActionResponse response) throws PortalException, SystemException, IOException {
long deleteId = ParamUtil.getLong(request, AppRole2JobPosKeys.BaseAppRole2JobPosAttributes.DELETE_ID, PortletKeys.LONG_DEFAULT);
try {
AppRole2Employee a2e = AppRole2EmployeeLocalServiceUtil.getAppRole2Employee(deleteId);
if (a2e != null) {
try {
AppRole role = AppRoleLocalServiceUtil.getAppRole(a2e.getAppRoleId());
UserSync userSync = UserSyncLocalServiceUtil.findByApplicationEmployee(role.getApplicationId(), a2e.getEmployeeId());
userSync.setCheckpoint(new Date());
userSync.setAccessibleStatus(0);
UserSyncLocalServiceUtil.updateUserSync(userSync);
}
catch (Exception e) {
e.printStackTrace();
}
}
AppRole2EmployeeLocalServiceUtil.removeAppRole2Employee(deleteId);
SessionMessages.add(request, AssignRoleKeys.SuccessMessageKeys.ORG_OEP_SSOMGT_PORTLET_APPROLE_ASSIGNROLE2EMPLOYEE_SUCCESS_DELETE);
}
catch (Exception ex) {
SessionMessages.add(request, AssignRoleKeys.ErrorMessageKeys.ORG_OEP_SSOMGT_PORTLET_APPROLE_ASSIGNROLE2EMPLOYEE_ERROR_DELETE);
}
response.sendRedirect(ParamUtil.getString(request, PortletKeys.REDIRECT_PAGE));
}
AppRolePortlet.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:OEPv2
作者:
评论列表
文章目录