Browse Source

app相机数量根据企业展示

lyhzzz 2 years ago
parent
commit
20116cda43

+ 1 - 1
src/main/java/com/fdkankan/ucenter/service/ICameraDetailService.java

@@ -19,7 +19,7 @@ public interface ICameraDetailService extends IService<CameraDetail> {
 
     CameraDetail getByCameraId(Long cameraId);
 
-    Long getCountByUserId(Long userId,Integer type);
+    Long getCountByUserId(Long companyId,Integer type);
 
     Integer deadlineNumber(String username);
 

+ 1 - 1
src/main/java/com/fdkankan/ucenter/service/impl/AppUserService.java

@@ -38,7 +38,7 @@ public class AppUserService {
         }
         UserVo userVo = new UserVo();
         BeanUtils.copyProperties(user,userVo);
-        Long cameraCount = cameraDetailService.getCountByUserId(user.getId(),cameraType);
+        Long cameraCount = cameraDetailService.getCountByUserId(user.getCompanyId(),cameraType);
         Long proCount = sceneProService.getCountByUserId(user.getId(), cameraType);
         Long plusCount = scenePlusService.getCountByUserId(user.getId(), cameraType);
         Long expansionCount = expansionOrderService.getCount(user.getId());

+ 2 - 2
src/main/java/com/fdkankan/ucenter/service/impl/CameraDetailServiceImpl.java

@@ -72,9 +72,9 @@ public class CameraDetailServiceImpl extends ServiceImpl<ICameraDetailMapper, Ca
     }
 
     @Override
-    public Long getCountByUserId(Long userId,Integer type) {
+    public Long getCountByUserId(Long companyId,Integer type) {
         LambdaQueryWrapper<CameraDetail> wrapper = new LambdaQueryWrapper<>();
-        wrapper.eq(CameraDetail::getUserId,userId);
+        wrapper.eq(CameraDetail::getUserId,companyId);
         if(type != null){
             wrapper.eq(CameraDetail::getGoodsId,type);
         }