/**
   * 保存
   *
   * @param shareHref
   * @param op add:添加、modify:修改
   */
  @RequestMapping(value = "/save")
  public void save(@ModelAttribute ShareHref shareHref, @RequestParam String op) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("code", "1");
    map.put("msg", "保存成功!");

    try {
      // 图片路径
      SysDictMain sysDictMain = DictUtil.getMainByCode("shareHref_path");

      if (sysDictMain != null && StringUtils.isNotBlank(sysDictMain.getDictValue())) {

        shareHref.setUnitId(getLoginUnitId());
        shareHref.setUnitType(getLoginUnit().getUnitType());
        shareHref.setZoneCode(getLoginUnit().getZoneCode());

        shareHrefService.save(request, shareHref, op, sysDictMain.getDictValue());
        addSaveLog(op, shareHref, OpRresult.success + "", "分享链接添加成功!");

      } else {
        map.put("code", "0");
        map.put("msg", "请维护推广活动图片上传路径,编码为:promoteActivity_path!");
      }

    } catch (Exception e) {
      logger.error(e.getMessage(), e);
      map.put("code", "0");
      map.put("msg", "保存失败!");
      addSaveLog(op, shareHref, OpRresult.fail + "", "分享链接添加失败!");
    }

    outJson(map);
  }