LabRecord实现类

master
17727267930 5 years ago
parent 69366c22cc
commit e80db2bd1d

@ -0,0 +1,48 @@
package com.hzu.bookingsystem.service.impl;
import com.hzu.bookingsystem.bean.LabRecord;
import com.hzu.bookingsystem.repository.LabRecordRepository;
import com.hzu.bookingsystem.service.LabRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import javax.transaction.Transactional;
import java.util.List;
@Service
public class LabRecordServiceImpl implements LabRecordService{
@Resource
private LabRecordRepository labrecordRepository;
@Override
public LabRecord add(LabRecord labrcecord) {
return labrecordRepository.save(labrcecord);
}
@Override
public List<LabRecord> findAll() {
return labrecordRepository.findAll();
}
@Override
public List<LabRecord> findByStatus(Integer status) {
return labrecordRepository.findByStatus(status);
}
@Override
public LabRecord findById(Integer lr_id) {
return labrecordRepository.findByLrId(lr_id);
}
@Override
public LabRecord update(LabRecord labrcecord) {
return labrecordRepository.save(labrcecord);
}
@Override
@Transactional
public void deleteById(Integer lr_id) {
labrecordRepository.deleteBylrId(lr_id);
}
}
Loading…
Cancel
Save