AnnouncementRecycleDeleteAction.java 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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.ZoaAnnouncement;
  24. import org.zhiqim.httpd.HttpRequest;
  25. import org.zhiqim.httpd.context.core.Action;
  26. import org.zhiqim.orm.ORM;
  27. /**
  28. * 公告彻底删除
  29. *
  30. * @version v1.0.0 @author zouzhigang 2017-11-17 新建与整理
  31. */
  32. public class AnnouncementRecycleDeleteAction implements Action
  33. {
  34. @Override
  35. public void execute(HttpRequest request) throws Exception
  36. {
  37. long announcementId = request.getParameterLong("announcementId");
  38. if(announcementId == -1)
  39. {
  40. request.returnHistory("该公告不存在");
  41. return;
  42. }
  43. ORM.table().delete(ZoaAnnouncement.class, announcementId);
  44. }
  45. }