fix 修复watch更新数据库时,没指定uid的bug
This commit is contained in:
parent
d3ead81583
commit
e20ca6aab0
@ -86,7 +86,7 @@ func (c *CoachOutlet) Restart() {
|
|||||||
}
|
}
|
||||||
func (c *CoachOutlet) Watch() {
|
func (c *CoachOutlet) Watch() {
|
||||||
c.ctx, c.cancel = context.WithCancel(c.fCtx)
|
c.ctx, c.cancel = context.WithCancel(c.fCtx)
|
||||||
if err := c.db.Model(&model.Product{}).Updates(map[string]interface{}{"watch": true, "orderable": false}).Error; err != nil {
|
if err := c.db.Model(&model.Product{}).Where("uid", c.Uid()).Updates(map[string]interface{}{"watch": true, "orderable": false}).Error; err != nil {
|
||||||
glog.Errorf("watch update db err: %v", err)
|
glog.Errorf("watch update db err: %v", err)
|
||||||
err = nil
|
err = nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user