Change createAppeal method in AppealMapper to return UUID, adjust AppealController to construct Appeal with generated UUID.
This commit is contained in:
+2
-2
@@ -1,12 +1,12 @@
|
||||
package com.alttd.altitudeweb.database.web_db.forms;
|
||||
|
||||
import com.alttd.altitudeweb.model.MinecraftAppealDto;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Options;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public interface AppealMapper {
|
||||
|
||||
@@ -15,7 +15,7 @@ public interface AppealMapper {
|
||||
VALUES (#{uuid}, #{username}, #{reason}, #{createdAt}, #{sendAt}, #{email}, #{assignedTo})
|
||||
""")
|
||||
@Options(useGeneratedKeys = true, keyProperty = "id")
|
||||
Appeal createAppeal(Appeal appeal);
|
||||
UUID createAppeal(Appeal appeal);
|
||||
|
||||
@Update("""
|
||||
UPDATE appeals
|
||||
|
||||
Reference in New Issue
Block a user