From ca103731c721aae3f5f622e58c679ed5c09fd9e9 Mon Sep 17 00:00:00 2001 From: Kairlec <sunfokairlec@gmail.com> Date: 星期一, 15 五月 2023 16:26:37 +0800 Subject: [PATCH] fix response `content-type` is not set if access without access token --- src/main/java/com/genersoft/iot/vmp/storager/dao/RoleMapper.java | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/RoleMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/RoleMapper.java index be20a69..425f5e4 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/dao/RoleMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/RoleMapper.java @@ -11,25 +11,25 @@ @Repository public interface RoleMapper { - @Insert("INSERT INTO role (name, authority, createTime, updateTime) VALUES" + - "('${name}', '${authority}', '${createTime}', '${updateTime}')") + @Insert("INSERT INTO user_role (name, authority, createTime, updateTime) VALUES" + + "(#{name}, #{authority}, #{createTime}, #{updateTime})") int add(Role role); @Update(value = {" <script>" + - "UPDATE role " + - "SET updateTime='${updateTime}' " + - "<if test=\"name != null\">, name='${name}'</if>" + - "<if test=\"authority != null\">, authority='${authority}'</if>" + + "UPDATE user_role " + + "SET updateTime=#{updateTime} " + + "<if test=\"name != null\">, name=#{name}</if>" + + "<if test=\"authority != null\">, authority=#{authority}</if>" + "WHERE id != 1 and id=#{id}" + " </script>"}) int update(Role role); - @Delete("DELETE FROM role WHERE id != 1 and id=#{id}") + @Delete("DELETE FROM user_role WHERE id != 1 and id=#{id}") int delete(int id); - @Select("select * FROM role WHERE id=#{id}") + @Select("select * FROM user_role WHERE id=#{id}") Role selectById(int id); - @Select("select * FROM role") + @Select("select * FROM user_role") List<Role> selectAll(); } -- Gitblit v1.8.0