guq пре 6 година
родитељ
комит
0f56ac8ebc

+ 3 - 3
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/support/RemindTask.java

@@ -1,6 +1,7 @@
 package com.usoftchina.smartschool.school.wxschool.support;
 
 import com.alibaba.fastjson.JSON;
+import com.usoftchina.smartschool.context.SpringContextHolder;
 import com.usoftchina.smartschool.school.po.MeetingDO;
 import com.usoftchina.smartschool.school.po.SchoolDO;
 import com.usoftchina.smartschool.school.wxschool.mapper.WxMeetingMapper;
@@ -10,8 +11,8 @@ import com.usoftchina.smartschool.school.wxschool.mapper.WxTemplateMapper;
 import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
 import com.usoftchina.smartschool.wechat.api.WxPushApi;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 
+import javax.swing.*;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.List;
@@ -36,8 +37,7 @@ public class RemindTask extends TimerTask {
     private WxTemplateMapper wxTemplateMapper;
 
 
-    @Value("${smartschool.domain.wechat}")
-    private String wechatUrl;
+    private final static String wechatUrl = SpringContextHolder.getDomain();
 
     private MeetingDO meetingDO;