Commit c9feddf3 by 杨林龙

修改问题

1 parent 0b9c3c7f
......@@ -5,6 +5,7 @@ import cn.com.glsx.kafka.entity.ElectricFenceDrive;
import cn.com.glsx.kafka.protocol.ElectricFence;
import cn.com.glsx.kafka.queue.base.MessageReceiver;
import cn.com.glsx.kafka.service.IFenceDriverService;
import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -28,9 +29,10 @@ public class FenceDriverConsumer extends MessageReceiver {
log.info("消费【试驾】围栏的kafka数据" + topic);
ElectricFence.TriggerTestDriveInfo testDriveInfo = ElectricFence.TriggerTestDriveInfo.parseFrom(message);
ElectricFenceDrive fenceDrive = convertFencerDriver(testDriveInfo);
log.info("消费【试驾】围栏的数据" + JSON.toJSONString(fenceDrive));
if (fenceDrive == null) {
log.info("消费数据不正确或为空。");
return ;
return;
}
if (fenceDrive.getSveSystemId() != KafkaConstant.SVE_SYSTEM_ID_EDUN) {
log.info("非新e盾的【试驾】围栏数据,不予入库。");
......@@ -43,7 +45,7 @@ public class FenceDriverConsumer extends MessageReceiver {
return;
}
driverService.insertFenceDrive(fenceDrive);
}catch (Exception e){
} catch (Exception e) {
log.error(topic + "Exception", e.getMessage());
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!