|
@@ -166,6 +166,14 @@ public class CameraVersionServiceImpl extends ServiceImpl<ICameraVersionMapper,
|
|
if(param.getId() == null){
|
|
if(param.getId() == null){
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
}
|
|
}
|
|
|
|
+ Integer type = param.getType();
|
|
|
|
+ switch (type){
|
|
|
|
+ case 1: type = 1;break;
|
|
|
|
+ case 2: type = 9;break;
|
|
|
|
+ case 3: type = 10;break;
|
|
|
|
+ default: throw new BusinessException(ResultCode.CAMERA_TYPE_ERROR);
|
|
|
|
+ }
|
|
|
|
+ param.setType(type);
|
|
CameraVersion cameraVersion = this.getById(param.getId());
|
|
CameraVersion cameraVersion = this.getById(param.getId());
|
|
if(cameraVersion == null){
|
|
if(cameraVersion == null){
|
|
throw new BusinessException(ResultCode.CAMERA_VERSION_NOT_EXIST);
|
|
throw new BusinessException(ResultCode.CAMERA_VERSION_NOT_EXIST);
|