【数据资产】
1、图片上传
Showing
1 changed file
with
2 additions
and
2 deletions
| ... | @@ -120,7 +120,7 @@ public class DataPortServiceImpl implements DataPortService { | ... | @@ -120,7 +120,7 @@ public class DataPortServiceImpl implements DataPortService { |
| 120 | throw new CsbrSystemException(SystemError.DATA_GET_ERROR, respJson.getString("message")); | 120 | throw new CsbrSystemException(SystemError.DATA_GET_ERROR, respJson.getString("message")); |
| 121 | } | 121 | } |
| 122 | } else { | 122 | } else { |
| 123 | String fileName = "身份凭证.png"; | 123 | String fileName = String.format("%s.png", entity.getTenantName()); |
| 124 | MultipartFile image = new MockMultipartFile(fileName, fileName, "application/octet-stream", resourceByteArray); | 124 | MultipartFile image = new MockMultipartFile(fileName, fileName, "application/octet-stream", resourceByteArray); |
| 125 | String url = (String) daopCommonFeign.uploadFile(image, fileName).getData(); | 125 | String url = (String) daopCommonFeign.uploadFile(image, fileName).getData(); |
| 126 | log.info("======url======, {}", url); | 126 | log.info("======url======, {}", url); |
| ... | @@ -188,7 +188,7 @@ public class DataPortServiceImpl implements DataPortService { | ... | @@ -188,7 +188,7 @@ public class DataPortServiceImpl implements DataPortService { |
| 188 | throw new CsbrSystemException(SystemError.DATA_GET_ERROR, respJson.getString("message")); | 188 | throw new CsbrSystemException(SystemError.DATA_GET_ERROR, respJson.getString("message")); |
| 189 | } | 189 | } |
| 190 | } else { | 190 | } else { |
| 191 | String fileName = "身份凭证.png"; | 191 | String fileName = String.format("%s.png", entity.getTenantName()); |
| 192 | MultipartFile image = new MockMultipartFile(fileName, fileName, "application/octet-stream", resourceByteArray); | 192 | MultipartFile image = new MockMultipartFile(fileName, fileName, "application/octet-stream", resourceByteArray); |
| 193 | String url = (String) daopCommonFeign.uploadFile(image, fileName).getData(); | 193 | String url = (String) daopCommonFeign.uploadFile(image, fileName).getData(); |
| 194 | log.info("======url======, {}", url); | 194 | log.info("======url======, {}", url); | ... | ... |
-
Please register or sign in to post a comment