Explorar o código

固件管理type

lyhzzz %!s(int64=2) %!d(string=hai) anos
pai
achega
dd8744e7c7

+ 8 - 0
src/main/java/com/fdkankan/manage/service/impl/CameraVersionServiceImpl.java

@@ -166,6 +166,14 @@ public class CameraVersionServiceImpl extends ServiceImpl<ICameraVersionMapper,
         if(param.getId() == null){
             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());
         if(cameraVersion == null){
             throw new BusinessException(ResultCode.CAMERA_VERSION_NOT_EXIST);