@Override public Page<EnterpriseIntro> findAllIntroByEnterprise( int pageNum, int pageSize, Enterprise enterprise) { Pageable dateDesc = new PageRequest(pageNum, pageSize, Direction.DESC, "id"); Page<EnterpriseIntro> onePage = introRepository.findIntroByEnterprise(enterprise, dateDesc); return onePage; }
@Override public List<EnterpriseIntro> getAllIntroById(Long id) { // TODO Auto-generated method stub return introRepository.getAllIntroById(id); }
@Override public EnterpriseIntro update(EnterpriseIntro enterpriseIntro) { // TODO Auto-generated method stub return introRepository.save(enterpriseIntro); }
@Override public EnterpriseIntro findOneById(Long id) { // TODO Auto-generated method stub return introRepository.findOne(id); }
@Override public EnterpriseIntro save(EnterpriseIntro enterpriseIntro, Enterprise enterprise) { enterpriseIntro.setEnterprise(enterprise); return introRepository.save(enterpriseIntro); }