master
parent
fed2751093
commit
5564f1a1cd
|
@ -40,16 +40,14 @@ public class TopLineServiceImpl extends ServiceImpl<TopicCarMapper, TopicCar> i
|
||||||
throw new ServiceException("车辆vin不能为空");
|
throw new ServiceException("车辆vin不能为空");
|
||||||
}
|
}
|
||||||
//根据车辆vinId查询车辆信息
|
//根据车辆vinId查询车辆信息
|
||||||
QueryWrapper<TopicCar> wrapper = new QueryWrapper<>();
|
TopicCar topicCar = carMapper.selectById(getTopicReq.getCarVin());
|
||||||
wrapper.eq("carVinId",getTopicReq.getCarVin());
|
if (StringUtils.isEmpty(new TopicCar[]{topicCar})){
|
||||||
TopicCar car = (TopicCar) carMapper.selectObjs(wrapper);
|
|
||||||
if (StringUtils.isEmpty(new TopicCar[]{car})){
|
|
||||||
throw new ServiceException("车辆信息不存在");
|
throw new ServiceException("车辆信息不存在");
|
||||||
}
|
}
|
||||||
//把车辆状态修改为上线 1
|
//把车辆状态修改为上线 1
|
||||||
car.setStatus(1);
|
topicCar.setStatus(1);
|
||||||
carMapper.update(car,new QueryWrapper<TopicCar>().eq("carVinId",getTopicReq.getCarVin()));
|
carMapper.update(topicCar,new QueryWrapper<TopicCar>().eq("carVinId",getTopicReq.getCarVin()));
|
||||||
return car.getTopic();
|
return topicCar.getTopic();
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
log.info(e.getMessage());
|
log.info(e.getMessage());
|
||||||
return "god";
|
return "god";
|
||||||
|
|
Loading…
Reference in New Issue