|
@@ -140,7 +140,13 @@ public class UserServiceImpl extends ServiceImpl<IUserMapper, User> implements I
|
|
User user = this.getByUserName(userName);
|
|
User user = this.getByUserName(userName);
|
|
UserVo userVo = new UserVo();
|
|
UserVo userVo = new UserVo();
|
|
BeanUtils.copyProperties(user,userVo);
|
|
BeanUtils.copyProperties(user,userVo);
|
|
- Long cameraCount = cameraDetailService.getCountByCompanyId(user.getCompanyId(),null);
|
|
|
|
|
|
+ Set<Long> roleIds = userRoleService.getByUser(user);
|
|
|
|
+ Long cameraCount = 0L;
|
|
|
|
+ if(!roleIds.contains(5L) && !roleIds.contains(6L) && !roleIds.contains(1L)){
|
|
|
|
+ cameraCount = cameraDetailService.getCountByCompanyId(user.getCompanyId(),null);
|
|
|
|
+ }else {
|
|
|
|
+ cameraCount = cameraDetailService.getCountByUserId(user.getId(),null);
|
|
|
|
+ }
|
|
Long incrementNum = userIncrementService.getCountByUserId(user.getId(),0);
|
|
Long incrementNum = userIncrementService.getCountByUserId(user.getId(),0);
|
|
Long incrementBindNum = userIncrementService.getCountByUserId(user.getId(),1);
|
|
Long incrementBindNum = userIncrementService.getCountByUserId(user.getId(),1);
|
|
userVo.setCameraCount(cameraCount);
|
|
userVo.setCameraCount(cameraCount);
|