|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 解析文件哈希值 | 
|---|
|  |  |  | * @param fmUrl | 
|---|
|  |  |  | * @param hashCodes | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public  List<FileRestVo> parseHashcode(String fmUrl, List<Integer> hashCodes){ | 
|---|
|  |  |  | List<FileRestVo> rList = null ; | 
|---|
|  |  |  | if(hashCodes != null && hashCodes.size() > 0) { | 
|---|
|  |  |  | // 准备请求数据 | 
|---|
|  |  |  | MultiValueMap<String, Object> multipartRequestData = new LinkedMultiValueMap<>(); | 
|---|
|  |  |  | multipartRequestData.add(FileConstant.fmPostMapping_parseHashcodeList_paramName, hashCodes); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 设置请求头部,这里假设服务器接收multipart/form-data类型的数据 | 
|---|
|  |  |  | HttpHeaders headers = new HttpHeaders(); | 
|---|
|  |  |  | headers.setContentType(MediaType.MULTIPART_FORM_DATA); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 封装请求体 | 
|---|
|  |  |  | HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(multipartRequestData, headers); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String webUrl = fmUrl + "/" + FileConstant.fmRequestMapping + "/" + FileConstant.fmPostMapping_parseHashcodeList; | 
|---|
|  |  |  | // 发送POST请求 | 
|---|
|  |  |  | FileRestVo[] rvos = restTemplate.postForObject(webUrl, requestEntity, FileRestVo[].class); | 
|---|
|  |  |  | rList = Arrays.asList(rvos) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return rList ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 解析文件文件路径中的哈希值并返回图片完整路径 | 
|---|
|  |  |  | * @param fmUrl | 
|---|
|  |  |  | * @param filePath | 
|---|