@Override public FunctionInfoBO findById(Long id) { if (id == null) { return null; } FunctionInfo info = functionInfoMapper.findById(id); FunctionInfoBO functionInfoBO = convertToEntityFrom.convertToFunctionInfoBO(info); return functionInfoBO; }
@Override public EUDGPagination getFunctionPage(Map<String, Object> params, int pageNo, int pageSize) { pageNo = pageNo < 1 ? 1 : pageNo; pageSize = pageSize < 1 ? 10 : pageSize; int count = functionInfoMapper.findCountByCriteria(params); RowBounds rowBounds = new RowBounds((pageNo - 1) * pageSize, pageSize); List<FunctionInfo> list = functionInfoMapper.findPageListByCriteria(params, rowBounds); List<FunctionInfoBO> boList = new ArrayList<FunctionInfoBO>(); for (FunctionInfo info : list) { FunctionInfoBO bo = convertToEntityFrom.convertToFunctionInfoBO(info); boList.add(bo); } EUDGPagination page = new EUDGPagination(count, boList); return page; }