|
@@ -12,6 +12,7 @@ import com.fdkankan.ucenter.entity.UserIncrement;
|
|
|
import com.fdkankan.ucenter.service.*;
|
|
|
import com.fdkankan.ucenter.vo.response.CameraAppVo;
|
|
|
import com.fdkankan.ucenter.vo.response.GroupByCount;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -25,6 +26,7 @@ import java.util.Set;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
+@Slf4j
|
|
|
public class AppCameraService {
|
|
|
|
|
|
@Autowired
|
|
@@ -113,9 +115,11 @@ public class AppCameraService {
|
|
|
}
|
|
|
|
|
|
Set<Long> roleIds = userRoleService.getByUser(user);
|
|
|
+ log.info("roleIds:{}",roleIds);
|
|
|
if(!roleIds.contains(5L) || !roleIds.contains(6L) || !roleIds.contains(1L)){
|
|
|
throw new BusinessException(CameraConstant.FAILURE_CODE_6005, CameraConstant.FAILURE_MSG_6005);
|
|
|
}
|
|
|
+ log.info("user-companyId:{},camera-companyId:{}",user.getCompanyId(),cameraDetail.getCompanyId());
|
|
|
if(!user.getCompanyId().equals(cameraDetail.getCompanyId())){
|
|
|
throw new BusinessException(CameraConstant.FAILURE_CODE_6005, CameraConstant.FAILURE_MSG_6005);
|
|
|
}
|