Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

点击列表中的标题排序时,结果排序不理想 #27

Closed
songlai opened this issue Apr 1, 2013 · 1 comment
Closed

点击列表中的标题排序时,结果排序不理想 #27

songlai opened this issue Apr 1, 2013 · 1 comment
Labels

Comments

@songlai
Copy link

songlai commented Apr 1, 2013

应该在Page类中判断是否有addOrder,有的话应该将默认排序remove,否则结果不是自己要的排序方式。

@thinkgem
Copy link
Collaborator

thinkgem commented Apr 2, 2013

移除默认排序条件,建议在service层控制,如:
if (!StringUtils.isNotEmpty(page.getOrderBy())){
dc.addOrder(Order.asc("area.code")).addOrder(Order.asc("office.code"));
}

@thinkgem thinkgem closed this as completed Apr 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant