/** * 根据ID查询短信详细 * * @return */ @Action( value = "edit", results = { @Result(name = SUCCESS, location = "/sms/smssend/jsp/sms_write.jsp"), @Result(name = ERROR, location = "/error.jsp") }) public String edit() { String result = SUCCESS; if (!StringUtil.isEmpty(selectedId)) { try { mbnSmsHadSendVO = mbnSmsHadSendService.queryByPk(Long.parseLong(selectedId)); this.getRequest() .setAttribute( "smsText", StringEscapeUtils.escapeJavaScript(mbnSmsHadSendVO.getContent())); this.getRequest().setAttribute("title", mbnSmsHadSendVO.getTitle()); Users loginUser = (Users) super.getSession().getAttribute(ApSmsConstants.SESSION_USER_INFO); List<SmsMbnTunnelVO> tunnelList = getTunnelList(loginUser.getMerchantPin()); this.getRequest().setAttribute("tunnelList", tunnelList); } catch (Exception e) { e.printStackTrace(); result = ERROR; } } return result; }
/** * 根据ID查询下一条,上一条短信详细 * * @return */ @Action( value = "followPage", results = { @Result(name = SUCCESS, location = "/sms/smssend/jsp/hadsend_content.jsp"), @Result(name = ERROR, location = "/error.jsp") }) public String followPage() { if (!StringUtil.isEmpty(selectedId) && pageDirect != null) { entityMap = new HashMap<String, Object>(); try { HashMap<String, Object> followPage = new HashMap<String, Object>(); if (pageDirect == 0) { followPage.put("frontPage", Long.valueOf(selectedId)); } else { followPage.put("nextPage", Long.valueOf(selectedId)); } MbnSmsOperationClass smsOperationClass = mbnSmsOperationClassService.findByCoding(operationId); followPage.put("operationId", smsOperationClass.getId()); if (!StringUtil.isEmpty(batchId)) { followPage.put("batchId", Long.valueOf(batchId)); } Users u = (Users) super.getSession().getAttribute(ApSmsConstants.SESSION_USER_INFO); followPage.put("merchantPin", u.getMerchantPin()); List<MbnSmsHadSendVO> smsList = mbnSmsHadSendService.followPage(followPage); if (!smsList.isEmpty()) { mbnSmsHadSendVO = smsList.get(0); } else { mbnSmsHadSendVO = mbnSmsHadSendService.queryByPk(Long.valueOf(selectedId)); hasFollow = false; } // Long batchId, Long mPin, Long createBy // 设定只查询自己发送的信息 boolean isQuerySelf = false; Long createBy = null; if (!StringUtils.isBlank( WebUtils.getPropertyByName( com.leadtone.mas.admin.common.ApSmsConstants.QUERYSELFINFO))) { isQuerySelf = Boolean.valueOf( WebUtils.getPropertyByName( com.leadtone.mas.admin.common.ApSmsConstants.QUERYSELFINFO)); if (isQuerySelf && u.getUserType() == com.leadtone.mas.admin.common.ApSmsConstants.USER_TYPE_ENTERPRISE_NORMAL) { createBy = u.getId(); } } smsHadSendList = mbnSmsHadSendService.getByBatchId( mbnSmsHadSendVO.getBatchId(), u.getMerchantPin(), createBy); return SUCCESS; } catch (Exception e) { e.printStackTrace(); } } return ERROR; }
/** * 根据ID查询短信详细 * * @return */ @Action( value = "getSmsDetails", results = { @Result(name = SUCCESS, location = "/sms/smssend/jsp/hadsend_content.jsp"), @Result(name = ERROR, location = "/error.jsp") }) public String getSmsDetails() { String result = SUCCESS; if (!StringUtil.isEmpty(selectedId)) { try { mbnSmsHadSendVO = mbnSmsHadSendService.queryByPk(Long.parseLong(selectedId)); Users u = (Users) super.getSession().getAttribute(ApSmsConstants.SESSION_USER_INFO); // Long batchId, Long mPin, Long createBy // 设定只查询自己发送的信息 boolean isQuerySelf = false; Long createBy = null; if (!StringUtils.isBlank( WebUtils.getPropertyByName( com.leadtone.mas.admin.common.ApSmsConstants.QUERYSELFINFO))) { isQuerySelf = Boolean.valueOf( WebUtils.getPropertyByName( com.leadtone.mas.admin.common.ApSmsConstants.QUERYSELFINFO)); if (isQuerySelf && u.getUserType() == com.leadtone.mas.admin.common.ApSmsConstants.USER_TYPE_ENTERPRISE_NORMAL) { createBy = u.getId(); } } smsHadSendList = mbnSmsHadSendService.getByBatchId( mbnSmsHadSendVO.getBatchId(), u.getMerchantPin(), createBy); } catch (Exception e) { e.printStackTrace(); result = ERROR; } } return result; }