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 {