From 8b8d155bc2a44ff6663477d919f2382e26e3ba87 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Mon, 19 Sep 2022 11:06:03 +0800 Subject: [PATCH] =?UTF-8?q?/resource/selectAppList=20=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=82=E6=95=B0=20area?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/renren/modules/resource/dao/ResourceDao.java | 6 +++--- .../modules/resource/service/impl/ResourceServiceImpl.java | 7 ++++--- .../src/main/resources/mapper/resource/ResourceDao.xml | 4 ++++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java b/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java index 05c79478..13bc7614 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java @@ -169,9 +169,9 @@ public interface ResourceDao extends BaseDao { List> selectDevelopDocResource(); - List> resourceInstallationOrDataResourceDetails(Map params); + List> resourceInstallationOrDataResourceDetails(Map params); - List selectAppList(@Param("pageNum") int pageNum, @Param("type") Integer type); + List selectAppList(@Param("pageNum") int pageNum, @Param("type") Integer type, @Param("area") String area); String selectPicByResId(@Param("id") String id); @@ -182,7 +182,7 @@ public interface ResourceDao extends BaseDao { List getCIMApplyApplicationList(@Param("deptId") Long deptId); - List getImgServices(@Param("deptid") Long deptid,@Param("type") String type); + List getImgServices(@Param("deptid") Long deptid, @Param("type") String type); List cimAssemblyResources(@Param("deptid") Long deptid); 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 9824fd34..ddb86ebc 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 @@ -1489,7 +1489,8 @@ public class ResourceServiceImpl extends CrudServiceImpl maps = resourceDao.selectAppList((pageNum - 1) * 9, type); + String area = params.containsKey("area") ? params.get("area").toString() : null; + List maps = resourceDao.selectAppList((pageNum - 1) * 9, type, area); maps.forEach(x -> x.put("pic", resourceDao.selectPicByResId(x.get("id").toString()))); return maps; } @@ -2036,12 +2037,12 @@ public class ResourceServiceImpl extends CrudServiceImpl AND sd.type = #{type} + + AND JSON_CONTAINS( tdr.info_list, JSON_OBJECT( 'attrType', '应用领域' )) + AND JSON_EXTRACT( tdr.info_list, '$[*].attrValue' ) LIKE CONCAT( '%', #{area}, '%' ) + ORDER BY sd.type, sr.sort, sd.sort, tdr.dept_id, tdr.visitor DESC, tdr.id DESC LIMIT ${pageNum}, 9