/**
   * 获取统一资源类型
   *
   * @return
   */
  @RequestMapping(value = "/v1.0/resource/unifyType", method = RequestMethod.GET)
  @ResponseBody
  public ResultJSON getUnifyType(HttpServletRequest request, HttpServletResponse response) {
    // 返回json的结果对象
    ResultJSON result = new ResultJSON();
    // 异常
    CustomException exception = (CustomException) request.getAttribute(CustomException.request_key);
    // 当前登录用户id
    Long currentUserId = (Long) request.getAttribute("currentUserId");
    // 返回
    Object data = null;

    try {
      if (currentUserId != null && exception == null) {
        long userId = currentUserId;
        data = assetService.getAllFirstLevelResType();
        exception = CustomException.SUCCESS;
      } else {
        exception = CustomException.INVALIDACCESSTOKEN;
      }
    } catch (Exception e) {
      exception = CustomException.getCustomExceptionByCode(e.getMessage());
      // 如果是普通的异常
      if (exception.getStatus() == 500) {
        e.printStackTrace();
      }
    } finally {
      result.setCode(exception.getCode());
      result.setMessage(exception.getMessage());
      result.setData(data == null ? "" : data);
      result.setSign("");
    }
    return result;
  }