From 093d51efab0ed3c7c74bbf1bb8f152db5626aceb Mon Sep 17 00:00:00 2001 From: dinggang <2498628697@qq.com> Date: Thu, 19 May 2022 17:22:53 +0800 Subject: [PATCH] ... --- .../renren/modules/resource/dto/ResourceDTO.java | 2 ++ .../resources/mapper/resource/ResourceDao.xml | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resource/dto/ResourceDTO.java b/renren-admin/src/main/java/io/renren/modules/resource/dto/ResourceDTO.java index 4093cae3..356d29aa 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/dto/ResourceDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/dto/ResourceDTO.java @@ -90,6 +90,8 @@ public class ResourceDTO extends AuditingBaseDTO implements Serializable { private String applyState; @ApiModelProperty(value = "申请量") private String applyCount; + @ApiModelProperty(value = "部门ID集合") + private List deptIds; @ApiModelProperty(value = "属性信息") diff --git a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml index 41c34cb3..76bbf7a6 100644 --- a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml +++ b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml @@ -144,6 +144,11 @@ AND tdr.district_id = #{dto.districtId} + + AND tdr.dept_id IN + #{item} + + AND tdr.share_condition = #{dto.shareCondition} @@ -282,6 +287,11 @@ AND tdr.district_id = #{dto.districtId} + + AND tdr.dept_id IN + #{item} + + AND tdr.share_condition = #{dto.shareCondition} @@ -356,7 +366,8 @@ sd.NAME AS "deptName", IFNULL( tdr.deptCount, 0 ) AS "deptCount", sd.id AS "deptId", - sr.name AS "districtName" + sr.name AS "districtName", + sr.id AS "districtId" FROM sys_dept sd LEFT JOIN ( SELECT dept_id, COUNT( id ) AS "deptCount" FROM tb_data_resource WHERE 1 = 1 AND del_flag IN (0 ,5) @@ -423,7 +434,8 @@ ( CASE sd.type WHEN 1 THEN '省级' WHEN 2 THEN '市级' WHEN 3 THEN '区级' WHEN 4 THEN '企业' ELSE '其他' END ) AS "type", sd.NAME AS "deptName", IFNULL( tdr.deptCount, 0) AS "deptCount", - IFNULL(sr.name, '暂无该地区') AS "districtName" + IFNULL(sr.name, '暂无该地区') AS "districtName", + sr.id AS "districtId" FROM sys_dept sd LEFT JOIN ( SELECT dept_id, COUNT( id ) AS "deptCount" FROM tb_data_resource