/** 刮刮卡管理 */ public String list() throws Exception { if (convalue != null && !convalue.equals("")) { convalue = URLDecoder.decode(convalue, "utf-8"); } if (page < 1) { page = 1; } // 总记录数 totalCount = whdscratchcardService.getTotalCount(con, convalue, status, publicaccount); // 总页数 pageCount = whdscratchcardService.getPageCount(totalCount, size); if (page > pageCount && pageCount != 0) { page = pageCount; } // 所有当前页记录对象 whdscratchcards = whdscratchcardService.queryList(con, convalue, status, publicaccount, page, size); return "list"; }
/** * 添加 * * @return * @throws Exception */ public String add() throws Exception { whdscratchcardService.add(whdscratchcard); arg[0] = "whdscratchcardAction!list"; arg[1] = "刮刮卡管理"; return SUCCESS; }
/** 刮刮卡展示 */ public String frontWhdscratchcards() { whdscratchcards = whdscratchcardService.getFrontWhdscratchcardsByPublicAccount(frontpa); request.put("whdscratchcards", whdscratchcards); return NONE; }
/** * 跳转到修改页面 * * @return */ public String load() throws Exception { whdscratchcard = whdscratchcardService.loadById(id); return "load"; }
/** * 查看信息 * * @return */ public String view() { whdscratchcard = whdscratchcardService.loadById(id); return "view"; }
/** * 删除 * * @return */ public String delete() { whdscratchcardService.deleteById(id); arg[0] = "whdscratchcardAction!list"; arg[1] = "刮刮卡管理"; return SUCCESS; }