From c50e176c4a6b9331d2d1c0520bafb18f54f0dee6 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期五, 08 三月 2024 17:35:10 +0800 Subject: [PATCH] 部门增加管理员 --- src/main/resources/mapper/DepartmentMapper.xml | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/resources/mapper/DepartmentMapper.xml b/src/main/resources/mapper/DepartmentMapper.xml index 5eee8cd..5d54e83 100644 --- a/src/main/resources/mapper/DepartmentMapper.xml +++ b/src/main/resources/mapper/DepartmentMapper.xml @@ -13,8 +13,8 @@ </sql> <insert id="add" parameterType="com.mindskip.xzs.domain.Department" useGeneratedKeys="true" keyProperty="id"> - insert into t_department (name, admin_id, deleted) - values (#{name,jdbcType=VARCHAR}, {#{adminId}, #{deleted,jdbcType=VARCHAR}) + insert into t_department (name, deleted) + values (#{name,jdbcType=VARCHAR}, #{deleted,jdbcType=VARCHAR}) </insert> <update id="update" parameterType="com.mindskip.xzs.domain.Department"> @@ -93,4 +93,9 @@ WHERE td.name = #{name} AND td.deleted = 0 </select> + + <select id="selectByAdminId" resultType="integer"> + SELECT id FROM t_department WHERE admin_id = #{id} AND deleted = 0 + </select> + </mapper> -- Gitblit v1.8.0