Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
O
on-site-service
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
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
external
on-site-service
Commits
7a48cbbc
Commit
7a48cbbc
authored
Jul 08, 2022
by
shangtx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 公众号信息配置
parent
fb6b70c7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
application-third-service.yaml
constant/src/main/resources/application-third-service.yaml
+10
-0
pom.xml
mini-app/pom.xml
+6
-0
WeixinMessageService.java
...eservice/miniapp/service/weixin/WeixinMessageService.java
+2
-2
No files found.
constant/src/main/resources/application-third-service.yaml
View file @
7a48cbbc
...
...
@@ -30,6 +30,16 @@ wx:
token
:
#微信小程序消息服务器配置的token
aesKey
:
#微信小程序消息服务器配置的EncodingAESKey
msgDataFormat
:
JSON
# 公众号
mp
:
# TODO 暂时使用其他项目的
appId
:
wxceb5bea07decc398
#公众号的appid
secret
:
d5e1aeae4fa4daa6328a6a02ddafb9ff
#公众号的appsecret
token
:
OfficialAccounts2020
#接口配置里的Token值
aesKey
:
EBFO9I8JUrLLYZxSd1QqO08LyheQX1ABGLeNylv8LoW
#接口配置里的EncodingAESKey值
# configs:
# - appId: wxceb5bea07decc398 #公众号的appid
# secret: d5e1aeae4fa4daa6328a6a02ddafb9ff #公众号的appsecret
# 微信支付
pay
:
appId
:
wxa56f0845ca456bac
#微信公众号或者小程序等的appid
...
...
mini-app/pom.xml
View file @
7a48cbbc
...
...
@@ -31,6 +31,12 @@
<artifactId>
weixin-java-mp
</artifactId>
</dependency>
<!-- 微信公众号 -->
<dependency>
<groupId>
com.github.binarywang
</groupId>
<artifactId>
wx-java-mp-spring-boot-starter
</artifactId>
</dependency>
</dependencies>
<build>
...
...
mini-app/src/main/java/com/onsiteservice/miniapp/service/weixin/WeixinMessageService.java
View file @
7a48cbbc
package
com
.
onsiteservice
.
miniapp
.
service
.
weixin
;
import
com.alibaba.fastjson.JSON
;
import
com.onsiteservice.util.DateUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
me.chanjar.weixin.mp.api.WxMpService
;
...
...
@@ -10,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.util.Date
;
import
java.util.LinkedList
;
import
java.util.List
;
...
...
@@ -22,7 +22,7 @@ import java.util.List;
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
class
WeixinMessageService
{
//
@Autowired
@Autowired
private
WxMpService
wxService
;
/**
...
...
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