Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-api
Commits
33e42427
Commit
33e42427
authored
Jan 12, 2026
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(common): 优化文件下载配置并增强文档转换功能
- 修复BOS配置服务中文件名拼接的字符串格式问题 - 在Md2Word响应实体中新增文件名字段及其getter/setter方法
parent
97d0dd48
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
SoftwareCopyRightScheduler.java
...tware_copyright/scheduler/SoftwareCopyRightScheduler.java
+2
-0
BosConfigServiceImpl.java
.../cn/com/poc/common/service/impl/BosConfigServiceImpl.java
+1
-1
Md2WordResponse.java
...ty/resource/demand/ai/entity/md2word/Md2WordResponse.java
+9
-0
No files found.
src/main/java/cn/com/poc/ai_software_copyright/scheduler/SoftwareCopyRightScheduler.java
View file @
33e42427
...
@@ -353,7 +353,9 @@ public class SoftwareCopyRightScheduler {
...
@@ -353,7 +353,9 @@ public class SoftwareCopyRightScheduler {
String
mdURL
=
uploadDocument
(
bytes
,
fileName
);
String
mdURL
=
uploadDocument
(
bytes
,
fileName
);
Md2WordResponse
response
=
new
Md2WordResponse
();
Md2WordResponse
response
=
new
Md2WordResponse
();
response
.
setFileName
(
fileName
);
response
.
setFilePath
(
mdURL
);
response
.
setFilePath
(
mdURL
);
Md2WordResult
md2WordResult
=
md2WordService
.
md2Word
(
response
);
Md2WordResult
md2WordResult
=
md2WordService
.
md2Word
(
response
);
return
md2WordResult
.
getFilePath
();
return
md2WordResult
.
getFilePath
();
}
finally
{
}
finally
{
...
...
src/main/java/cn/com/poc/common/service/impl/BosConfigServiceImpl.java
View file @
33e42427
...
@@ -91,7 +91,7 @@ public class BosConfigServiceImpl implements BosConfigService {
...
@@ -91,7 +91,7 @@ public class BosConfigServiceImpl implements BosConfigService {
meta
.
setContentType
(
contentType
);
meta
.
setContentType
(
contentType
);
// 设置内容被下载时的名称。
// 设置内容被下载时的名称。
if
(
StringUtils
.
isNoneBlank
(
FILE_NAME
))
{
if
(
StringUtils
.
isNoneBlank
(
FILE_NAME
))
{
meta
.
setContentDisposition
(
"attachment; filename="
+
(
fileName
+
"."
+
fileType
)
);
meta
.
setContentDisposition
(
"attachment; filename="
+
fileName
+
"."
+
fileType
);
}
}
// 设置内容被下载时的编码格式。
// 设置内容被下载时的编码格式。
meta
.
setContentEncoding
(
StandardCharsets
.
UTF_8
.
displayName
());
meta
.
setContentEncoding
(
StandardCharsets
.
UTF_8
.
displayName
());
...
...
src/main/java/cn/com/poc/thirdparty/resource/demand/ai/entity/md2word/Md2WordResponse.java
View file @
33e42427
...
@@ -13,6 +13,15 @@ public class Md2WordResponse extends AbstractRequest<Md2WordResult> implements S
...
@@ -13,6 +13,15 @@ public class Md2WordResponse extends AbstractRequest<Md2WordResult> implements S
private
String
filePath
;
private
String
filePath
;
private
String
fileName
;
public
String
getFileName
()
{
return
fileName
;
}
public
void
setFileName
(
String
fileName
)
{
this
.
fileName
=
fileName
;
}
public
String
getFilePath
()
{
public
String
getFilePath
()
{
return
filePath
;
return
filePath
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment