|
@@ -14,9 +14,11 @@ import com.fdkankan.ucenter.common.constants.ResultCode;
|
|
|
import com.fdkankan.ucenter.constant.LoginConstant;
|
|
|
import com.fdkankan.ucenter.entity.*;
|
|
|
import com.fdkankan.ucenter.service.*;
|
|
|
+import com.fdkankan.ucenter.vo.request.CameraInStoreParam;
|
|
|
import com.fdkankan.ucenter.vo.response.LaserSceneInfoVo;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -214,4 +216,18 @@ public class InnerServiceImpl implements IInnerService {
|
|
|
}
|
|
|
return cameraDetailService.getByCameraId(camera.getId());
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Camera cameraInStore(CameraInStoreParam param) {
|
|
|
+ if(param.getCameraType() == null || StringUtils.isBlank(param.getSnCode())){
|
|
|
+ throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
|
+ }
|
|
|
+ Camera camera = cameraService.getBySnCode(param.getSnCode());
|
|
|
+ if(camera != null){
|
|
|
+ return camera;
|
|
|
+ }
|
|
|
+ return cameraService.add(param.getSnCode(),param.getCameraType());
|
|
|
+
|
|
|
+ }
|
|
|
}
|