不啰嗦,上菜
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.select("DISTINCT no,name").orderByAsc("no");
return mapper.selectList(queryWrapper);
PS:
顺便一提,指明查询出后的结果输出类型,可以参考如下:
QueryWrapper<TablePo> queryWrapper = new QueryWrapper<>();
queryWrapper.select("DISTINCT no,name").orderByAsc("no");
return mapper.selectList(queryWrapper);