Exemple #1
0
  /**
   * 打开短信/彩信添加页面
   *
   * @param appId 应用id
   * @param contType 短彩类别 sms-短信 mms-彩信
   * @param model
   * @return
   * @throws SQLException
   */
  @RequestMapping(value = "/preAdd")
  public String preAdd(Model model) throws SQLException {

    ContMms contMms = new ContMms();
    List<ContentCode> contentCodeList = contentCodeService.getContentCodeList(1L);
    model.addAttribute("contentCodeList", contentCodeList);
    model.addAttribute("contMms", contMms);
    return "cont/mms/mms-add";
  }
Exemple #2
0
  /**
   * 打开彩信编辑页面
   *
   * @param appId 应用id
   * @param id 短信/彩信id
   * @param model
   * @return
   * @throws SQLException
   */
  @RequestMapping(value = "preEdit")
  public String preEditMmsCont(@RequestParam(required = false) Long id, Model model)
      throws SQLException {

    ContMms contMms = contMmsService.getContMmsById(id);

    // /** 验证编辑权限 */
    // if (!checkContMmsPermission(contMms, session)) {
    // return "redirect:../info/no-permission";
    // }

    /** 将数据库时间转换成页面展示格式 yyyymmddhhmiss -> yyyy-mm-dd hh:mi:ss */
    contMms.setStartTime(
        TimeUtil.format(contMms.getStartTime(), TimeUtil.SOURCE_1, TimeUtil.TARGET_1));
    contMms.setEndTime(TimeUtil.format(contMms.getEndTime(), TimeUtil.SOURCE_1, TimeUtil.TARGET_1));

    List<ContentCode> contentCodeList = contentCodeService.getContentCodeList(1L);
    model.addAttribute("contentCodeList", contentCodeList);

    model.addAttribute("contMms", contMms);
    // AppInfo app = appInfoService.getAppInfo(appId);
    // model.addAttribute("app", app);
    return "cont/mms/mms-edit";
  }