fix 修复刚添加的pusher没有推送的bug
This commit is contained in:
parent
d09465645b
commit
c19da13793
@ -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
|
||||
})
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user