master
parent
014d78685d
commit
fed2751093
|
@ -26,7 +26,7 @@ import java.util.List;
|
||||||
public class TopLineServiceImpl extends ServiceImpl<TopicCarMapper, TopicCar> implements TopLineService {
|
public class TopLineServiceImpl extends ServiceImpl<TopicCarMapper, TopicCar> implements TopLineService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private CarMapper carMapper;
|
private TopicCarMapper carMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 车辆上线,同时返回主题
|
* 车辆上线,同时返回主题
|
||||||
|
@ -40,15 +40,15 @@ public class TopLineServiceImpl extends ServiceImpl<TopicCarMapper, TopicCar> i
|
||||||
throw new ServiceException("车辆vin不能为空");
|
throw new ServiceException("车辆vin不能为空");
|
||||||
}
|
}
|
||||||
//根据车辆vinId查询车辆信息
|
//根据车辆vinId查询车辆信息
|
||||||
QueryWrapper<Car> wrapper = new QueryWrapper<>();
|
QueryWrapper<TopicCar> wrapper = new QueryWrapper<>();
|
||||||
wrapper.eq("carVinId",getTopicReq.getCarVin());
|
wrapper.eq("carVinId",getTopicReq.getCarVin());
|
||||||
Car car = (Car) carMapper.selectObjs(wrapper);
|
TopicCar car = (TopicCar) carMapper.selectObjs(wrapper);
|
||||||
if (StringUtils.isEmpty(new Car[]{car})){
|
if (StringUtils.isEmpty(new TopicCar[]{car})){
|
||||||
throw new ServiceException("车辆信息不存在");
|
throw new ServiceException("车辆信息不存在");
|
||||||
}
|
}
|
||||||
//把车辆状态修改为上线 1
|
//把车辆状态修改为上线 1
|
||||||
car.setStatus(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();
|
return car.getTopic();
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
log.info(e.getMessage());
|
log.info(e.getMessage());
|
||||||
|
|
Loading…
Reference in New Issue