|  |  |  | 
|---|
|  |  |  | ){ | 
|---|
|  |  |  | throw  new BusinessException(ResponseStatus.BAD_REQUEST); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(model.getMemberId()!=null){ | 
|---|
|  |  |  | //检查车主信息 | 
|---|
|  |  |  | Member member =memberMapper.selectOne(new QueryWrapper<Member>().lambda() | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | model.setMemberHkId(member.getHkId()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(!Constants.checkCarNo(model.getCode())){ | 
|---|
|  |  |  | throw  new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"请输入正确的车牌!"); | 
|---|
|  |  |  | }; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //检查车牌号是否重复 | 
|---|
|  |  |  | if(carsMapper.selectCount(new QueryWrapper<Cars>().lambda() | 
|---|
|  |  |  | .eq(Cars::getCode,model.getCode() ) | 
|---|
|  |  |  | 
|---|
|  |  |  | Cars car = carJoinMapper.selectById(model.getId()); | 
|---|
|  |  |  | if(car ==null ||Constants.equalsInteger(car.getIsdeleted(),Constants.ONE)){ | 
|---|
|  |  |  | throw  new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,车辆信息不存在!"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(!Constants.checkCarNo(model.getCode())){ | 
|---|
|  |  |  | throw  new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"请输入正确的车牌!"); | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | if(model.getMemberId()!=null){ | 
|---|
|  |  |  | //检查车主信息 | 
|---|
|  |  |  | Member member =memberMapper.selectOne(new QueryWrapper<Member>().lambda() | 
|---|