AnnouncementRecycleAction.java 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。[遇见知启蒙,邂逅框架梦]
  3. *
  4. * 知启蒙WEB容器(zhiqim_httpd)在LGPL3.0协议下开源:https://www.zhiqim.com/gitcan/zhiqim/zhiqim_httpd.htm
  5. *
  6. * This file is part of [zhiqim_httpd].
  7. *
  8. * [zhiqim_httpd] is free software: you can redistribute
  9. * it and/or modify it under the terms of the GNU Lesser General Public License
  10. * as published by the Free Software Foundation, either version 3 of the
  11. * License, or (at your option) any later version.
  12. *
  13. * [zhiqim_httpd] is distributed in the hope that it will
  14. * be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU Lesser General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public License
  19. * along with [zhiqim_httpd].
  20. * If not, see <http://www.gnu.org/licenses/>.
  21. */
  22. package org.zhiqim.announcement.action;
  23. import org.zhiqim.announcement.dbo.ZoaAnnouncementEx;
  24. import org.zhiqim.httpd.HttpRequest;
  25. import org.zhiqim.httpd.context.core.Action;
  26. import org.zhiqim.kernel.paging.PageResult;
  27. import org.zhiqim.orm.ORM;
  28. import org.zhiqim.orm.dbo.Selector;
  29. /**
  30. * 公告回收站(已删除列表)
  31. *
  32. * @version v1.0.0 @author duanxiaohui 2017-11-16 新建与整理
  33. */
  34. public class AnnouncementRecycleAction implements Action
  35. {
  36. @Override
  37. public void execute(HttpRequest request) throws Exception
  38. {
  39. int pageNo = request.getParameterInt("page", 1);
  40. int pageSize = request.getContextAttributeInt("fmr_page_size", 20);
  41. Selector selector = new Selector();
  42. selector.addMust("announcementStatus", 1);
  43. selector.addOrderbyDesc("announcementTime");
  44. PageResult<ZoaAnnouncementEx> result = ORM.view().page(ZoaAnnouncementEx.class, pageNo, pageSize, selector);
  45. result.addConditionMap(request.getParameterMap());
  46. request.setAttribute("result", result);
  47. }
  48. }