From d60452560e37305e62f8cdd6cc08c6b3d3430a10 Mon Sep 17 00:00:00 2001 From: WuPeng <wp@zafu.edu.cn> Date: 星期日, 27 十一月 2022 10:28:42 +0800 Subject: [PATCH] 弃用废弃方法toJavaObject,改用to方法,消除编译警告。 --- src/main/java/com/genersoft/iot/vmp/storager/dao/RoleMapper.java | 10 +++++----- 1 files changed, 5 insertions(+), 5 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..66a60b9 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,12 +11,12 @@ @Repository public interface RoleMapper { - @Insert("INSERT INTO role (name, authority, createTime, updateTime) VALUES" + + @Insert("INSERT INTO user_role (name, authority, createTime, updateTime) VALUES" + "('${name}', '${authority}', '${createTime}', '${updateTime}')") int add(Role role); @Update(value = {" <script>" + - "UPDATE role " + + "UPDATE user_role " + "SET updateTime='${updateTime}' " + "<if test=\"name != null\">, name='${name}'</if>" + "<if test=\"authority != null\">, authority='${authority}'</if>" + @@ -24,12 +24,12 @@ " </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