feat: 完成代码逻辑错误修复和任务清理系统实现
主要更新: - 修复了所有主要的代码逻辑错误 - 实现了完整的任务清理系统 - 添加了系统设置页面的任务清理管理功能 - 修复了API调用认证问题 - 优化了密码加密和验证机制 - 统一了错误处理模式 - 添加了详细的文档和测试工具 新增功能: - 任务清理管理界面 - 任务归档和清理日志 - API监控和诊断工具 - 完整的测试套件 技术改进: - 修复了Repository方法调用错误 - 统一了模型方法调用 - 改进了类型安全性 - 优化了代码结构和可维护性
This commit is contained in:
@@ -44,6 +44,10 @@ public class User {
|
||||
@Column(nullable = false)
|
||||
private Integer points = 50; // 默认50积分
|
||||
|
||||
@Min(0)
|
||||
@Column(nullable = false)
|
||||
private Integer frozenPoints = 0; // 冻结积分
|
||||
|
||||
@Column(name = "phone", length = 20)
|
||||
private String phone;
|
||||
|
||||
@@ -127,6 +131,21 @@ public class User {
|
||||
this.points = points;
|
||||
}
|
||||
|
||||
public Integer getFrozenPoints() {
|
||||
return frozenPoints;
|
||||
}
|
||||
|
||||
public void setFrozenPoints(Integer frozenPoints) {
|
||||
this.frozenPoints = frozenPoints;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取可用积分(总积分 - 冻结积分)
|
||||
*/
|
||||
public Integer getAvailablePoints() {
|
||||
return Math.max(0, points - frozenPoints);
|
||||
}
|
||||
|
||||
public LocalDateTime getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user