📜  堆栈溢出 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:39.190000             🧑  作者: Mango

代码示例10
@Service
public class EntryTerminalServiceImpl implements EntryTerminalService {

    private final EntryTerminalRepository entryTerminalRepository;

    @Autowired
    public EntryTerminalServiceImpl(EntryTerminalRepository entryTerminalRepository) {
        this.entryTerminalRepository = entryTerminalRepository;
    }

    @Override
    public Page getEntryTerminalEventsLog(Pageable pageable) {
        return entryTerminalRepository.findAllByOrderByIdDesc(pageable);
    }

    @Override
    public void saveEntryTerminalEventToLog(EntryTerminal entryTerminal) {
        entryTerminalRepository.save(entryTerminal);
    }

}