Commit 7a48cbbc authored by shangtx's avatar shangtx

fix: 公众号信息配置

parent fb6b70c7
...@@ -30,6 +30,16 @@ wx: ...@@ -30,6 +30,16 @@ wx:
token: #微信小程序消息服务器配置的token token: #微信小程序消息服务器配置的token
aesKey: #微信小程序消息服务器配置的EncodingAESKey aesKey: #微信小程序消息服务器配置的EncodingAESKey
msgDataFormat: JSON msgDataFormat: JSON
# 公众号
mp:
# TODO 暂时使用其他项目的
appId: wxceb5bea07decc398 #公众号的appid
secret: d5e1aeae4fa4daa6328a6a02ddafb9ff #公众号的appsecret
token: OfficialAccounts2020 #接口配置里的Token值
aesKey: EBFO9I8JUrLLYZxSd1QqO08LyheQX1ABGLeNylv8LoW #接口配置里的EncodingAESKey值
# configs:
# - appId: wxceb5bea07decc398 #公众号的appid
# secret: d5e1aeae4fa4daa6328a6a02ddafb9ff #公众号的appsecret
# 微信支付 # 微信支付
pay: pay:
appId: wxa56f0845ca456bac #微信公众号或者小程序等的appid appId: wxa56f0845ca456bac #微信公众号或者小程序等的appid
......
...@@ -31,6 +31,12 @@ ...@@ -31,6 +31,12 @@
<artifactId>weixin-java-mp</artifactId> <artifactId>weixin-java-mp</artifactId>
</dependency> </dependency>
<!-- 微信公众号 -->
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>wx-java-mp-spring-boot-starter</artifactId>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
package com.onsiteservice.miniapp.service.weixin; package com.onsiteservice.miniapp.service.weixin;
import com.alibaba.fastjson.JSON;
import com.onsiteservice.util.DateUtils; import com.onsiteservice.util.DateUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.mp.api.WxMpService; import me.chanjar.weixin.mp.api.WxMpService;
...@@ -10,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -10,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Date; import java.util.Date;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
...@@ -22,7 +22,7 @@ import java.util.List; ...@@ -22,7 +22,7 @@ import java.util.List;
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public class WeixinMessageService { public class WeixinMessageService {
// @Autowired @Autowired
private WxMpService wxService; private WxMpService wxService;
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment