zoujiajian 3 years ago
parent
commit
a4a093ce20
1 changed files with 1 additions and 1 deletions
  1. 1 1
      netflix-service/src/main/java/com/cyksj/task/Scheduler.java

+ 1 - 1
netflix-service/src/main/java/com/cyksj/task/Scheduler.java

@@ -105,13 +105,13 @@ public class Scheduler {
         DateTime zero = DateUtil.offset(now, DateField.HOUR, -9);
         DateTime time = DateUtil.offset(zero, DateField.DAY_OF_MONTH, 5);
         List<GroupsRelation> groupsRelations = groupsRelationMapper.selectList(Wrappers.lambdaQuery(GroupsRelation.class).le(GroupsRelation::getExpiryTime, time));
+        String url = String.format("%sauth/weChat?url=%syinhe/web/ticket", envCommonService.getHost(), envCommonService.getDomain());
         for (GroupsRelation relation : groupsRelations) {
             User user = userMapper.selectById(relation.getUserId());
             if (user != null && StrUtil.isNotBlank(user.getOpenId())) {
                 String openId = user.getOpenId();
                 WxAppTemplateView wxAppTemplateView = templateCommonService.getWxAppByUserId(openId, TemplateEnum.EXPIRY_TEMPLATE.getDesc());
                 if (wxAppTemplateView != null) {
-                    String url = String.format("%sauth/weChat?url=%syinhe/web/ticket", envCommonService.getHost(), envCommonService.getDomain());
                     WxMpTemplateMessage templateMessage = new WxMpTemplateMessage()
                             .setToUser(openId)
                             .setTemplateId(wxAppTemplateView.getTemplateId())