diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index 28468e54..c8780a02 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -2071,10 +2071,19 @@ public class ResourceServiceImpl extends CrudServiceImpl !temp.contains(index)).forEach(index -> { + int index_ = 0; + for (int i = 0; i < censusTypes.length; i++) { + if (censusTypes[i].equals(index)) { + index_ = i + 1; + break; + } + } + int finalIndex_ = index_; Map nullMap = new HashMap() { { put("count", "0"); put("type", index); + put("type_index", finalIndex_); } }; resultList.add(nullMap); @@ -2178,8 +2187,7 @@ public class ResourceServiceImpl extends CrudServiceImpl>> typeCountListMap1 = // 区级部门 - typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("3")) - .collect(Collectors.groupingBy(m -> m.get("district").toString())); + typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("3")).collect(Collectors.groupingBy(m -> m.get("district").toString())); resultList = resultList.stream().map(index -> { if (typeCountListMap1.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息 index.put("count", typeCountListMap1.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum()); @@ -2196,8 +2204,7 @@ public class ResourceServiceImpl extends CrudServiceImpl>> typeCountListMap2 = // 企业部门 - typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("4")) - .collect(Collectors.groupingBy(m -> m.get("dept_id").toString())); + typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("4")).collect(Collectors.groupingBy(m -> m.get("dept_id").toString())); resultList = resultList.stream().map(index -> { if (typeCountListMap2.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息 index.put("count", typeCountListMap2.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum()); @@ -2361,8 +2368,7 @@ public class ResourceServiceImpl extends CrudServiceImpl>> typeCountListMap1 = // 区级部门 - typeCountListByDept.stream().filter(index -> index.get("deptType").toString().equals("3")) - .collect(Collectors.groupingBy(m -> m.get("district").toString())); + typeCountListByDept.stream().filter(index -> index.get("deptType").toString().equals("3")).collect(Collectors.groupingBy(m -> m.get("district").toString())); resultList = resultList.stream().map(index -> { if (typeCountListMap1.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息 index.put("count", typeCountListMap1.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum()); @@ -2378,8 +2384,7 @@ public class ResourceServiceImpl extends CrudServiceImpl>> typeCountListMap2 = // 企业部门 - typeCountListByDept.stream().filter(index -> index.get("deptType").toString().equals("4")) - .collect(Collectors.groupingBy(m -> m.get("dept_id").toString())); + typeCountListByDept.stream().filter(index -> index.get("deptType").toString().equals("4")).collect(Collectors.groupingBy(m -> m.get("dept_id").toString())); resultList = resultList.stream().map(index -> { if (typeCountListMap2.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息 index.put("count", typeCountListMap2.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum()); diff --git a/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java index b1aaf7fb..e300c07f 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java @@ -97,6 +97,8 @@ public class SysUserServiceImpl extends BaseServiceImpl list(Map params) { + //转换成like + paramsToLike(params, "username", "real_name"); // 普通管理员,只能查询所属部门及子部门的数据 UserDetail user = SecurityUser.getUser(); if (user.getSuperAdmin() == SuperAdminEnum.NO.value()) { diff --git a/renren-admin/src/main/resources/application.yml b/renren-admin/src/main/resources/application.yml index be426500..18f68411 100644 --- a/renren-admin/src/main/resources/application.yml +++ b/renren-admin/src/main/resources/application.yml @@ -18,7 +18,7 @@ big_date: assignee_meet_role_id: 1576849766277849089 # 需要进行统计数目的资源 type/需要进行统计申请的资源类型 applyType census: - type: 组件服务,应用资源,基础设施,数据资源,知识库 + type: 应用资源,组件服务,基础设施,数据资源,知识库 applyType: 应用资源,业务组件,图层服务,开发组件,智能算法 # 海信网关 hisense: