From 7d885c1d4c86f40927af50e6e7bfa13aac0c2180 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期四, 21 十二月 2023 21:47:15 +0800 Subject: [PATCH] 1、common模块优化代码,Command命令中增加RTU命令结果返回webRul; 2、通信中间件增加了接收http下发RTU命令和内部命令的Controler; 3、RTU模拟器和控制器增加了上报完数据是否关闭TCP连接的控制。 --- pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml | 27 +++++++++++++++++++++++---- 1 files changed, 23 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..0383d9c 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,23 @@ update ba_user set deleted = 1 where id = #{id,jdbcType=BIGINT} </delete> + + <!--鏍规嵁鐢ㄦ埛缂栧彿鑾峰彇鐢ㄦ埛淇℃伅--> + <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> </mapper> \ No newline at end of file -- Gitblit v1.8.0