/** * */ package com.chen.action; import java.util.Date; import java.util.List; import com.chen.bean.Announces; import com.chen.bean.Pages; import com.chen.service.AnnounceService; /** * @author chenguoji * @email chenguo_ji@163.com * * 论坛公告 * */ public class AnnounceAction { private Announces announce; private AnnounceService announceService; private List<Announces> listAnno; private Pages pageBean; private int annoId = 1; private int annoSize; private int nowPage = 0; public String getIndexAnno() throws Exception { this.listAnno = this.announceService.getIndexAnno(6); this.announce = this.announceService.find(annoId); if(announce==null){ return "error"; } return "anno_getIndex_ok"; } public String getAll() throws Exception { this.listAnno = this.announceService.getAll(); this.announce = this.announceService.find(annoId); if(announce==null){ return "error"; } this.annoSize = this.listAnno.size(); return "anno_getAll_ok"; } public String ManageAll() throws Exception { this.pageBean = this.announceService.ManageAllForPages(10, nowPage); this.listAnno = pageBean.getListAnno(); return "anno_mangeAll_ok"; } public String ManageGoUpdate() throws Exception { this.announce = this.announceService.find(this.announce.getId()); if(announce==null){ return "error"; } return "anno_manageGoUpdate_ok"; } public String ManageAdd() throws Exception{ Date ttime = new Date(); this.announce.setThetime(ttime); this.announceService.ManageAdd(announce); return "anno_ManageAdd_ok"; } public String ManageUpdate() throws Exception { Date ttime = new Date(); announce.setThetime(ttime); this.announceService.ManageUpdate(announce); return "anno_manageUpdate_ok"; } public AnnounceService getAnnounceService() { return announceService; } public void setAnnounceService(AnnounceService announceService) { this.announceService = announceService; } public List<Announces> getListAnno() { return listAnno; } public void setListAnno(List<Announces> listAnno) { this.listAnno = listAnno; } public int getAnnoId() { return annoId; } public void setAnnoId(int annoId) { this.annoId = annoId; } public int getAnnoSize() { return annoSize; } public void setAnnoSize(int annoSize) { this.annoSize = annoSize; } public Pages getPageBean() { return pageBean; } public void setPageBean(Pages pageBean) { this.pageBean = pageBean; } public int getNowPage() { return nowPage; } public void setNowPage(int nowPage) { this.nowPage = nowPage; } public Announces getAnnounce() { return announce; } public void setAnnounce(Announces announce) { this.announce = announce; } }

123ggf LV8
2023年6月14日
limin123 LV6
2023年6月11日
0011100 LV12
2023年5月31日
微信网友_6495054193971200 LV2
2023年5月29日
1796527961 LV1
2023年3月23日
wouldbb LV6
2023年3月21日
tyyeng LV18
2023年1月1日
long123_356 LV8
2022年12月10日
akbar2020 LV9
2022年9月4日
yazhiyjs LV4
2022年8月30日

微信网友_7488517268295680
4月29日
暂无贡献等级
月牙君 LV1
4月25日
ChanLain LV2
3月3日
taoshen95 LV16
2024年12月19日
微信网友_7300409508155392
2024年12月17日
暂无贡献等级
asdxvfvfs
2024年12月3日
暂无贡献等级
短巷拥猫 LV12
2024年10月22日
cong58cong LV8
2024年6月26日
tjnu123
2024年6月18日
暂无贡献等级
Rinkia
2024年3月28日
暂无贡献等级