master
fst1996 2023-11-29 15:13:32 +08:00
parent fed2751093
commit 5564f1a1cd
1 changed files with 5 additions and 7 deletions

View File

@ -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";