From 7e48d847402d2ea4da85af582529de676f30dc38 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期一, 08 五月 2023 17:56:56 +0800
Subject: [PATCH] Merge pull request #844 from xiaoQQya/wvp-28181-2.0
---
src/main/java/com/genersoft/iot/vmp/storager/dao/RoleMapper.java | 8 ++++----
1 files changed, 4 insertions(+), 4 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 66a60b9..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
@@ -12,14 +12,14 @@
public interface RoleMapper {
@Insert("INSERT INTO user_role (name, authority, createTime, updateTime) VALUES" +
- "('${name}', '${authority}', '${createTime}', '${updateTime}')")
+ "(#{name}, #{authority}, #{createTime}, #{updateTime})")
int add(Role role);
@Update(value = {" <script>" +
"UPDATE user_role " +
- "SET updateTime='${updateTime}' " +
- "<if test=\"name != null\">, name='${name}'</if>" +
- "<if test=\"authority != null\">, authority='${authority}'</if>" +
+ "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);
--
Gitblit v1.8.0