周箭河 5 rokov pred
rodič
commit
b2a643d2d2

+ 6 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/NotifyCallback.java

@@ -2,8 +2,10 @@ package com.keao.edu.user.service;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
+import com.huifu.adapay.Adapay;
 import com.huifu.adapay.notify.MQTTCallbackHandler;
 import com.keao.edu.thirdparty.adapay.ConfigInit;
+import com.keao.edu.user.dao.SysConfigDao;
 import com.keao.edu.user.entity.ExamRegistrationPayment;
 import com.keao.edu.user.enums.TransStatusEnum;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -19,6 +21,8 @@ public class NotifyCallback implements MQTTCallbackHandler {
 
     @Autowired
     private ExamRegistrationPaymentService examRegistrationPaymentService;
+    @Autowired
+    private SysConfigDao sysConfigDao;
 
 
     private static NotifyCallback notifyCallback;
@@ -26,6 +30,8 @@ public class NotifyCallback implements MQTTCallbackHandler {
     @PostConstruct
     public void init() {
         notifyCallback = this;
+        String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
+        Adapay.setDeviceID(baseApiUrl);
     }
 
     /**