Exemplo n.º 1
0
 /**
  * 2.43 上传意见反馈图片
  *
  * @param attach 图片资源文件
  * @param request 请求信息
  * @return 返回上传结果信息
  */
 @RequestMapping(
     value = "/feedback/upload",
     method = RequestMethod.POST,
     headers = "Content-Type=multipart/form-data")
 public ResponseDo uploadFeedbackPhoto(@RequestParam("attach") MultipartFile attach) {
   LOG.info("uploadFeedbackPhoto attach size: {}", attach.getSize());
   try {
     return service.uploadFeedbackPhoto(attach);
   } catch (ApiException e) {
     LOG.warn(e.getMessage(), e);
     return ResponseDo.buildFailureResponse(e.getMessage());
   }
 }
Exemplo n.º 2
0
 /**
  * 2.14 活动图片上传
  *
  * @param attach 图片资源文件
  * @param request 请求参数
  * @return 返回上传结果
  */
 @RequestMapping(
     value = "/activity/cover/upload",
     method = RequestMethod.POST,
     headers = "Content-Type=multipart/form-data")
 public ResponseDo uploadCoverPhoto(
     @RequestParam("attach") MultipartFile attach,
     @RequestParam("token") String token,
     @RequestParam("userId") String userId) {
   LOG.info("uploadCoverPhoto attach size: {}", attach.getSize());
   try {
     return service.uploadCoverPhoto(attach, userId, token);
   } catch (ApiException e) {
     LOG.warn(e.getMessage(), e);
     return ResponseDo.buildFailureResponse(e.getMessage());
   }
 }
Exemplo n.º 3
0
  /**
   * 2.10 行驶证上传
   *
   * @param userId 用户ID
   * @param token 用户会话Token
   * @return 返回结果对象
   */
  @RequestMapping(
      value = "/user/{userId}/license/upload",
      method = RequestMethod.POST,
      headers = "Content-Type=multipart/form-data")
  public ResponseDo uploadLicensePhoto(
      @PathVariable(value = "userId") String userId,
      @RequestParam("token") String token,
      @RequestParam("attach") MultipartFile attach) {
    LOG.info("uploadLicensePhoto attach size: {}", attach.getSize());

    try {
      return service.uploadLicensePhoto(userId, attach, token);
    } catch (ApiException e) {
      LOG.warn(e.getMessage(), e);
      return ResponseDo.buildFailureResponse("上传文件失败");
    }
  }