Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
micro_app
gk
Commits
5eaa2357
Commit
5eaa2357
authored
May 17, 2026
by
daniel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(gk): WeChat二维码优化
parent
cc2b7d24
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
WechatMiniService.java
...dlbridge/jadp/plugins/cmpt/service/WechatMiniService.java
+11
-6
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/WechatMiniService.java
View file @
5eaa2357
...
@@ -14,9 +14,9 @@ import com.dlbridge.jadp.plugins.cmpt.utils.json.JsonUtil;
...
@@ -14,9 +14,9 @@ import com.dlbridge.jadp.plugins.cmpt.utils.json.JsonUtil;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.neusoft.www.utils.web.Result
;
import
com.neusoft.www.utils.web.Result
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.data.redis.core.ValueOperations
;
import
org.springframework.data.redis.core.ValueOperations
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.imageio.ImageIO
;
import
javax.imageio.ImageIO
;
...
@@ -236,13 +236,18 @@ public class WechatMiniService {
...
@@ -236,13 +236,18 @@ public class WechatMiniService {
return
;
return
;
}
}
Cmpt
cmpt
=
cmptService
.
queryCmptBycmptId
(
wxCodeParam
.
getCmptId
());
// 读取二维码图片
// 读取二维码图片
BufferedImage
qrCode
=
ImageIO
.
read
(
new
ByteArrayInputStream
(
bytes
));
BufferedImage
qrCode
=
ImageIO
.
read
(
new
ByteArrayInputStream
(
bytes
));
BufferedImage
qr
=
ImageIO
.
read
(
new
URL
(
cmpt
.
getLogo
()));
// 如果你要处理二维码(比如叠加 logo)
Cmpt
cmpt
=
cmptService
.
queryCmptBycmptId
(
wxCodeParam
.
getCmptId
());
String
logoUrl
=
cmpt
!=
null
?
cmpt
.
getLogo
()
:
null
;
if
(
StringUtils
.
isNotBlank
(
logoUrl
)
&&
logoUrl
.
startsWith
(
"http"
))
{
BufferedImage
qr
=
ImageIO
.
read
(
new
URL
(
logoUrl
));
overlapImageHDPlus
(
qrCode
,
qr
,
response
);
overlapImageHDPlus
(
qrCode
,
qr
,
response
);
}
else
{
ImageIO
.
write
(
qrCode
,
"jpg"
,
response
.
getOutputStream
());
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"===== 下载小程序二维码异常:{}"
,
e
.
getMessage
(),
e
);
log
.
error
(
"===== 下载小程序二维码异常:{}"
,
e
.
getMessage
(),
e
);
...
...
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