使用stream流优化下面代码public ListInteger findIdentitiesfinal String empCode final ListInteger roles = ListsnewArrayList; if activityAppraiseeServiceexistByEmpCodeempCode rolesaddUs
public List
private boolean isUserTypeExist(String empCode, UserTypeEnum userType) {
if (userType == UserTypeEnum.APPRAISEE) {
return activityAppraiseeService.existByEmpCode(empCode);
} else if (userType == UserTypeEnum.EXAMINER) {
return activityExaminerService.existByEmpCode(empCode);
}
return false;
原文地址: http://www.cveoy.top/t/topic/hCqf 著作权归作者所有。请勿转载和采集!