DeviceActiveEventHandle.java
832 Bytes
package cn.com.glsx.stdinterface.modules.component;
import cn.com.glsx.stdinterface.modules.model.datasync.DeviceActiveSync;
import cn.hutool.json.JSONUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;
/**
* 设备激活同步激活经纬度和激活地址
*
* @author yangll
*/
@Slf4j
@Component
public class DeviceActiveEventHandle {
@Autowired
private DeviceActiveComponent deviceActiveComponent;
@EventListener
public void event(DeviceActiveSync deviceActiveSync) {
log.info("event channel DeviceActive snList:{}", JSONUtil.toJsonStr(deviceActiveSync.getSnList()));
deviceActiveComponent.saveActiveInfo(deviceActiveSync);
}
}