fix(subscribe): update Id field tag to use primaryKey and improve save method query
This commit is contained in:
parent
3bb83edf05
commit
41c51fbbff
@ -48,7 +48,7 @@ func (m *DefaultSubscribeApplicationModel) Update(ctx context.Context, data *Sub
|
||||
if _, err := m.FindOne(ctx, data.Id); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := m.WithContext(ctx).Save(data).Error; err != nil {
|
||||
if err := m.WithContext(ctx).Where("`id` = ?", data.Id).Save(data).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user