|
|
@@ -492,22 +492,34 @@ public class PartyEmployeeProvider extends GenericProvider implements IPartyEmpl
|
|
|
logger.debug("com.lc.ibps.platform.org.controller.PartyRoleController.queryUsersByRoleId()--->roleId="+roleId);
|
|
|
|
|
|
QueryFilter queryFilter=getQueryFilter(request);
|
|
|
- StopWatchUtil.stopAndStartNewLocal(localId, step, "defaultpartyUserRepository.findUserByRoleId");
|
|
|
- String ids = defaultpartyUserRepository.findUserByRoleId(roleId);//TODO 性能问题
|
|
|
-
|
|
|
- if(StringUtil.isNotBlank(ids)) {
|
|
|
- //TODO 用户量太大时SQL会报错
|
|
|
- queryFilter.addFilter("ID_", ids, QueryOP.IN);
|
|
|
- StopWatchUtil.stopAndStartNewLocal(localId, step, "partyEmployeeRepository.query");
|
|
|
- List<PartyEmployeePo> list = partyEmployeeRepository.query(queryFilter);//TODO 性能问题
|
|
|
- //构建用户来源信息
|
|
|
- StopWatchUtil.stopAndStartNewLocal(localId, step, "PartyRoleBuilder.buildPartyEmployeeSource");
|
|
|
- list = PartyRoleBuilder.buildPartyEmployeeSource(list, roleId);//TODO 性能问题
|
|
|
-
|
|
|
- StopWatchUtil.stopAndStartNewLocal(localId, step, "getAPIPageList");
|
|
|
- APIPageList<PartyEmployeePo> employeeList = getAPIPageList(list);
|
|
|
- result.setData(employeeList);
|
|
|
+ queryFilter.addParamsFilter("roleId", roleId);
|
|
|
+ if (request.getCustoms()!=null){
|
|
|
+ queryFilter.addParamsFilter("position", "%" + request.getCustoms().get("position") + "%");
|
|
|
}
|
|
|
+ List<PartyEmployeePo> list = partyEmployeeRepository.query(queryFilter);//TODO 性能问题
|
|
|
+ //构建用户来源信息
|
|
|
+ StopWatchUtil.stopAndStartNewLocal(localId, step, "PartyRoleBuilder.buildPartyEmployeeSource");
|
|
|
+ list = PartyRoleBuilder.buildPartyEmployeeSource(list, roleId);//TODO 性能问题
|
|
|
+
|
|
|
+// StopWatchUtil.stopAndStartNewLocal(localId, step, "defaultpartyUserRepository.findUserByRoleId");
|
|
|
+// String ids = defaultpartyUserRepository.findUserByRoleId(roleId);//TODO 性能问题
|
|
|
+//
|
|
|
+// if(StringUtil.isNotBlank(ids)) {
|
|
|
+// //TODO 用户量太大时SQL会报错
|
|
|
+// queryFilter.addFilter("ID_", ids, QueryOP.IN);
|
|
|
+// StopWatchUtil.stopAndStartNewLocal(localId, step, "partyEmployeeRepository.query");
|
|
|
+// List<PartyEmployeePo> list = partyEmployeeRepository.query(queryFilter);//TODO 性能问题
|
|
|
+// //构建用户来源信息
|
|
|
+// StopWatchUtil.stopAndStartNewLocal(localId, step, "PartyRoleBuilder.buildPartyEmployeeSource");
|
|
|
+// list = PartyRoleBuilder.buildPartyEmployeeSource(list, roleId);//TODO 性能问题
|
|
|
+//
|
|
|
+// StopWatchUtil.stopAndStartNewLocal(localId, step, "getAPIPageList");
|
|
|
+// APIPageList<PartyEmployeePo> employeeList = getAPIPageList(list);
|
|
|
+// result.setData(employeeList);
|
|
|
+// }
|
|
|
+ StopWatchUtil.stopAndStartNewLocal(localId, step, "getAPIPageList");
|
|
|
+ APIPageList<PartyEmployeePo> employeeList = getAPIPageList(list);
|
|
|
+ result.setData(employeeList);
|
|
|
} catch (Exception e) {
|
|
|
setExceptionResult(result, StateEnum.ERROR_EMPLOYEE.getCode(), I18nUtil.getMessage(StateEnum.ERROR_EMPLOYEE.getCode()+""), e);
|
|
|
}
|