Commit c00cbc54 authored by 王亮's avatar 王亮

add Wechat token interface.

parent 38b6b2cd
...@@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Qualifier; ...@@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
import java.util.Map; import java.util.Map;
@Component @Component
...@@ -37,6 +38,7 @@ public class WechatTokenReloadJobHandler { ...@@ -37,6 +38,7 @@ public class WechatTokenReloadJobHandler {
configuration.getList().stream().filter(i->i.getType()==0).forEach(i->{ configuration.getList().stream().filter(i->i.getType()==0).forEach(i->{
Map<String,String > result = wechatRemoteService.getAccessToken(i.getAppId(),i.getAppSecret()); Map<String,String > result = wechatRemoteService.getAccessToken(i.getAppId(),i.getAppSecret());
result.put("initial_time", LocalDateTime.now().toString());
if (result.containsKey("errcode")) { if (result.containsKey("errcode")) {
log.error("微信获取token失败:{}", i.getAppId()); log.error("微信获取token失败:{}", i.getAppId());
} else { } else {
......
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