From c19da137936a304132fb4152e7b8f6ead0825592 Mon Sep 17 00:00:00 2001 From: timerzz Date: Wed, 10 Apr 2024 20:06:33 +0800 Subject: [PATCH] =?UTF-8?q?=20fix=20=E4=BF=AE=E5=A4=8D=E5=88=9A=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=9A=84pusher=E6=B2=A1=E6=9C=89=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/pusher/controller.go | 2 +- pkg/watcher/controller.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/pusher/controller.go b/pkg/pusher/controller.go index e7c03c1..c29e16d 100644 --- a/pkg/pusher/controller.go +++ b/pkg/pusher/controller.go @@ -81,7 +81,7 @@ func (c *Controller) AddPusher(opt *model.Pusher[options.AnPushOption]) error { if err := tx.Create(opt).Error; err != nil { return err } - fmt.Println("id", opt.ID) + c.m[opt.ID] = NewAnPush(&opt.Option) return nil }) } diff --git a/pkg/watcher/controller.go b/pkg/watcher/controller.go index 055c787..0651414 100644 --- a/pkg/watcher/controller.go +++ b/pkg/watcher/controller.go @@ -73,7 +73,7 @@ func (c *Controller) RunWatcher(opt *options.CoachOutletOption) error { uid := opt.Uid() err := c.db.Clauses(clause.OnConflict{ Columns: []clause.Column{{Name: "uid"}}, - DoUpdates: clause.AssignmentColumns([]string{"watch", "remark", "orderable", "pusher_ids"}), + DoUpdates: clause.AssignmentColumns([]string{"watch", "remark", "orderable", "pusher_ids", "deleted_at"}), }).Create(&model.Product{Uid: uid, Watch: true, Remark: opt.Remark, Orderable: false, PusherIds: opt.PusherIds}).Error if err != nil {