From a5805426672ef5b28f1d829232527a55792d7250 Mon Sep 17 00:00:00 2001 From: Administrator <zhubaomin> Date: 星期五, 02 二月 2024 10:40:39 +0800 Subject: [PATCH] 2024-02-02 朱宝民 优化交易汇总视图和交易明细视图 --- pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml | 24 +++++++++++++++--------- 1 files changed, 15 insertions(+), 9 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml index d0a9b56..ccf499f 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml @@ -245,14 +245,18 @@ <!--鏍规嵁鐢ㄦ埛缂栧彿鑾峰彇鐢ㄦ埛淇℃伅--> <select id="getUserInfoById" resultType="java.util.Map"> SELECT - id AS userId, - name AS userName - FROM ba_user + us.id AS userId, + us.name AS userName, + us.phone, + IFNULL(us.blockId, 0) AS blockId, + IFNULL(blo.name, 0) AS blockName + FROM ba_user us + LEFT JOIN ba_block blo ON us.blockId = blo.id <where> - AND disabled = 0 - AND deleted = 0 + AND us.disabled = 0 + AND us.deleted = 0 <if test = "userId != null and userId > 0"> - AND ba_user.id = ${userId} + AND us.id = ${userId} </if> </where> </select> @@ -313,9 +317,11 @@ </if> </where> ORDER BY user.id DESC - <if test="pageCurr != null and pageSize != null"> - LIMIT ${pageCurr}, ${pageSize} - </if> + <trim prefix="limit " > + <if test="start != null and count != null"> + #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} + </if> + </trim> </select> <!--鏍规嵁鐢ㄦ埛缂栧彿鑾峰彇瑙掕壊ID鍒楄〃--> -- Gitblit v1.8.0