| | |
| | | Assert.hasKeyAndValue(paramIn, "objId", "请求报文中未包含文件ID"); |
| | | Assert.hasKeyAndValue(paramIn, "fileTypeCd", "请求报文中未包含文件类型"); |
| | | |
| | | super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.GET_FILE); |
| | | //super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.GET_FILE); |
| | | |
| | | ComponentValidateResult result = super.validateStoreStaffCommunityRelationship(pd, restTemplate); |
| | | /*ComponentValidateResult result = super.validateStoreStaffCommunityRelationship(pd, restTemplate); |
| | | |
| | | Map paramMap = BeanConvertUtil.beanCovertMap(result); |
| | | paramIn.putAll(paramMap); |
| | | paramIn.putAll(paramMap);*/ |
| | | |
| | | String apiUrl = ServiceConstant.SERVICE_API_URL + "/api/file.getFileByObjId" + mapToUrlParam(paramIn); |
| | | |
| | |
| | | //headers.add("Content-Disposition", "attachment; filename=" + outParam.getString("fileName")); |
| | | headers.add("Accept-Ranges", "bytes"); |
| | | |
| | | byte[] context = Base64Convert.base64ToByte(outParam.getString("context").replace("data:image/webp;base64,", "")); |
| | | byte[] context = Base64Convert.base64ToByte(outParam.getString("context") |
| | | .replace("data:image/webp;base64,", "") |
| | | .replace("data:image/png;base64,", "") |
| | | .replace("data:image/jpeg;base64,", "") |
| | | ); |
| | | |
| | | return new ResponseEntity<Object>(context, headers, HttpStatus.OK); |
| | | } |