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
4d491caa
Commit
4d491caa
authored
Sep 07, 2021
by
chenlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小程序码日志添加
parent
7cfd95c8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
12 deletions
+24
-12
pom.xml
pom.xml
+14
-8
ResourcesController.java
...m/dlbridge/jadp/plugins/cmpt/web/ResourcesController.java
+9
-3
application.properties
src/main/resources/application.properties
+1
-1
No files found.
pom.xml
View file @
4d491caa
...
...
@@ -75,7 +75,7 @@
<dependency>
<groupId>
com.github.pagehelper
</groupId>
<artifactId>
pagehelper-spring-boot-starter
</artifactId>
<version>
1.2.1
0
</version>
<version>
1.2.1
3
</version>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
...
...
@@ -231,9 +231,9 @@
<version>
4.5.8
</version>
</dependency>
<dependency>
<groupId>
bouncycastle
</groupId>
<artifactId>
bcprov-jdk15
</artifactId>
<version>
1
46
</version>
<groupId>
org.bouncycastle.bcprov-jdk15on.1.57.org.
bouncycastle
</groupId>
<artifactId>
bcprov-jdk15
on
</artifactId>
<version>
1
.57
</version>
</dependency>
<dependency>
<groupId>
dom4j
</groupId>
...
...
@@ -387,7 +387,7 @@
<repository>
<id>
nexus
</id>
<name>
Private Repositories
</name>
<url>
http://maven.
geexek.com.cn
/nexus/content/groups/public/
</url>
<url>
http://maven.
aliyun.com
/nexus/content/groups/public/
</url>
<snapshots>
<enabled>
true
</enabled>
<updatePolicy>
daily
</updatePolicy>
...
...
@@ -399,7 +399,7 @@
<pluginRepository>
<id>
nexus
</id>
<name>
Private Repositories
</name>
<url>
http://maven.
geexek.com.cn
/nexus/content/groups/public/
</url>
<url>
http://maven.
aliyun.com
/nexus/content/groups/public/
</url>
<snapshots>
<enabled>
false
</enabled>
<updatePolicy>
daily
</updatePolicy>
...
...
@@ -453,9 +453,15 @@
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-surefire-plugin
</artifactId>
<version>
2.21.0
</version>
<configuration>
<testFailureIgnore>
true
</testFailureIgnore>
</configuration>
</plugin>
</plugins>
</build>
</project>
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/ResourcesController.java
View file @
4d491caa
...
...
@@ -2,6 +2,7 @@ package com.dlbridge.jadp.plugins.cmpt.web;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.Cmpt
;
import
com.dlbridge.jadp.plugins.cmpt.service.CmptService
;
import
lombok.extern.log4j.Log4j2
;
import
org.json.JSONObject
;
import
org.springframework.data.redis.core.ValueOperations
;
import
org.springframework.http.ResponseEntity
;
...
...
@@ -24,6 +25,7 @@ import java.net.URL;
@Controller
@RequestMapping
(
value
=
"/img"
)
@ApiIgnore
@Log4j2
public
class
ResourcesController
{
@Resource
...
...
@@ -67,9 +69,13 @@ public class ResourcesController {
+
(
String
)
valueOperations
.
get
(
"micro_gk:access_token_"
+
partnerId
)
,
obj
.
toString
(),
org
.
springframework
.
core
.
io
.
Resource
.
class
);
Cmpt
cmpt
=
cmptService
.
queryCmptBycmptId
(
cmptid
);
BufferedImage
bg
=
ImageIO
.
read
(
resourceResponseEntity
.
getBody
().
getInputStream
());
BufferedImage
qr
=
ImageIO
.
read
(
new
URL
(
cmpt
.
getLogo
()));
overlapImage
(
bg
,
qr
,
response
);
if
(
resourceResponseEntity
.
getBody
().
getInputStream
()
!=
null
){
BufferedImage
bg
=
ImageIO
.
read
(
resourceResponseEntity
.
getBody
().
getInputStream
());
BufferedImage
qr
=
ImageIO
.
read
(
new
URL
(
cmpt
.
getLogo
()));
overlapImage
(
bg
,
qr
,
response
);
}
else
{
log
.
info
(
"=====获取小程序码为空:"
+
resourceResponseEntity
.
getBody
().
toString
());
}
}
public
static
String
overlapImage
(
BufferedImage
bg
,
BufferedImage
qrCodeIps
,
HttpServletResponse
response
)
{
...
...
src/main/resources/application.properties
View file @
4d491caa
spring.profiles.active
=
dev
spring.profiles.active
=
production
spring.session.store-type
=
REDIS
spring.session.timeout
=
PT30M
\ No newline at end of file
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