Commit 73a2338c by 杨林龙

优化获取 vdId 业务逻辑

1 parent aa08a6d1
...@@ -49,7 +49,8 @@ public class ElectricInStoreService { ...@@ -49,7 +49,8 @@ public class ElectricInStoreService {
if (device != null) { if (device != null) {
electricInStoreDrive.setVdId(device.getId()); electricInStoreDrive.setVdId(device.getId());
} else { } else {
throw new StdinterfaceException("vdId 不存在,属于无效数据,设备号为:" + electricInStoreDrive.getSn()); log.warn("vdId 不存在,属于无效数据,设备号为:" + electricInStoreDrive.getSn());
return;
} }
} }
} }
......
package cn.com.glsx.stdinterface.modules.service; package cn.com.glsx.stdinterface.modules.service;
import cn.com.glsx.stdinterface.common.exception.StdinterfaceException;
import cn.com.glsx.stdinterface.dto.ElectricFenceDto; import cn.com.glsx.stdinterface.dto.ElectricFenceDto;
import cn.com.glsx.stdinterface.modules.mapper.ElectricFenceDriveMapper; import cn.com.glsx.stdinterface.modules.mapper.ElectricFenceDriveMapper;
import cn.com.glsx.stdinterface.modules.mapper.VehicleDeviceMapper; import cn.com.glsx.stdinterface.modules.mapper.VehicleDeviceMapper;
import cn.com.glsx.stdinterface.modules.model.ElectricFenceDrive; import cn.com.glsx.stdinterface.modules.model.ElectricFenceDrive;
import cn.com.glsx.stdinterface.modules.model.VehicleDevice; import cn.com.glsx.stdinterface.modules.model.VehicleDevice;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -16,6 +16,7 @@ import java.util.List; ...@@ -16,6 +16,7 @@ import java.util.List;
/** /**
* 有效试驾 * 有效试驾
*/ */
@Slf4j
@Service @Service
public class FenceDriverService { public class FenceDriverService {
...@@ -48,7 +49,8 @@ public class FenceDriverService { ...@@ -48,7 +49,8 @@ public class FenceDriverService {
if (device != null) { if (device != null) {
fenceDrive.setVdId(device.getId()); fenceDrive.setVdId(device.getId());
} else { } else {
throw new StdinterfaceException("vdId 不存在,属于无效数据,设备号为:" + fenceDrive.getSn()); log.warn("vdId 不存在,属于无效数据,设备号为:" + fenceDrive.getSn());
return;
} }
} }
} }
......
package cn.com.glsx.stdinterface.modules.service; package cn.com.glsx.stdinterface.modules.service;
import cn.com.glsx.stdinterface.common.exception.StdinterfaceException;
import cn.com.glsx.stdinterface.dto.RouteOilMileageDto; import cn.com.glsx.stdinterface.dto.RouteOilMileageDto;
import cn.com.glsx.stdinterface.modules.mapper.RouteOilMileageMapper; import cn.com.glsx.stdinterface.modules.mapper.RouteOilMileageMapper;
import cn.com.glsx.stdinterface.modules.mapper.VehicleDeviceMapper; import cn.com.glsx.stdinterface.modules.mapper.VehicleDeviceMapper;
...@@ -75,7 +74,8 @@ public class RouteOilMileageService { ...@@ -75,7 +74,8 @@ public class RouteOilMileageService {
if (device != null) { if (device != null) {
routeOilMileage.setVdId(device.getId()); routeOilMileage.setVdId(device.getId());
} else { } else {
throw new StdinterfaceException("vdId 不存在,属于无效数据,设备号为:" + romd.getSn()); log.warn("vdId 不存在,属于无效数据,设备号为:" + romd.getSn());
return;
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!