Пример #1
0
  /**
   * 查看彩信详情
   *
   * @param appId 应用id
   * @param id 短信/彩信id
   * @param session
   * @param model
   * @return
   */
  @RequestMapping(value = "/view")
  public String viewContMms(@RequestParam(required = false) Long id, Model model) {
    ContMms contMms = contMmsService.getContMmsById(id);

    /** 将数据库时间转换成页面展示格式 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));

    model.addAttribute("contMms", contMms);
    return "/cont/mms/mms-view";
  }
Пример #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";
  }