From d07548e6eb660f6387a85b6be24eff0f2720a8bf Mon Sep 17 00:00:00 2001 From: wangliwen Date: Thu, 27 Oct 2022 11:34:36 +0800 Subject: [PATCH] =?UTF-8?q?pageWithAttrs=20=E9=9D=9E=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/resource/dao/ResourceDao.java | 2 +- .../service/impl/ResourceServiceImpl.java | 2 +- .../resources/mapper/resource/ResourceDao.xml | 17 ++++++++++------- 3 files changed, 12 insertions(+), 9 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 47a3b5b6..22682303 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 @@ -53,7 +53,7 @@ public interface ResourceDao extends BaseDao { */ List selectDTOPageSpecilTotal(@Param("dto") ResourceDTO resourceDTO); - Long selectDTOPageCount(@Param("dto") ResourceDTO resourceDTO); + Long selectDTOPageCount(@Param("dto") ResourceDTO resourceDTO, @Param("nonChinese") Boolean nonChinese); List selectApplyArea(Long userId); 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 670f7f0d..7c116eaf 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 @@ -554,7 +554,7 @@ public class ResourceServiceImpl extends CrudServiceImpl resourceDTOS = resourceDao.selectWithAttrs(resourceDTO, orderField, orderType, nonChinese); diff --git a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml index 52404ca8..f0ee8b64 100644 --- a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml +++ b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml @@ -539,9 +539,12 @@ WHERE 1 = 1 AND tdr.del_flag = 0 - + AND MATCH (tdr.name) AGAINST ( #{dto.name} IN BOOLEAN MODE) + + AND tdr.name LIKE CONCAT( '%', #{dto.name}, '%' ) + AND tdr.type = #{dto.type} @@ -1621,14 +1624,14 @@ tb_data_attr tda LEFT JOIN tb_data_resource tdr ON tda.data_resource_id = tdr.id WHERE 1 = 1 - - AND tda.attr_type = '应用图片' + + AND tda.attr_type = '应用图片' - - AND tda.attr_type = '图层缩略图' + + AND tda.attr_type = '图层缩略图' - - AND tda.attr_type = '应用场景' + + AND tda.attr_type = '应用场景' AND tdr.id = #{id} AND tda.del_flag = 0