From 7701f0423f6ce1b333c03001d6375cef500c82eb Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Fri, 17 May 2024 15:34:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8=20?= =?UTF-8?q?=E6=8C=89=E6=B3=A8=E5=86=8C=E6=97=B6=E9=97=B4=E5=80=92=E5=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ysk/cashier/repository/shop/TbShopUserRepository.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/repository/shop/TbShopUserRepository.java b/eladmin-system/src/main/java/cn/ysk/cashier/repository/shop/TbShopUserRepository.java index 52bcbcea..12a2b93c 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/repository/shop/TbShopUserRepository.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/repository/shop/TbShopUserRepository.java @@ -42,7 +42,8 @@ public interface TbShopUserRepository extends JpaRepository "on su.userId = CAST(u.id AS string) " + "WHERE su.isVip = IFNULL(:isVip, su.isVip)" + "AND (u.telephone = IFNULL(:phone, u.telephone))" + - "AND su.shopId = :shopId") + "AND su.shopId = :shopId " + + "order by su.createdAt desc ") Page findShopUserJoinUserInfo(String shopId,Integer isVip,String phone, Pageable pageable); @Query("SELECT NEW cn.ysk.cashier.vo.ShopUserInfoVo(su.id, u.headImg, u.nickName, u.sex, u.amount, u.totalScore, u.telephone, u.birthDay, u.isVip, su.createdAt, u.lastLogInAt) " + @@ -50,7 +51,8 @@ public interface TbShopUserRepository extends JpaRepository "LEFT JOIN TbUserInfo u " + "on su.userId = CAST(u.id AS string) " + "WHERE su.isVip = IFNULL(:isVip, su.isVip)" + - "AND (u.telephone = IFNULL(:phone, u.telephone))") + "AND (u.telephone = IFNULL(:phone, u.telephone))" + + "order by su.createdAt desc ") Page findAllShopUserJoinUserInfo(Integer isVip,String phone, Pageable pageable); @Query("SELECT count(0) from TbShopUser user where user.shopId = :shopId")