mirror of
https://github.com/chatopera/cosin.git
synced 2025-08-01 16:38:02 +08:00
Replace new Sort() with Sort.by()
This commit is contained in:
parent
4c4809cce1
commit
04d6100c6d
@ -153,14 +153,14 @@ public class AgentAuditController extends Handler {
|
||||
criterias.add(new Sort.Order(Sort.Direction.DESC, "status"));
|
||||
criterias.add(new Sort.Order(Sort.Direction.DESC, "createtime"));
|
||||
} else if (sort.equals("default")) {
|
||||
defaultSort = new Sort(Sort.Direction.DESC, "status");
|
||||
defaultSort = Sort.by(Sort.Direction.DESC, "status");
|
||||
}
|
||||
if (criterias.size() > 0) {
|
||||
defaultSort = new Sort(criterias);
|
||||
defaultSort = Sort.by(criterias);
|
||||
map.addAttribute("sort", sort);
|
||||
}
|
||||
} else {
|
||||
defaultSort = new Sort(Sort.Direction.DESC, "status");
|
||||
defaultSort = Sort.by(Sort.Direction.DESC, "status");
|
||||
}
|
||||
|
||||
// 坐席对话列表
|
||||
@ -215,7 +215,7 @@ public class AgentAuditController extends Handler {
|
||||
final String orgi = super.getOrgi(request);
|
||||
final User logined = super.getUser(request);
|
||||
|
||||
Sort defaultSort = new Sort(Sort.Direction.DESC, "status");
|
||||
Sort defaultSort = Sort.by(Sort.Direction.DESC, "status");
|
||||
|
||||
// 坐席对话列表
|
||||
List<AgentUser> agentUsers;
|
||||
@ -246,7 +246,7 @@ public class AgentAuditController extends Handler {
|
||||
ModelAndView view = request(super.createRequestPageTempletResponse("/apps/cca/agentusers"));
|
||||
User logined = super.getUser(request);
|
||||
final String orgi = super.getOrgi(request);
|
||||
Sort defaultSort = new Sort(Sort.Direction.DESC, "status");
|
||||
Sort defaultSort = Sort.by(Sort.Direction.DESC, "status");
|
||||
view.addObject(
|
||||
"agentUserList", agentUserRes.findByOrgiAndStatusAndAgentnoIsNot(
|
||||
orgi, MainContext.AgentUserStatusEnum.INSERVICE.toString(), logined.getId(), defaultSort));
|
||||
|
@ -263,7 +263,7 @@
|
||||
User logined = super.getUser(request);
|
||||
view.addObject(
|
||||
"agentUserList", agentUserRes.findByAgentnoAndOrgi(logined.getId(), logined.getOrgi(),
|
||||
new Sort(Direction.DESC, "status")));
|
||||
Sort.by(Direction.DESC, "status")));
|
||||
List<AgentUser> agentUserList = agentUserRes.findByUseridAndOrgi(userid, logined.getOrgi());
|
||||
view.addObject(
|
||||
"curagentuser", agentUserList != null && agentUserList.size() > 0 ? agentUserList.get(0) : null);
|
||||
@ -300,11 +300,7 @@
|
||||
ModelAndView view = request(super.createRequestPageTempletResponse(mainagentuserconter));
|
||||
ChatMessage labelid = this.chatMessageRes.findById(iconid);
|
||||
if (labelid != null) {
|
||||
if (labelid.isIslabel() == false) {
|
||||
labelid.setIslabel(true);
|
||||
} else {
|
||||
labelid.setIslabel(false);
|
||||
}
|
||||
labelid.setIslabel(labelid.isIslabel() == false);
|
||||
chatMessageRes.save(labelid);
|
||||
}
|
||||
return view;
|
||||
|
@ -97,7 +97,7 @@ public class AgentServiceProxy {
|
||||
final AgentService agentService,
|
||||
final ModelMap map) {
|
||||
Sort defaultSort;
|
||||
defaultSort = new Sort(Sort.Direction.DESC, "servicetime");
|
||||
defaultSort = Sort.by(Sort.Direction.DESC, "servicetime");
|
||||
map.addAttribute(
|
||||
"agentServiceList",
|
||||
agentServiceRes.findByUseridAndOrgiAndStatus(
|
||||
|
Loading…
x
Reference in New Issue
Block a user