From 3f4c3b0257ae514e2f07f554c33eb95b1ce01b05 Mon Sep 17 00:00:00 2001 From: Fancy <Fancy.fx@outlook.com> Date: 星期五, 18 十月 2024 17:29:58 +0800 Subject: [PATCH] command --- pms-parent/pms-global/src/main/resources/mapper/BaPrivilegeMapper.xml | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pms-parent/pms-global/src/main/resources/mapper/BaPrivilegeMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/BaPrivilegeMapper.xml index 7fd878d..9c480d2 100644 --- a/pms-parent/pms-global/src/main/resources/mapper/BaPrivilegeMapper.xml +++ b/pms-parent/pms-global/src/main/resources/mapper/BaPrivilegeMapper.xml @@ -46,8 +46,8 @@ </if> </select> - <select id="selectPrivilegeByRoleId" resultType="Integer"> - select p.num + <select id="selectPrivilegeByRoleId" resultType="Long"> + select p.id from ba_privilege p inner join ba_role_privilege rp on p.id = rp.privilege_id <if test="roleId != null"> @@ -78,16 +78,16 @@ <if test="id != null"> id, </if> - <if test="num != null"> + <if test="num != null and num !=''"> num, </if> - <if test="name != null"> + <if test="name != null and name !=''"> `name`, </if> <if test="type != null"> `type`, </if> - <if test="typeName != null"> + <if test="typeName!= null and typeName !=''"> type_name, </if> </trim> @@ -98,13 +98,13 @@ <if test="num != null"> #{num}, </if> - <if test="name != null"> + <if test="name != null and name !=''"> #{name}, </if> - <if test="type != null"> + <if test="type != null and type !=''"> #{type}, </if> - <if test="typeName != null"> + <if test="typeName!= null and typeName !=''"> #{typeName}, </if> </trim> @@ -113,16 +113,16 @@ <!--@mbg.generated--> update ba_privilege <set> - <if test="num != null"> + <if test="num != null and num !=''"> num = #{num}, </if> - <if test="name != null"> + <if test="name != null and name !=''"> `name` = #{name}, </if> - <if test="type != null"> + <if test="type != null and type !=''"> `type` = #{type}, </if> - <if test="typeName != null"> + <if test="typeName!= null and typeName !=''"> type_name = #{typeName}, </if> </set> -- Gitblit v1.8.0