|
@@ -60,6 +60,8 @@ public class UserIncrementServiceImpl extends ServiceImpl<IUserIncrementMapper,
|
|
|
SmsService smsService;
|
|
|
@Autowired
|
|
|
IMailTemplateService mailTemplateService;
|
|
|
+ @Autowired
|
|
|
+ ICameraIncrementLogService cameraIncrementLogService;
|
|
|
|
|
|
@Override
|
|
|
public Long getCountByUserId(Long userId, int type) {
|
|
@@ -198,6 +200,7 @@ public class UserIncrementServiceImpl extends ServiceImpl<IUserIncrementMapper,
|
|
|
userIncrement.setCameraId(cameraEntity.getId());
|
|
|
userIncrement.setUpdateTime(DateUserUtil.getDate(new Date()));
|
|
|
this.updateById(userIncrement);
|
|
|
+ cameraIncrementLogService.saveLog(cameraEntity.getId(),userIncrement.getId(),user.getId(),0);
|
|
|
sceneProService.lockOrUnLockBySpace(cameraDetailEntity,cameraEntity.getId(),1);
|
|
|
}
|
|
|
|
|
@@ -217,10 +220,16 @@ public class UserIncrementServiceImpl extends ServiceImpl<IUserIncrementMapper,
|
|
|
if(cameraDetail == null){
|
|
|
throw new BusinessException(CameraConstant.FAILURE_CODE_6003, CameraConstant.FAILURE_MSG_6003);
|
|
|
}
|
|
|
+ User user = userService.getByUserName(param.getUserName());
|
|
|
+ if(user == null){
|
|
|
+ throw new BusinessException(CameraConstant.FAILURE_CODE_6003, CameraConstant.FAILURE_MSG_6003);
|
|
|
+ }
|
|
|
+ cameraIncrementLogService.saveLog(userIncrement.getCameraId(),userIncrement.getId(),user.getId(),1);
|
|
|
LambdaUpdateWrapper<UserIncrement> wrapper = new LambdaUpdateWrapper<>();
|
|
|
wrapper.eq(UserIncrement::getId,param.getId());
|
|
|
wrapper.set(UserIncrement::getCameraId,null);
|
|
|
this.update(wrapper);
|
|
|
+
|
|
|
sceneProService.lockOrUnLockBySpace(cameraDetail,cameraDetail.getCameraId(),-2);
|
|
|
}
|
|
|
|