| @@ -22,10 +22,11 @@ public class AppAccessTokenSchedule { | |||||
| @Autowired | @Autowired | ||||
| private WxOpenService openService; | private WxOpenService openService; | ||||
| // @Scheduled(cron = "0 */30 * * * *?") // 每30分钟更新一次 | |||||
| @Scheduled(cron = "0 0 */1 * * *?") // 每小时更新一次 | |||||
| //@Scheduled(cron = "*/10 * * * * ?") // 测试10秒中一次 | //@Scheduled(cron = "*/10 * * * * ?") // 测试10秒中一次 | ||||
| public void updateAppAccessToken() { | public void updateAppAccessToken() { | ||||
| // 微信小程序 | // 微信小程序 | ||||
| /* | |||||
| List<WxAuthorizerInfo> weappList = authorizerInfoMapper.findWeappList(); | List<WxAuthorizerInfo> weappList = authorizerInfoMapper.findWeappList(); | ||||
| weappList.stream().forEach(wxAuthorizerInfo -> { | weappList.stream().forEach(wxAuthorizerInfo -> { | ||||
| try { | try { | ||||
| @@ -34,6 +35,7 @@ public class AppAccessTokenSchedule { | |||||
| logger.error(e.getMessage()); | logger.error(e.getMessage()); | ||||
| } | } | ||||
| }); | }); | ||||
| */ | |||||
| // 微信公众号 | // 微信公众号 | ||||
| List<WxAuthorizerInfo> wxmpList = authorizerInfoMapper.findWxMpList(); | List<WxAuthorizerInfo> wxmpList = authorizerInfoMapper.findWxMpList(); | ||||