lyhzzz 1 год назад
Родитель
Сommit
f1990b526b

+ 1 - 1
src/main/java/com/fdkankan/manage/mapper/IScenePlusMapper.java

@@ -20,7 +20,7 @@ import java.util.List;
 @Mapper
 public interface IScenePlusMapper extends BaseMapper<ScenePlus> {
 
-    List<GroupByCount> getCountGroupByUserId(@Param("userIdList") List<Long> userIdList, @Param("isObj") Integer isObj);
+    List<GroupByCount> getCountGroupByUserId(@Param("userIdList") List<Long> userIdList);
 
     List<GroupByCount> getCountGroupByCameraId(@Param("cameraIds") List<Long> cameraIds);
 

+ 1 - 1
src/main/java/com/fdkankan/manage/mapper/ISceneProMapper.java

@@ -22,7 +22,7 @@ import java.util.List;
 @Mapper
 public interface ISceneProMapper extends BaseMapper<ScenePro> {
 
-    List<GroupByCount> getCountGroupByUserId(@Param("userIdList") List<Long> userIdList,@Param("isObj") Integer isObj);
+    List<GroupByCount> getCountGroupByUserId(@Param("userIdList") List<Long> userIdLis);
 
     List<GroupByCount> getCountGroupByCameraId(@Param("cameraIds") List<Long> cameraIds);
 

+ 1 - 1
src/main/java/com/fdkankan/manage/service/IScenePlusService.java

@@ -22,7 +22,7 @@ public interface IScenePlusService extends IService<ScenePlus> {
 
     void unbindCamera(Long cameraId);
 
-    HashMap<Long, Long> getCountGroupByUserId(List<Long> userIdList,Integer isObj);
+    HashMap<Long, Long> getCountGroupByUserId(List<Long> userIdList);
 
     HashMap<Long, Long> getCountGroupByCameraId(ArrayList<Long> longs);
 

+ 1 - 1
src/main/java/com/fdkankan/manage/service/ISceneProService.java

@@ -29,7 +29,7 @@ public interface ISceneProService extends IService<ScenePro> {
 
     List<ScenePro> getListByCameraId(Long cameraId);
 
-    HashMap<Long, Long> getCountGroupByUserId(List<Long> userIdList,Integer isObj);
+    HashMap<Long, Long> getCountGroupByUserId(List<Long> userIdList);
 
     HashMap<Long, Long>  getCountGroupByCameraId(List<Long> cameraIds);
 

+ 2 - 2
src/main/java/com/fdkankan/manage/service/impl/ScenePlusServiceImpl.java

@@ -55,9 +55,9 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
     }
 
     @Override
-    public HashMap<Long, Long> getCountGroupByUserId(List<Long> userIdList,Integer isObj) {
+    public HashMap<Long, Long> getCountGroupByUserId(List<Long> userIdList) {
         HashMap<Long,Long> map = new HashMap<>();
-        List<GroupByCount> result = this.getBaseMapper().getCountGroupByUserId(userIdList,isObj);
+        List<GroupByCount> result = this.getBaseMapper().getCountGroupByUserId(userIdList);
         result.forEach(entity ->map.put(entity.getId(),entity.getCount()));
         return map;
     }

+ 2 - 2
src/main/java/com/fdkankan/manage/service/impl/SceneProServiceImpl.java

@@ -120,9 +120,9 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     }
 
     @Override
-    public HashMap<Long, Long> getCountGroupByUserId(List<Long> userIdList,Integer isObj) {
+    public HashMap<Long, Long> getCountGroupByUserId(List<Long> userIdList) {
         HashMap<Long,Long> map = new HashMap<>();
-        List<GroupByCount> result = this.getBaseMapper().getCountGroupByUserId(userIdList,isObj);
+        List<GroupByCount> result = this.getBaseMapper().getCountGroupByUserId(userIdList);
         result.forEach(entity ->map.put(entity.getId(),entity.getCount()));
         return map;
     }

+ 2 - 2
src/main/java/com/fdkankan/manage/service/impl/UserServiceImpl.java

@@ -122,8 +122,8 @@ public class UserServiceImpl extends ServiceImpl<IUserMapper, User> implements I
             HashMap<Long,Long> incrementCountMap = userIncrementService.getValidCountGroupByUserId(userIdList);
             HashMap<Long,Long> cameraCountMap = cameraDetailService.getCountGroupByUserId(userIdList);
             HashMap<Long,Long> sceneCountMap = sceneService.getCountGroupByUserId(userIdList);
-            HashMap<Long,Long> sceneProCountMap = sceneProService.getCountGroupByUserId(userIdList,0);
-            HashMap<Long,Long> scenePlusCountMap = scenePlusService.getCountGroupByUserId(userIdList,0);
+            HashMap<Long,Long> sceneProCountMap = sceneProService.getCountGroupByUserId(userIdList);
+            HashMap<Long,Long> scenePlusCountMap = scenePlusService.getCountGroupByUserId(userIdList);
            // HashMap<Long,Long> sceneProCountObjMap = sceneProService.getCountGroupByUserId(userIdList,1);
           //  HashMap<Long,Long> scenePlusCountObjMap = scenePlusService.getCountGroupByUserId(userIdList,1);
 

+ 0 - 7
src/main/resources/mapper/manage/ScenePlusMapper.xml

@@ -12,13 +12,6 @@
         <foreach item="userId" collection="userIdList" open="(" separator="," close=")">
             #{userId}
         </foreach>
-        <if test="isObj != null and isObj == 0">
-            and p.scene_source in (1,2,3,12,13,14)
-        </if>
-        <if test="isObj != null and isObj == 1">
-            and e.is_obj = 1
-            and p.scene_source = 4
-        </if>
         GROUP BY p.user_id
     </select>
 

+ 0 - 7
src/main/resources/mapper/manage/SceneProMapper.xml

@@ -8,13 +8,6 @@
          <foreach item="userId" collection="userIdList" open="(" separator="," close=")">
             #{userId}
         </foreach>
-        <if test="isObj !=null and isObj == 0">
-            and scene_source in (1,2,3,12,13,14)
-        </if>
-        <if test="isObj !=null and isObj == 1">
-           and  is_obj = 1
-            and scene_source  = 4
-        </if>
         GROUP BY user_id
     </select>
     <select id="getCountGroupByCameraId" resultType="com.fdkankan.manage.vo.response.GroupByCount">