package action; import java.util.List; import util.MyJson; import util.Page; import com.opensymphony.xwork2.Action; import com.opensymphony.xwork2.ActionContext; import entity.Affiche; import entity.OaUser; import entity.Task; import biz.CommonBiz; public class AfficheAction { private static final String TOAFFICHE = "toaffiche"; private static final String TOAFFICHEMANAGE = "toaffichemanage"; private CommonBiz commonBiz; private Affiche affiche; private int start; private int limit; private String sort; public int getStart() { return start; } public void setStart(int start) { this.start = start; } public int getLimit() { return limit; } public void setLimit(int limit) { this.limit = limit; } public String getSort() { return sort; } public void setSort(String sort) { this.sort = sort; } public String getDir() { return dir; } public void setDir(String dir) { this.dir = dir; } private String dir; public CommonBiz getCommonBiz() { return commonBiz; } public void setCommonBiz(CommonBiz commonBiz) { this.commonBiz = commonBiz; } public Affiche getAffiche() { return affiche; } public void setAffiche(Affiche affiche) { this.affiche = affiche; } /** * 跳转到公告页面 * @return */ public String toAffiche(){ return TOAFFICHE; } public String toAfficheManage(){ return TOAFFICHEMANAGE; } /** * 查询公告 * @return */ public String findAfficheList(){ // 获取当前用户的事务列表 List<Affiche> afficheList=commonBiz.getAfficheDAO().findAll(); String msg = "{totalCount:" + afficheList.size() + ",result:"; msg += MyJson.toJsonStr(afficheList, "oaRole"); msg += "}"; ActionContext.getContext().put("msg", msg); return Action.SUCCESS; } /** * 添加公告 * @return */ public String addAffiche(){ commonBiz.getAfficheDAO().save(affiche); ActionContext.getContext().put("msg", "{success:true,msg:'添加成功'}"); return Action.SUCCESS; } /** * 修改公告 * @return */ public String updateAffiche(){ commonBiz.getAfficheDAO().merge(affiche); ActionContext.getContext().put("msg", "{success:true,msg:'修改成功'}"); return Action.SUCCESS; } /** * 删除公告 * @return */ public String deleteAffiche(){ commonBiz.getAfficheDAO().delete(affiche); ActionContext.getContext().put("msg", "{success:true,msg:'删除成功'}"); return Action.SUCCESS; } public String findAfficheListByPage(){ Page page=commonBiz.findByPage(Affiche.class, start, limit, sort, dir); String msg = "{totalCount:" + page.getTotalCount() + ",result:"; msg += MyJson.toJsonStr(page.getResult(), "oaRole"); msg += "}"; ActionContext.getContext().put("msg", msg); return Action.SUCCESS; } public String findAfficheListByPages(){ Page page=commonBiz.findByPage(Affiche.class, start, limit, sort, dir); String msg = "{totalCount:" + page.getTotalCount() + ",result:"; msg += MyJson.toJsonStr(page.getResult(), "oaRole"); msg += "}"; ActionContext.getContext().put("msg", msg); return Action.SUCCESS; } }

lvdong2023 LV10
2023年5月18日
微信网友_5963854197018624 LV7
2023年4月6日
泓鼎168 LV20
2023年3月30日
cx123123 LV7
2022年5月17日
habiya LV3
2022年3月15日
ewan007 LV30
2022年3月10日
微信网友_5845420553359360 LV4
2022年2月27日
wanglinddad LV55
2021年11月6日
freeblow LV2
2021年5月20日
and123456 LV11
2021年5月11日