Refactor createAppeal in AppealMapper to void return type, adjust AppealController to remove redundant UUID handling. Optimize AppealDataMapper to use UUID.randomUUID().
This commit is contained in:
+1
-4
@@ -1,12 +1,10 @@
|
||||
package com.alttd.altitudeweb.database.web_db.forms;
|
||||
|
||||
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 {
|
||||
|
||||
@@ -14,8 +12,7 @@ public interface AppealMapper {
|
||||
INSERT INTO appeals (uuid, username, reason, created_at, send_at, e_mail, assigned_to)
|
||||
VALUES (#{uuid}, #{username}, #{reason}, #{createdAt}, #{sendAt}, #{email}, #{assignedTo})
|
||||
""")
|
||||
@Options(useGeneratedKeys = true, keyProperty = "id")
|
||||
UUID createAppeal(Appeal appeal);
|
||||
void createAppeal(Appeal appeal);
|
||||
|
||||
@Update("""
|
||||
UPDATE appeals
|
||||
|
||||
Reference in New Issue
Block a user