From cef843b8175ab3775036f705f7cf69e4bd32c4f3 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期二, 16 一月 2024 16:53:07 +0800 Subject: [PATCH] 1、修改获得绑定控制器的方法; 2、添加文档“取水口控制哭喊及测控数据关系” --- pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml | 43 +++++++++++++++++++++++++++++++++++++++---- 1 files changed, 39 insertions(+), 4 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 4aa5498..66fbe78 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml @@ -66,10 +66,10 @@ from ba_user where supperAdmin!=1 and deleted!=1 <trim prefix="and" suffixOverrides="and"> - <if test="name != null"> + <if test="name != null and name != ''"> name like concat('%', #{name}, '%') and </if> - <if test="phone != null"> + <if test="phone != null and phone !=''"> phone = #{phone,jdbcType=VARCHAR} </if> </trim> @@ -84,10 +84,10 @@ left join ba_block bb on bu.blockId = bb.id where bu.supperAdmin!=1 and bu.deleted!=1 <trim prefix="and" suffixOverrides="and"> - <if test="name != null"> + <if test="name != null and name != ''"> bu.name like concat('%', #{name}, '%') and </if> - <if test="phone != null"> + <if test="phone != null and phone !=''"> bu.phone = #{phone,jdbcType=VARCHAR} </if> </trim> @@ -221,4 +221,39 @@ update ba_user set deleted = 1 where id = #{id,jdbcType=BIGINT} </delete> + + <!--鏍规嵁鐢ㄦ埛缂栧彿鑾峰彇鐢ㄦ埛淇℃伅--> + <!--2024-01-09 搴熷純--> + <select id="getUserInfos" resultType="com.dy.pipIrrGlobal.voBa.VoUserInfo"> + SELECT + user.id AS userId, + user.`name` AS userName, + rol.id AS roleId, + rol.`name` AS roleName, + per.permissions + FROM ba_user user + INNER JOIN ba_user_role use_rol ON user.id = use_rol.userId + INNER JOIN ba_role rol ON rol.id = use_rol.roleId + INNER JOIN ba_role_permissions per ON per.roleId = rol.id + <where> + <if test = "userId != null and userId > 0"> + AND user.id = ${userId} + </if> + </where> + </select> + + <!--鏍规嵁鐢ㄦ埛缂栧彿鑾峰彇鐢ㄦ埛淇℃伅--> + <select id="getUserInfoById" resultType="java.util.Map"> + SELECT + id AS userId, + name AS userName + FROM ba_user + <where> + AND disabled = 0 + AND deleted = 0 + <if test = "userId != null and userId > 0"> + AND ba_user.id = ${userId} + </if> + </where> + </select> </mapper> \ No newline at end of file -- Gitblit v1.8.0