Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
仟微科技
Link Wechat
提交
6c9c99a1
Link Wechat
项目概览
仟微科技
/
Link Wechat
通知
48
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Link Wechat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6c9c99a1
编写于
2月 28, 2021
作者:
星
星梦苍天
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
海报图片上传bug修复
上级
cddd14a9
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
6 deletion
+8
-6
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WePosterServiceImpl.java
...om/linkwechat/wecom/service/impl/WePosterServiceImpl.java
+8
-6
未找到文件。
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WePosterServiceImpl.java
浏览文件 @
6c9c99a1
...
...
@@ -126,22 +126,24 @@ public class WePosterServiceImpl extends ServiceImpl<WePosterMapper, WePoster> i
poster
.
setSampleImgPath
(
poster
.
getBackgroundImgPath
());
return
poster
.
getBackgroundImgPath
();
}
Set
<
Lo
ng
>
existFontId
=
new
HashSet
<>();
Map
<
Lo
ng
,
Font
>
fontMap
=
poster
.
getPosterSubassemblyList
().
stream
().
filter
(
wePosterSubassembly
->
wePosterSubassembly
.
getType
().
equals
(
1
))
Set
<
Stri
ng
>
existFontId
=
new
HashSet
<>();
Map
<
Stri
ng
,
Font
>
fontMap
=
poster
.
getPosterSubassemblyList
().
stream
().
filter
(
wePosterSubassembly
->
wePosterSubassembly
.
getType
().
equals
(
1
))
.
peek
(
wePosterSubassembly
->
{
if
(
wePosterSubassembly
.
getFontId
()
==
null
)
{
wePosterSubassembly
.
setFontId
(
0L
);
}
})
.
filter
(
wePosterSubassembly
->
{
if
(
existFontId
.
contains
(
wePosterSubassembly
.
getFontId
())){
if
(
existFontId
.
contains
(
wePosterSubassembly
.
getFontId
()
+
"_"
+
wePosterSubassembly
.
getFontSize
()+
"_"
+
wePosterSubassembly
.
getFontStyle
()
)){
return
false
;
}
else
{
existFontId
.
add
(
wePosterSubassembly
.
getFontId
());
existFontId
.
add
(
wePosterSubassembly
.
getFontId
()
+
"_"
+
wePosterSubassembly
.
getFontSize
()+
"_"
+
wePosterSubassembly
.
getFontStyle
()
);
return
true
;
}
})
.
collect
(
Collectors
.
toMap
(
WePosterSubassembly:
:
getFontId
,
wePosterSubassembly
->
posterFontService
.
getFont
(
wePosterSubassembly
.
getFontId
(),
wePosterSubassembly
.
getFontSize
(),
wePosterSubassembly
.
getFontStyle
())));
.
collect
(
Collectors
.
toMap
(
wePosterSubassembly
->
{
return
wePosterSubassembly
.
getFontId
()+
"_"
+
wePosterSubassembly
.
getFontSize
()+
"_"
+
wePosterSubassembly
.
getFontStyle
();
},
wePosterSubassembly
->
posterFontService
.
getFont
(
wePosterSubassembly
.
getFontId
(),
wePosterSubassembly
.
getFontSize
(),
wePosterSubassembly
.
getFontStyle
())));
Map
<
String
,
NetFileUtils
.
FileCallable
>
fileCallableMap
=
poster
.
getPosterSubassemblyList
().
stream
().
map
(
WePosterSubassembly:
:
getImgPath
).
filter
(
StringUtils:
:
isNotBlank
).
distinct
().
collect
(
Collectors
.
toMap
(
s
->
s
,
NetFileUtils:
:
getNetFile
));
if
(
CollectionUtils
.
isEmpty
(
fileCallableMap
))
{
fileCallableMap
=
new
HashMap
<>();
...
...
@@ -160,7 +162,7 @@ public class WePosterServiceImpl extends ServiceImpl<WePosterMapper, WePoster> i
poster
.
setHeight
(
backgroundImg
.
getHeight
());
poster
.
getPosterSubassemblyList
().
forEach
(
wePosterSubassembly
->
{
if
(
wePosterSubassembly
.
getType
().
equals
(
1
))
{
Font
font
=
fontMap
.
get
(
wePosterSubassembly
.
getFontId
());
Font
font
=
fontMap
.
get
(
wePosterSubassembly
.
getFontId
()
+
"_"
+
wePosterSubassembly
.
getFontSize
()+
"_"
+
wePosterSubassembly
.
getFontStyle
()
);
FontMetrics
fontMetrics
=
ImageUtils
.
getFontMetrics
(
font
);
Color
color
;
if
(
StringUtils
.
isNotBlank
(
wePosterSubassembly
.
getFontColor
()))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录