Browse Source

出入校通知微信推送跳转URL

chenw 6 years ago
parent
commit
cb5d4a0bb0

+ 4 - 0
applications/device/device-server/src/main/java/com/usoftchina/smartschool/device/service/impl/AccessControlServiceImpl.java

@@ -49,6 +49,9 @@ public class AccessControlServiceImpl implements AccessControlService{
     @Value("${wechat.template.accesscontrol}")
     private String accessControlTemplateId;
 
+    @Value("${smartschool.domain.wechat}")
+    private String wechatBaseUrl;
+
     @Override
     public void onAccessControlEvent(AccessControlInfo info) {
         String filePath = null;
@@ -102,6 +105,7 @@ public class AccessControlServiceImpl implements AccessControlService{
          * 3、推送消息到消息服务器(微信服务监听此消息发送微信消息)
          */
         MessageInfoDTO msg = new MessageInfoDTO();
+        msg.setUrl(wechatBaseUrl + "/accessnoticedetail/" + record.getRecord_id());
         msg.setAppId(studentInfo.getAppId());
         msg.setSecret(studentInfo.getSecret());
         msg.setTouser(studentInfo.getOpenId());

+ 3 - 1
applications/device/device-server/src/main/resources/application.yml

@@ -76,4 +76,6 @@ mybatis:
   mapper-locations: classpath:mapper/*.xml
 smartschool:
   wechat:
-    pushUrl: https://school-api.ubtob.com/api/wechat/send/Messages
+    pushUrl: https://school-api.ubtob.com/api/wechat/send/Messages
+  domain:
+    wechat: https://school-wechat.ubtob.com

+ 3 - 1
applications/device/device-server/src/main/resources/config/application-docker-cloud.yml

@@ -23,4 +23,6 @@ spring:
         connection-timeout: 30000
 smartschool:
   wechat:
-    pushUrl: https://school-api.ydyhz.com/api/wechat/send/Messages
+    pushUrl: https://school-api.ydyhz.com/api/wechat/send/Messages
+  domain:
+    wechat: https://school-wechat.ydyhz.com

+ 3 - 1
applications/device/device-server/src/main/resources/config/application-docker-prod.yml

@@ -15,4 +15,6 @@ spring:
     port: 6379
 smartschool:
   wechat:
-    pushUrl: https://school-api.ubtob.com/api/wechat/send/Messages
+    pushUrl: https://school-api.ubtob.com/api/wechat/send/Messages
+  domain:
+    wechat: https://school-wechat.ubtob.com