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