From 7d5a5b6c8fa20720a01986e9498a4cee6ec3674b Mon Sep 17 00:00:00 2001 From: xubinbin <1323875150@qq.com> Date: 星期二, 30 五月 2023 13:24:46 +0800 Subject: [PATCH] 删除2.6.8升级2.6.9.sql文件中给表gb_stream添加主键sql,保证升级脚本能正常执行。 --- src/main/java/com/genersoft/iot/vmp/storager/dao/RoleMapper.java | 19 +++++++++---------- 1 files changed, 9 insertions(+), 10 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..3df7469 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 @@ -1,7 +1,6 @@ package com.genersoft.iot.vmp.storager.dao; import com.genersoft.iot.vmp.storager.dao.dto.Role; -import com.genersoft.iot.vmp.storager.dao.dto.User; import org.apache.ibatis.annotations.*; import org.springframework.stereotype.Repository; @@ -11,25 +10,25 @@ @Repository public interface RoleMapper { - @Insert("INSERT INTO role (name, authority, createTime, updateTime) VALUES" + - "('${name}', '${authority}', '${createTime}', '${updateTime}')") + @Insert("INSERT INTO wvp_user_role (name, authority, create_time, update_time) 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 wvp_user_role " + + "SET update_time=#{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 wvp_user_role WHERE id != 1 and id=#{id}") int delete(int id); - @Select("select * FROM role WHERE id=#{id}") + @Select("select * from wvp_user_role WHERE id=#{id}") Role selectById(int id); - @Select("select * FROM role") + @Select("select * from wvp_user_role") List<Role> selectAll(); } -- Gitblit v1.8.0