@Test public void getLogs() { String message = "put your face to the light!"; String authority = "查看lin的信息"; Long userId = 100L; String userName = "pedro"; String method = "GET"; String path = "/"; Integer status = 200; logService.createLog(message, authority, userId, userName, method, path, status); IPage<LogDO> iPage = logService.getLogs(0L, 10L, null, null, null); assertTrue(iPage.getSize() > 0); }
@Override public IPage<LogDO> getLogs(Long page, Long count, String name, Date start, Date end) { Page<LogDO> pager = new Page<>(page, count); IPage<LogDO> iPage = this.baseMapper.findLogsByUsernameAndRange(pager, name, start, end); return iPage; }
LogServiceImpl extends ServiceImpl<LogMapper, LogDO> implements LogService { @Override public IPage<LogDO> getLogs(Long page, Long count, String name, Date start, Date end) { Page<LogDO> pager = new Page<>(page, count); IPage<LogDO> iPage = this.baseMapper.findLogsByUsernameAndRange(pager, name, start, end); return iPage; } }
LogServiceImpl extends ServiceImpl<LogMapper, LogDO> implements LogService { @Override public IPage<LogDO> getLogs(Long page, Long count, String name, Date start, Date end) { Page<LogDO> pager = new Page<>(page, count); IPage<LogDO> iPage = this.baseMapper.findLogsByUsernameAndRange(pager, name, start, end); return iPage; }  }
LogServiceImpl extends ServiceImpl<LogMapper, LogDO> implements LogService { @Override public IPage<LogDO> getLogs(Long page, Long count, String name, Date start, Date end) { Page<LogDO> pager = new Page<>(page, count); IPage<LogDO> iPage = this.baseMapper.findLogsByUsernameAndRange(pager, name, start, end); return iPage; }  @Override IPage<LogDO> getLogs(Long page, Long count, String name, Date start, Date end); @Override IPage<LogDO> searchLogs(Long page, Long count, String name, String keyword, Date start, Date end); @Override IPage<String> getUserNames(Long page, Long count); @Override boolean createLog(String message, String permission, Long userId, String username, String method, String path, Integer status); }
LogServiceImpl extends ServiceImpl<LogMapper, LogDO> implements LogService { @Override public IPage<LogDO> getLogs(Long page, Long count, String name, Date start, Date end) { Page<LogDO> pager = new Page<>(page, count); IPage<LogDO> iPage = this.baseMapper.findLogsByUsernameAndRange(pager, name, start, end); return iPage; }  @Override IPage<LogDO> getLogs(Long page, Long count, String name, Date start, Date end); @Override IPage<LogDO> searchLogs(Long page, Long count, String name, String keyword, Date start, Date end); @Override IPage<String> getUserNames(Long page, Long count); @Override boolean createLog(String message, String permission, Long userId, String username, String method, String path, Integer status);  }