refactor: 金币默认值改为数据库层面设置
- UserInfo实体类coins字段添加默认值DEFAULT 3 - 移除前后端硬编码的金币默认值 - 新增consumeCoins API接口用于金币消耗 - coinUtils.js改为从服务器获取金币数据 - 所有测算页面checkCoinsAndConsume改为异步调用 - VIP用户测算不消耗金币
This commit is contained in:
1 parent
b9a4a9150e
commit
f5f214a100
14 files changed
+141
-38
No files matched your search
@@ -31,6 +31,7 @@ public class UserInfo {
|
||||
|
||||
private Integer vipLevel;
|
||||
|
||||
@Column(columnDefinition = "INT DEFAULT 3")
|
||||
private Integer coins;
|
||||
|
||||
private Integer streakDays;
|
||||
@@ -45,7 +46,6 @@ public class UserInfo {
|
||||
createTime = LocalDateTime.now();
|
||||
updateTime = createTime;
|
||||
vipLevel = 0;
|
||||
coins = 3;
|
||||
streakDays = 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user