e15a235b by xu

江苏数交所接口开发

1 parent 318329b6
...@@ -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 }
......
...@@ -35,6 +35,12 @@ public class MfEnterpriseAttachment extends BaseDO { ...@@ -35,6 +35,12 @@ public class MfEnterpriseAttachment extends BaseDO {
35 private String enterpriseGuid; 35 private String enterpriseGuid;
36 36
37 /** 37 /**
38 * 文件ID
39 */
40 @Name("文件ID")
41 private String fileId;
42
43 /**
38 * 文件名称 44 * 文件名称
39 */ 45 */
40 @Name("文件名称") 46 @Name("文件名称")
......
...@@ -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
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!