|
|
@@ -518,7 +518,7 @@ public List<Task> getTodayTasks(Long memberId, String dimensionCode) {
|
|
|
@Transactional
|
|
|
public Map<String, Object> startTask(Long taskId, Long memberId) {
|
|
|
Task task = taskMapper.selectById(taskId);
|
|
|
- if (task == null || !task.getFamilyMemberId().equals(memberId)) {
|
|
|
+ if (task == null || !Objects.equals(task.getFamilyMemberId(), memberId)) {
|
|
|
throw new IllegalArgumentException("任务不存在或不属于该成员");
|
|
|
}
|
|
|
if ("completed".equals(task.getStatus())) {
|
|
|
@@ -568,7 +568,7 @@ public List<Task> getTodayTasks(Long memberId, String dimensionCode) {
|
|
|
@Transactional
|
|
|
public Map<String, Object> completeTask(Long taskId, Long memberId, String photoUrl, String content, String contentType) {
|
|
|
Task task = taskMapper.selectById(taskId);
|
|
|
- if (task == null || !task.getFamilyMemberId().equals(memberId)) {
|
|
|
+ if (task == null || !Objects.equals(task.getFamilyMemberId(), memberId)) {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
@@ -1205,7 +1205,7 @@ return 0; // 达到每日扣分上限
|
|
|
@Transactional
|
|
|
public Map<String, Object> completeMinigameTask(Long taskId, Long memberId, Integer completionTime, Integer score) {
|
|
|
Task task = taskMapper.selectById(taskId);
|
|
|
- if (task == null || !task.getFamilyMemberId().equals(memberId)) {
|
|
|
+ if (task == null || !Objects.equals(task.getFamilyMemberId(), memberId)) {
|
|
|
throw new RuntimeException("任务不存在或不属于该孩子");
|
|
|
}
|
|
|
|