给version增加id字段,否则save方法不会覆盖记录而是新增

This commit is contained in:
石皮幼鸟 2024-04-13 18:05:22 +08:00
parent de25a05c80
commit 568a2f7d36
2 changed files with 5 additions and 1 deletions

View File

@ -11,6 +11,10 @@ import java.io.Serializable;
*/ */
@Data @Data
public class Version implements Serializable { public class Version implements Serializable {
/**
* ID
*/
private String id;
/** /**
* 数据表名称即类名 * 数据表名称即类名
*/ */

View File

@ -78,7 +78,7 @@ class TestInsertLevel {
wordList.add(words.get(new Random().nextInt(words.size()))); wordList.add(words.get(new Random().nextInt(words.size())));
} }
// 时间全部设置为3分钟 // 时间全部设置为3分钟
var level = new Level("20", 20, "Level 20", type, 180000L, targetScore, wordList); var level = new Level("21", 21, "Level 21", type, 180000L, targetScore, wordList);
levelController.create(level); levelController.create(level);
} }