Commit 6c456976 by zhiwj

资源组

parent b8c7ae85
......@@ -57,5 +57,5 @@ public interface TabSysUserResourceMapper {
TabSysUserResource existUserResource(@Param("enterpriseId") Integer enterpriseId, @Param("resourceId") Integer resourceId);
List<Map<String, Integer>> countByResourceIds(@Param("enterpriseId") Integer enterpriseId, @Param("ids") List<Integer> resourceIds);
List<Map<String, Object>> countByResourceIds(@Param("enterpriseId") Integer enterpriseId, @Param("ids") List<Integer> resourceIds);
}
\ No newline at end of file
......@@ -35,9 +35,9 @@ public class UserResourceServiceImpl implements UserResourceService {
if (CollectionUtils.isNotEmpty(resourceIds)) {
//
Map<Integer, Integer> map = new HashMap<>();
List<Map<String, Integer>> list = tabSysUserResourceMapper.countByResourceIds(enterpriseId, resourceIds);
for (Map<String, Integer> integerIntegerMap : list) {
map.put(integerIntegerMap.get("resourceId"), integerIntegerMap.get("brandCount") != null ? integerIntegerMap.get("brandCount").intValue() : 0);
List<Map<String, Object>> list = tabSysUserResourceMapper.countByResourceIds(enterpriseId, resourceIds);
for (Map<String, Object> integerIntegerMap : list) {
map.put(Integer.valueOf(integerIntegerMap.get("resourceId").toString()), Integer.valueOf(integerIntegerMap.get("userResourceCount").toString()));
}
return map;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment