From 141b2282675269e7cd18b78bb3b95e33bb46ccc7 Mon Sep 17 00:00:00 2001 From: gaofw189 <gaofw189@chinatelecom.cn> Date: 星期二, 17 一月 2023 17:22:38 +0800 Subject: [PATCH] 修复WVP作为下级平台接收DeviceInfo指令固定响应的问题 --- 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