|
@@ -1,6 +1,7 @@
|
|
|
package com.fdkankan.manage.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.fdkankan.common.constant.Constant;
|
|
|
import com.fdkankan.common.constant.ErrorCode;
|
|
@@ -66,11 +67,13 @@ public class CameraDetailServiceImpl extends ServiceImpl<ICameraDetailMapper, Ca
|
|
|
fdkkLaserService.disableCooperation(snCode,cooperationUserName); //通知深时删除协作场景
|
|
|
}
|
|
|
sceneCooperationService.deleteCooperation(cameraId); //删除协作场景关系
|
|
|
- cameraDetail.setUserId(null);
|
|
|
- cameraDetail.setCooperationUser(null);
|
|
|
+ LambdaUpdateWrapper<CameraDetail> wrapper = new LambdaUpdateWrapper<>();
|
|
|
+ wrapper.eq(CameraDetail::getCameraId,cameraId);
|
|
|
+ wrapper.set(CameraDetail::getUserId,null);
|
|
|
+ wrapper.set(CameraDetail::getCooperationUser,null);
|
|
|
//恢复10G基本容量
|
|
|
- cameraDetail.setTotalSpace(Long.parseLong(Constant.EXPANSION_SPACE_VALUE_1G ) * 10L);
|
|
|
- this.updateById(cameraDetail);
|
|
|
+ wrapper.set(CameraDetail::getTotalSpace,Long.parseLong(Constant.EXPANSION_SPACE_VALUE_1G ) * 10L);
|
|
|
+ this.update(wrapper);
|
|
|
|
|
|
sceneProService.lockOrUnLockBySpace(cameraDetail,cameraId,-2); //封存场景
|
|
|
|