diff --git a/device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceSendThirdPartyService.java b/device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceSendThirdPartyService.java index eb0103c0cd666d6bcf7458b6ea0235476c7b0816..ef3b69b68f927cfad9b54c275ae1284912f4fcb2 100644 --- a/device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceSendThirdPartyService.java +++ b/device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceSendThirdPartyService.java @@ -1,23 +1,15 @@ package com.mortals.xhx.daemon.applicationservice; -import cn.hutool.core.net.url.UrlBuilder; -import com.alibaba.fastjson.JSON; -import com.mortals.framework.ap.GlobalSysInfo; import com.mortals.framework.service.ICacheService; import com.mortals.framework.springcloud.service.IApplicationStartedService; import com.mortals.xhx.base.system.message.MessageService; -import com.mortals.xhx.busiz.rsp.ApiResp; -import com.mortals.xhx.common.pdu.DeviceReq; import com.mortals.xhx.common.utils.SendTaskThreadPool; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; -import org.springframework.util.ObjectUtils; -import static com.mortals.xhx.common.key.Constant.PARAM_SERVER_PHP_IN_HTTP_URL; import static com.mortals.xhx.common.key.Constant.SEND_INTEVEL; -import static com.mortals.xhx.common.key.RedisKey.KEY_DEVICE_THIRDPARTY_QUEUE; @Component @Slf4j @@ -45,12 +37,12 @@ public class DeviceSendThirdPartyService implements IApplicationStartedService { int waitTime = SEND_INTEVEL; while (!stopped) { try { - DeviceReq deviceReq = cacheService.lpop(KEY_DEVICE_THIRDPARTY_QUEUE, DeviceReq.class); - if (!ObjectUtils.isEmpty(deviceReq)) { - String phpInUrl = GlobalSysInfo.getParamValue(PARAM_SERVER_PHP_IN_HTTP_URL, "http://172.15.28.116:8090"); - ApiResp<String> resp = messageService.sendThirdParty(UrlBuilder.of(phpInUrl).addPath(thirdPartyPath).build(), deviceReq); - log.info("sendThirty resp ==>{}", JSON.toJSONString(resp)); - } +// DeviceReq deviceReq = cacheService.lpop(KEY_DEVICE_THIRDPARTY_QUEUE, DeviceReq.class); +// if (!ObjectUtils.isEmpty(deviceReq)) { +// String phpInUrl = GlobalSysInfo.getParamValue(PARAM_SERVER_PHP_IN_HTTP_URL, "http://172.15.28.116:8090"); +// ApiResp<String> resp = messageService.sendThirdParty(UrlBuilder.of(phpInUrl).addPath(thirdPartyPath).build(), deviceReq); +// log.info("sendThirty resp ==>{}", JSON.toJSONString(resp)); +// } // try { // Thread.sleep(waitTime);