소스 검색

chore: auto bump version and changelog [skip ci]

iwt 1 주 전
부모
커밋
9c303a0ce8

+ 0 - 26
cfc-backend/src/main/java/com/etotem/cfc/entity/HealthMealRecord.java

@@ -52,33 +52,7 @@ public class HealthMealRecord {
     /** 是否补打: 1=补打(无能量值), 0=当日打卡 */
     private Integer isBackfill;
 
-    @Data
-@TableName("health_meal_record")
-public class HealthMealRecord {
-    @TableId(type = IdType.AUTO)
-    private Long id;
-    
-    private Long memberId;
-    private Long checkinId;
-    private String mealType;
-    private String foodItems;
-    private Integer totalCalories;
-    private Integer proteinG;
-    private Integer fatG;
-    private Integer carbsG;
-    private Integer fiberG;
-    private Date mealTime;
-    private String remark;
-    private String photoUrls;
-    private String voiceUrl;
-    private String voiceText;
-    private Date recordDate;
-    private Integer isBackfill;
     private Date createdAt;
-    
-    /** 关联任务ID(一次性任务打卡后自动完成;为空则走每日任务累计) */
-    @TableField(exist = false)
-    private Long taskId;
 
     /** 关联任务ID(一次性任务打卡后自动完成;null=走每日任务累计路径) */
     @TableField(exist = false)

+ 14 - 0
cfc-backend/src/main/java/com/etotem/cfc/task/RepeatTaskGenerator.java

@@ -2,12 +2,15 @@ package com.etotem.cfc.task;
 import javax.annotation.Resource;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.etotem.cfc.entity.FamilyMember;
 import com.etotem.cfc.entity.Task;
+import com.etotem.cfc.mapper.FamilyMemberMapper;
 import com.etotem.cfc.mapper.TaskMapper;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
+import java.util.Arrays;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
@@ -22,6 +25,7 @@ import com.etotem.cfc.config.DatabaseInitializer;
  * - weekly: 每周生成(按模板 deadline 的星期几)
  * - monthly: 每月生成(按模板 deadline 的日)
  * 兼容旧版 repeat_type (none/daily/weekly):repeat_type=daily 等价 frequency=daily,weekly 等价 weekly
+ * 额外:每日为能登录用户生成 3 条内置健康打卡任务([DIET]/[SLEEP]/[EXERCISE],is_daily_progress=1)
  */
 @Slf4j
 @Component
@@ -30,6 +34,16 @@ public class RepeatTaskGenerator {
     @Resource
     private TaskMapper taskMapper;
 
+    @Resource
+    private FamilyMemberMapper familyMemberMapper;
+
+    /** 内置健康打卡任务模板定义(title 前缀约定与 TaskService.updateProgress 的 taskKey 匹配一致) */
+    private static final List<String[]> CHECKIN_TEMPLATES = Arrays.asList(
+            new String[]{"[DIET]饮食打卡", "diet"},
+            new String[]{"[SLEEP]睡眠打卡", "sleep"},
+            new String[]{"[EXERCISE]运动打卡", "exercise"}
+    );
+
     /**
      * 每小时第5分执行,按频率分派生成重复任务
      */

+ 1 - 1
cfc-web/.last_build_commit

@@ -1 +1 @@
-9b071c174e6ca176a931c1e9a89f4f6f0f6cb956
+e81e05beecd7341506d73b9277875b6cbe498297

+ 1 - 1
cfc-web/package.json

@@ -1,6 +1,6 @@
 {
   "name": "cfc-web",
-  "version": "1.0.1604",
+  "version": "1.0.1605",
   "private": true,
   "scripts": {
     "dev": "vue-cli-service serve",

+ 6 - 0
cfc-web/public/CHANGELOG-v1.0.md

@@ -4,6 +4,12 @@
 
 ---
 
+## v1.0.1605 (2026-10-13)
+
+### 新功能
+- 三个健康打卡Controller挂钩任务回写(一次性完成+每日进度累计)
+
+
 ## v1.0.1604 (2026-10-13)
 
 ### 文档

+ 7 - 1
cfc-web/public/CHANGELOG.md

@@ -1,6 +1,6 @@
 # 更新日志
 
-> 当前版本: v1.0.1604
+> 当前版本: v1.0.1605
 
 ## 历史版本
 
@@ -8,6 +8,12 @@
 
 ---
 
+## v1.0.1605 (2026-10-13)
+
+### 新功能
+- 三个健康打卡Controller挂钩任务回写(一次性完成+每日进度累计)
+
+
 ## v1.0.1604 (2026-10-13)
 
 ### 文档