master
fst1996 2023-11-29 15:07:06 +08:00
parent 014d78685d
commit fed2751093
1 changed files with 5 additions and 5 deletions

View File

@ -26,7 +26,7 @@ import java.util.List;
public class TopLineServiceImpl extends ServiceImpl<TopicCarMapper, TopicCar> implements TopLineService {
@Autowired
private CarMapper carMapper;
private TopicCarMapper carMapper;
/**
* 线
@ -40,15 +40,15 @@ public class TopLineServiceImpl extends ServiceImpl<TopicCarMapper, TopicCar> i
throw new ServiceException("车辆vin不能为空");
}
//根据车辆vinId查询车辆信息
QueryWrapper<Car> wrapper = new QueryWrapper<>();
QueryWrapper<TopicCar> wrapper = new QueryWrapper<>();
wrapper.eq("carVinId",getTopicReq.getCarVin());
Car car = (Car) carMapper.selectObjs(wrapper);
if (StringUtils.isEmpty(new Car[]{car})){
TopicCar car = (TopicCar) carMapper.selectObjs(wrapper);
if (StringUtils.isEmpty(new TopicCar[]{car})){
throw new ServiceException("车辆信息不存在");
}
//把车辆状态修改为上线 1
car.setStatus(1);
carMapper.update(car,new QueryWrapper<Car>().eq("carVinId",getTopicReq.getCarVin()));
carMapper.update(car,new QueryWrapper<TopicCar>().eq("carVinId",getTopicReq.getCarVin()));
return car.getTopic();
}catch (Exception e){
log.info(e.getMessage());