江苏数交所接口开发
Showing
4 changed files
with
40 additions
and
0 deletions
... | @@ -76,6 +76,19 @@ public class EnterpriseAttachmentController { | ... | @@ -76,6 +76,19 @@ public class EnterpriseAttachmentController { |
76 | return CommonRes.success(vo); | 76 | return CommonRes.success(vo); |
77 | } | 77 | } |
78 | 78 | ||
79 | @GetMapping("/get-fileUrl") | ||
80 | @SystemLog(value = "开发主体附件信息-查询文件Url地址") | ||
81 | @Operation( | ||
82 | summary = "开发主体附件信息-查询文件Url地址", | ||
83 | parameters = { | ||
84 | @Parameter(name = "fileId", description = "文件Id", required = true)}, | ||
85 | hidden = true | ||
86 | ) | ||
87 | public CommonRes<String> getFileUrl(@RequestParam String fileId) { | ||
88 | String fileUrl = enterpriseAttachmentService.getEnterpriseAttachmentUrl(fileId); | ||
89 | return CommonRes.success(fileUrl); | ||
90 | } | ||
91 | |||
79 | //endregion | 92 | //endregion |
80 | 93 | ||
81 | } | 94 | } | ... | ... |
... | @@ -33,6 +33,12 @@ public class MfEnterpriseAttachment extends BaseDO { | ... | @@ -33,6 +33,12 @@ public class MfEnterpriseAttachment extends BaseDO { |
33 | */ | 33 | */ |
34 | @Name("企业认证唯一标识") | 34 | @Name("企业认证唯一标识") |
35 | private String enterpriseGuid; | 35 | private String enterpriseGuid; |
36 | |||
37 | /** | ||
38 | * 文件ID | ||
39 | */ | ||
40 | @Name("文件ID") | ||
41 | private String fileId; | ||
36 | 42 | ||
37 | /** | 43 | /** |
38 | * 文件名称 | 44 | * 文件名称 | ... | ... |
... | @@ -76,4 +76,11 @@ public interface EnterpriseAttachmentService { | ... | @@ -76,4 +76,11 @@ public interface EnterpriseAttachmentService { |
76 | * @return | 76 | * @return |
77 | */ | 77 | */ |
78 | JSExchageCommonRes<JSExchagePageListVO<JSAttachRSVO>> enterpriseAttach(JSQueryVO<JSAttachQueryVO> queryVO); | 78 | JSExchageCommonRes<JSExchagePageListVO<JSAttachRSVO>> enterpriseAttach(JSQueryVO<JSAttachQueryVO> queryVO); |
79 | |||
80 | /** | ||
81 | * 根据文件Id查询附件地址 | ||
82 | * @param fileId | ||
83 | * @return | ||
84 | */ | ||
85 | String getEnterpriseAttachmentUrl(String fileId); | ||
79 | } | 86 | } | ... | ... |
... | @@ -221,6 +221,20 @@ public class EnterpriseAttachmentServiceImpl implements EnterpriseAttachmentServ | ... | @@ -221,6 +221,20 @@ public class EnterpriseAttachmentServiceImpl implements EnterpriseAttachmentServ |
221 | return JSExchageCommonRes.success(pageListVO); | 221 | return JSExchageCommonRes.success(pageListVO); |
222 | } | 222 | } |
223 | 223 | ||
224 | @Override | ||
225 | public String getEnterpriseAttachmentUrl(String fileId) { | ||
226 | if(ObjectUtils.isEmpty(fileId)){ | ||
227 | return null; | ||
228 | } | ||
229 | LambdaQueryWrapper<MfEnterpriseAttachment> queryWrapper = Wrappers.lambdaQuery(); | ||
230 | queryWrapper.eq(MfEnterpriseAttachment::getFileId,fileId).select(MfEnterpriseAttachment::getFileUrl); | ||
231 | List<MfEnterpriseAttachment> list = mfEnterpriseAttachmentService.list(queryWrapper); | ||
232 | if(ObjectUtils.isEmpty(list)){ | ||
233 | return null; | ||
234 | } | ||
235 | return list.get(0).getFileUrl(); | ||
236 | } | ||
237 | |||
224 | /** | 238 | /** |
225 | * 查询后转换 | 239 | * 查询后转换 |
226 | * @param pageListVO | 240 | * @param pageListVO | ... | ... |
-
Please register or sign in to post a comment