From 9978d30aa1533c50bfaa48e44a1b0de4c157d10b Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期四, 11 四月 2024 09:36:48 +0800 Subject: [PATCH] Merge branch '2.7.0' --- src/main/java/com/genersoft/iot/vmp/storager/dao/UserApiKeyMapper.java | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/UserApiKeyMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/UserApiKeyMapper.java index d235475..18539f1 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/dao/UserApiKeyMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/UserApiKeyMapper.java @@ -10,7 +10,8 @@ @Repository public interface UserApiKeyMapper { - @SelectKey(statement = "SELECT LAST_INSERT_ID() AS id", keyProperty = "id", before = false, resultType = Integer.class) + @SelectKey(databaseId = "postgresql", statement = "SELECT currval('wvp_user_api_key_id_seq'::regclass) AS id", keyProperty = "id", before = false, resultType = Integer.class) + @SelectKey(databaseId = "mysql", statement = "SELECT LAST_INSERT_ID() AS id", keyProperty = "id", before = false, resultType = Integer.class) @Insert("INSERT INTO wvp_user_api_key (user_id, app, api_key, expired_at, remark, enable, create_time, update_time) VALUES" + "(#{userId}, #{app}, #{apiKey}, #{expiredAt}, #{remark}, #{enable}, #{createTime}, #{updateTime})") int add(UserApiKey userApiKey); -- Gitblit v1.8.0