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