e15a235b by xu

江苏数交所接口开发

1 parent 318329b6
......@@ -76,6 +76,19 @@ public class EnterpriseAttachmentController {
return CommonRes.success(vo);
}
@GetMapping("/get-fileUrl")
@SystemLog(value = "开发主体附件信息-查询文件Url地址")
@Operation(
summary = "开发主体附件信息-查询文件Url地址",
parameters = {
@Parameter(name = "fileId", description = "文件Id", required = true)},
hidden = true
)
public CommonRes<String> getFileUrl(@RequestParam String fileId) {
String fileUrl = enterpriseAttachmentService.getEnterpriseAttachmentUrl(fileId);
return CommonRes.success(fileUrl);
}
//endregion
}
......
......@@ -33,6 +33,12 @@ public class MfEnterpriseAttachment extends BaseDO {
*/
@Name("企业认证唯一标识")
private String enterpriseGuid;
/**
* 文件ID
*/
@Name("文件ID")
private String fileId;
/**
* 文件名称
......
......@@ -76,4 +76,11 @@ public interface EnterpriseAttachmentService {
* @return
*/
JSExchageCommonRes<JSExchagePageListVO<JSAttachRSVO>> enterpriseAttach(JSQueryVO<JSAttachQueryVO> queryVO);
/**
* 根据文件Id查询附件地址
* @param fileId
* @return
*/
String getEnterpriseAttachmentUrl(String fileId);
}
......
......@@ -221,6 +221,20 @@ public class EnterpriseAttachmentServiceImpl implements EnterpriseAttachmentServ
return JSExchageCommonRes.success(pageListVO);
}
@Override
public String getEnterpriseAttachmentUrl(String fileId) {
if(ObjectUtils.isEmpty(fileId)){
return null;
}
LambdaQueryWrapper<MfEnterpriseAttachment> queryWrapper = Wrappers.lambdaQuery();
queryWrapper.eq(MfEnterpriseAttachment::getFileId,fileId).select(MfEnterpriseAttachment::getFileUrl);
List<MfEnterpriseAttachment> list = mfEnterpriseAttachmentService.list(queryWrapper);
if(ObjectUtils.isEmpty(list)){
return null;
}
return list.get(0).getFileUrl();
}
/**
* 查询后转换
* @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!