From 2c953876eab1622e2598a3d1ab92ae29e1d88fe5 Mon Sep 17 00:00:00 2001 From: kaiyu <404897439@qq.com> Date: Thu, 18 Mar 2021 11:24:33 +0800 Subject: [PATCH] API项目: 更改全局异常处理器中的返回码常量 COMMON: 更改常量类和response枚举 --- screen-manage/src/main/resources/mapper/ManageRoleMapper.xml | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 59 insertions(+), 0 deletions(-) diff --git a/screen-manage/src/main/resources/mapper/ManageRoleMapper.xml b/screen-manage/src/main/resources/mapper/ManageRoleMapper.xml index 11266f8..8e3e2a3 100644 --- a/screen-manage/src/main/resources/mapper/ManageRoleMapper.xml +++ b/screen-manage/src/main/resources/mapper/ManageRoleMapper.xml @@ -28,4 +28,63 @@ where mr.is_delete=0 </select> + + <select id="getAll" resultMap="BaseResultMap"> + select * from manage_role + where is_delete = 0 + </select> + + <select id="getManageRoleByName" resultMap="BaseResultMap"> + select * from manage_role + where name = #{name} + and is_delete = 0 + </select> + + <select id="getManageRoleById" resultMap="BaseResultMap"> + select * from manage_role + where id = #{id} + and is_delete = 0 + </select> + + <select id="getManageRoleByNameFuzzy" resultMap="BaseResultMap"> + select * from manage_role + where name like concat('%',#{name},'%') + and is_delete = 0 + </select> + + <insert id="insertOne" parameterType="com.moral.api.entity.ManageRole"> + INSERT INTO manage_role + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="name != null"> + name, + </if> + <if test="desc != null"> + `desc`, + </if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="name != null"> + #{name}, + </if> + <if test="desc != null"> + #{desc}, + </if> + </trim> + </insert> + + <update id="updateManageRoleById" parameterType="com.moral.api.entity.ManageRole"> + update manage_role + <set> + <if test="name != null"> + name = #{name}, + </if> + <if test="desc != null"> + `desc` = #{desc}, + </if> + <if test="is_delete != null"> + is_delete = #{is_delete}, + </if> + </set> + where id = #{id} + </update> </mapper> \ No newline at end of file -- Gitblit v1.8.0