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:
stijn committed 2025-08-14 02:34:28 +02:00
1 parent eaee31ab2b
commit f026f24263
3 files changed
+6 -10

No files matched your search

@@ -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