public String message_inbox(Integer pageNo, String title,
Date sendBeginTime, Date sendEndTime, Boolean status, Integer box,
HttpServletRequest request, HttpServletResponse response,
ModelMap model) {
CmsSite site = CmsUtils.getSite(request);
CmsUser user = CmsUtils.getUser(request);
FrontUtils.frontData(request, model, site);
MemberConfig mcfg = site.getConfig().getMemberConfig();
// 没有开启会员功能
if (!mcfg.isMemberOn()) {
return FrontUtils.showMessage(request, model, "member.memberClose");
}
if (user == null) {
return FrontUtils.showLogin(request, model, site);
}
Pagination pagination = null;
String returnPage = MESSAGE_IN_BOX_LIST;
if (box.equals(0)) {
// 收件箱
pagination = receiverMessageMng.getPage(site.getId(), null, user
.getId(), title, sendBeginTime, sendEndTime, status, box,
false, cpn(pageNo), CookieUtils.getPageSize(request));
returnPage = MESSAGE_IN_BOX_LIST;
} else if (box.equals(1)) {
// 发件箱
pagination = messageMng.getPage(site.getId(), user.getId(), null,
title, sendBeginTime, sendEndTime, status, box, false,
cpn(pageNo), CookieUtils.getPageSize(request));
returnPage = MESSAGE_SEND_LIST;
} else if (box.equals(2)) {
// 草稿箱
pagination = messageMng.getPage(site.getId(), user.getId(), null,
title, sendBeginTime, sendEndTime, status, box, false,
cpn(pageNo), CookieUtils.getPageSize(request));
returnPage = MESSAGE_DRAFT_LIST;
} else if (box.equals(3)) {
// 垃圾箱(可能从收件箱或者从发件箱转过来)
pagination = receiverMessageMng.getPage(site.getId(), user.getId(),
user.getId(), title, sendBeginTime, sendEndTime, status,
box, false, cpn(pageNo), CookieUtils.getPageSize(request));
returnPage = MESSAGE_TRASH_LIST;
}
model.addAttribute("msg", request.getAttribute("msg"));
model.addAttribute("pagination", pagination);