From ebae0c1137ba96d38e5b2323577129d2c9ff2e6e Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期四, 22 五月 2025 09:45:59 +0800 Subject: [PATCH] 1、优化配置文件; 2、优化ID生成器代码; 3、修改注释; 4、修改权限初始化时算法; 5、导出Excel文件功能归为一个新类; 6、工站数据库存入验空修改; --- pms-parent/pms-global/src/main/resources/mapper/BaPrivilegeMapper.xml | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 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 e2e5e44..803f50a 100644 --- a/pms-parent/pms-global/src/main/resources/mapper/BaPrivilegeMapper.xml +++ b/pms-parent/pms-global/src/main/resources/mapper/BaPrivilegeMapper.xml @@ -41,7 +41,7 @@ inner join ba_user_role ur on rp.role_id = ur.role_id inner join ba_role r on ur.role_id = r.id where r.deleted != 1 - <if test="userId != null and userId !=''"> + <if test="userId != null"> and ur.user_id = #{userId, jdbcType=BIGINT} </if> </select> @@ -50,7 +50,7 @@ select p.id from ba_privilege p inner join ba_role_privilege rp on p.id = rp.privilege_id - <if test="roleId != null and roleId !=''"> + <if test="roleId != null"> where rp.role_id = #{roleId, jdbcType=BIGINT} </if> </select> @@ -59,7 +59,7 @@ <!-- select p.id,p.num,p.name,p.type--> <!-- from ba_privilege p--> <!-- inner join ba_role_privilege rp on p.id = rp.privilege_id--> -<!-- <if test="roleId != null and roleId !=''">--> +<!-- <if test="roleId != null">--> <!-- where rp.role_id = #{roleId, jdbcType=BIGINT}--> <!-- </if>--> <!-- </select>--> @@ -75,7 +75,7 @@ <!--@mbg.generated--> insert into ba_privilege <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="id != null and id !=''"> + <if test="id != null"> id, </if> <if test="num != null and num !=''"> @@ -84,7 +84,7 @@ <if test="name != null and name !=''"> `name`, </if> - <if test="type != null and type !=''"> + <if test="type != null"> `type`, </if> <if test="typeName!= null and typeName !=''"> @@ -92,10 +92,10 @@ </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="id != null and id !=''"> + <if test="id != null"> #{id}, </if> - <if test="num != null and num !=''"> + <if test="num != null"> #{num}, </if> <if test="name != null and name !=''"> @@ -144,6 +144,11 @@ where id = #{id} </delete> + <delete id="deleteAll"> + <!--@mbg.generated--> + delete from ba_privilege + </delete> + <select id="selectByIds" parameterType="arraylist" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> -- Gitblit v1.8.0