sort asc
来源:7-4 分类表格显示优化

一娆Hacker
2022-07-16
这个方法啥意思呀
public List all(CategoryQueryReq req) {
CategoryExample categoryExample = new CategoryExample();
categoryExample.setOrderByClause(“sort asc”);
List categoryList = categoryMapper.selectByExample(categoryExample);
//列表复制
List list = CopyUtil.copyList(categoryList, CategoryQueryResp.class);
return list;
}
写回答
1回答
-
甲蛙
2022-07-18
这是mysql的语法,order by sort asc,表示根据sort这个字段正序排列,换成desc则表示倒序排列
032022-11-07
相似问题