feat: 个人中心发布

This commit is contained in:
Blizzard
2026-02-14 11:38:59 +08:00
parent f1d9f63296
commit 4820323381
35 changed files with 691 additions and 148 deletions
+8 -7
View File
@@ -35,13 +35,14 @@ func (p *MyPlant) AfterCreate(tx *gorm.DB) (err error) {
for _, v := range p.CarePlans {
dueDate := today.AddDate(0, 0, v.Period)
task := CareTask{
UserId: p.UserId,
PlantId: p.Id,
PlanId: v.Id,
Name: v.Name,
Icon: v.Icon,
DueDate: dueDate,
Status: 1,
UserId: p.UserId,
PlantId: p.Id,
PlanId: v.Id,
Name: v.Name,
Icon: v.Icon,
TargetAction: v.TargetAction,
DueDate: dueDate,
Status: 1,
}
err = tx.Create(&task).Error
if err != nil {