| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | }catch (Exception e){ |
| | | throw new ErrorException(e.getMessage()); |
| | | } |
| | | return companies.stream().filter(ob->{ |
| | | /*return companies.stream().filter(ob->{ |
| | | if(ob.getStatus().equals("enabled")) return true; |
| | | return false; |
| | | }).collect(Collectors.toList()); |
| | | }).collect(Collectors.toList());*/ |
| | | return companies; |
| | | } |
| | | |
| | | public List<Person> userUrl(String companyId) { |
| | |
| | | throw new ErrorException(e.getMessage()); |
| | | } |
| | | return person.stream().filter(ob->{ |
| | | if(Objects.equals(ob.getStatus(), "enabled")) { |
| | | ob.setIsLive(userMapper.selectCount(Wrappers.<User>lambdaQuery().eq(User::getAccount, ob.getEmployeeID()))); |
| | | return true; |
| | | } |
| | | return false; |
| | | ob.setIsLive(userMapper.selectCount(Wrappers.<User>lambdaQuery().eq(User::getAccount, ob.getEmployeeID()))); |
| | | return true; |
| | | }).collect(Collectors.toList()); |
| | | } |
| | | |