Commit 9d5d120b by 杨林龙

开发警情消费服务

1 parent 5c356850
...@@ -58,7 +58,7 @@ public class GpsAlarmConsumer extends MessageReceiver { ...@@ -58,7 +58,7 @@ public class GpsAlarmConsumer extends MessageReceiver {
log.info(sw.getLastTaskName() + "执行耗时:" + sw.getLastTaskTimeMillis()); log.info(sw.getLastTaskName() + "执行耗时:" + sw.getLastTaskTimeMillis());
if (deviceDto != null) { if (deviceDto != null) {
String deviceClassify = deviceDto.getModelName(); String deviceClassify = deviceDto.getModelName();
log.info("topic:gps_alarm, sn:" + sn + "deviceClassify:" + deviceClassify); log.info("topic:gps_alarm, sn:" + sn + ";deviceClassify:" + deviceClassify);
if (StringUtils.isNullOrEmpty(deviceClassify)) { if (StringUtils.isNullOrEmpty(deviceClassify)) {
log.info("未知设备类型,其设备号是:" + sn); log.info("未知设备类型,其设备号是:" + sn);
return; return;
......
package cn.com.glsx.kafka.service;
import cn.com.glsx.Application;
import cn.com.glsx.stdinterface.dto.VehicleDto;
import cn.hutool.json.JSONUtil;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class GpsAlarmServiceTest {
@Autowired
private GpsAlarmService gpsAlarmService;
@Test
public void test01() {
VehicleDto vehicleBySn = gpsAlarmService.getVehicleBySn("1610507001");
System.out.println("vehicleBySn = " + JSONUtil.toJsonStr(vehicleBySn));
}
}
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!