给version增加id字段,否则save方法不会覆盖记录而是新增
This commit is contained in:
parent
de25a05c80
commit
568a2f7d36
|
@ -11,6 +11,10 @@ import java.io.Serializable;
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class Version implements Serializable {
|
public class Version implements Serializable {
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
/**
|
/**
|
||||||
* 数据表名称(即类名)
|
* 数据表名称(即类名)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue