Switch to @SelectKey for id generation in createPrivilegedUser and remove unused @Nullable import.
This commit is contained in:
+1
-2
@@ -1,7 +1,6 @@
|
||||
package com.alttd.altitudeweb.database.web_db;
|
||||
|
||||
import org.apache.ibatis.annotations.*;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
@@ -106,6 +105,6 @@ public interface PrivilegedUserMapper {
|
||||
INSERT INTO privileged_users (uuid)
|
||||
VALUES (#{uuid})
|
||||
""")
|
||||
@Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
|
||||
@SelectKey(statement = "SELECT LAST_INSERT_ID()", keyProperty = "id", before = false, resultType = int.class)
|
||||
int createPrivilegedUser(UUID uuid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user