/** 去关注回复页面 */ @RequestMapping(value = "/goSubscribe") public ModelAndView goSubscribe() { logBefore(logger, "去关注回复页面"); ModelAndView mv = this.getModelAndView(); PageData pd = new PageData(); pd = this.getPageData(); try { pd.put("KEYWORD", "关注"); PageData msgpd = weixinTextMsgService.findByKw(pd); if (null != msgpd) { mv.addObject("msg", "文本消息"); mv.addObject("content", msgpd.getString("CONTENT")); } else { msgpd = weixinImgMsgService.findByKw(pd); if (null != msgpd) { mv.addObject("msg", "图文消息"); mv.addObject("content", "标题:" + msgpd.getString("TITLE1")); } else { msgpd = weixinCommandService.findByKw(pd); if (null != msgpd) { mv.addObject("msg", "命令"); mv.addObject("content", "执行命令:" + msgpd.getString("COMMANDCODE")); } else { mv.addObject("msg", "无回复"); } } } mv.setViewName("weixin/subscribe"); mv.addObject("pd", msgpd); } catch (Exception e) { logger.error(e.toString(), e); } return mv; }
@RequestMapping(value = "/deleteAll") @ResponseBody public Object deleteAll() { logBefore(logger, "批量删除Textmsg"); if (!PermissionHandler.buttonJurisdiction(menuUrl, "del")) { return null; } PageData pd = new PageData(); Map<String, Object> map = new HashMap<String, Object>(); try { pd = this.getPageData(); List<PageData> pdList = new ArrayList<PageData>(); String DATA_IDS = pd.getString("DATA_IDS"); if (null != DATA_IDS && !"".equals(DATA_IDS)) { String ArrayDATA_IDS[] = DATA_IDS.split(","); weixinTextMsgService.deleteAll(ArrayDATA_IDS); pd.put("msg", "ok"); } else { pd.put("msg", "no"); } pdList.add(pd); map.put("list", pdList); } catch (Exception e) { logger.error(e.toString(), e); } finally { logAfter(logger); } return AppUtil.returnObject(pd, map); }
@RequestMapping(value = "/list") public ModelAndView list(Page page) { logBefore(logger, "列表Textmsg"); // if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} ModelAndView mv = this.getModelAndView(); PageData pd = new PageData(); try { pd = this.getPageData(); String KEYWORD = pd.getString("KEYWORD"); if (null != KEYWORD && !"".equals(KEYWORD)) { pd.put("KEYWORD", KEYWORD.trim()); } page.setPd(pd); List<PageData> varList = weixinTextMsgService.list(page); // 列出Textmsg列表 mv.setViewName("weixin/textmsg/textmsg_list"); mv.addObject("varList", varList); mv.addObject("pd", pd); mv.addObject(Constant.SESSION_QX, this.getHC()); // 按钮权限 } catch (Exception e) { logger.error(e.toString(), e); } return mv; }