From 96548225a284da3b6076e8eeaaba449db934d88b Mon Sep 17 00:00:00 2001 From: huangyw <1207046171@qq.com> Date: Tue, 3 Sep 2024 09:30:45 +0800 Subject: [PATCH] =?UTF-8?q?release:=20PC=20=E9=97=A8=E5=BA=97=E9=98=B2?= =?UTF-8?q?=E5=91=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luoo_user/src/main/java/com/luoo/user/dao/UserInfoDao.java | 3 ++- .../src/main/java/com/luoo/user/service/UserInfoService.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/luoo_user/src/main/java/com/luoo/user/dao/UserInfoDao.java b/luoo_user/src/main/java/com/luoo/user/dao/UserInfoDao.java index 89e3e75..fd33fe6 100644 --- a/luoo_user/src/main/java/com/luoo/user/dao/UserInfoDao.java +++ b/luoo_user/src/main/java/com/luoo/user/dao/UserInfoDao.java @@ -55,5 +55,6 @@ public interface UserInfoDao extends JpaRepository, JpaSpecifi " and vip_expire_time < now()", nativeQuery = true) public List getExpireVipList(); - public List getUserInfosByNickNameLike(String nickName); + @Query(value = "select * from tb_user_info where nick_name like ?1 limit 50", nativeQuery = true) + public List getUserInfosByNickNameLikeLimit50(String nickName); } diff --git a/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java b/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java index dd469f9..87351aa 100644 --- a/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java +++ b/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java @@ -868,7 +868,7 @@ public class UserInfoService { if (StringUtils.isBlank(nickName)) { return null; } else { - return userInfoDao.getUserInfosByNickNameLike("%" + nickName + "%"); + return userInfoDao.getUserInfosByNickNameLikeLimit50("%" + nickName + "%"); } }