|
@@ -578,8 +578,14 @@ return result;
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
result.put("pointsEarned", pointsEarned);
|
|
result.put("pointsEarned", pointsEarned);
|
|
|
|
|
|
|
|
- try { onboardingService.completeTask(child.getUserId(), "FIRST_TASK"); } catch (Exception e) { /* onboarding trigger failure should not block task completion */ }
|
|
|
|
|
- result.put("newBalance", user.getTotalPoints());
|
|
|
|
|
|
|
+ // 触发首次任务成长事件(如果有关联的孩子)
|
|
|
|
|
+ if (task.getChildId() != null) {
|
|
|
|
|
+ Child taskChild = childMapper.selectById(task.getChildId());
|
|
|
|
|
+ if (taskChild != null) {
|
|
|
|
|
+ try { onboardingService.completeTask(taskChild.getUserId(), "FIRST_TASK"); } catch (Exception e) { /* onboarding trigger failure should not block task completion */ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ result.put("newBalance", user.getTotalPoints());
|
|
|
result.put("needReview", task.getNeedReview() == 1);
|
|
result.put("needReview", task.getNeedReview() == 1);
|
|
|
|
|
|
|
|
return result;
|
|
return result;
|