DeviceActiveEventHandle.java 818 Bytes
package cn.com.glsx.admin.modules.component;


import cn.com.glsx.admin.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);
    }
}