| | |
| | | package com.moral.api.kafka.consumer; |
| | | |
| | | import com.moral.api.utils.AdjustDataUtils; |
| | | import com.moral.api.utils.UnitConvertUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.kafka.clients.consumer.ConsumerRecord; |
| | |
| | | continue; |
| | | //取出基本信息 |
| | | SpecialDevice specialDevice = socket.getSpecialDevice(); |
| | | Map<String, Object> adjustFormula = socket.getAdjustFormula(); |
| | | Map<String, Object> regionAqi = socket.getRegionAqi(); |
| | | if(adjustFormula!=null) |
| | | data = AdjustDataUtils.adjust(data,adjustFormula,regionAqi); |
| | | //创建最终消息对象 |
| | | Map<String, Object> result = new HashMap<>(); |
| | | result.put("time",data.get("time")); |