Update Order Table
This commit is contained in:
parent
ad5090bdf2
commit
67b4bb9563
@ -82,7 +82,7 @@ func (r *OrderRepository) SetOrderStatus(ctx context.Context, db *gorm.DB, order
|
||||
}
|
||||
|
||||
func (r *OrderRepository) Update(ctx context.Context, order *entity.Order) (*entity.Order, error) {
|
||||
if err := r.db.WithContext(ctx).Save(order).Error; err != nil {
|
||||
if err := r.db.WithContext(ctx).Model(&entity.Order{}).Where("id = ?", order.ID).Updates(order).Error; err != nil {
|
||||
logger.ContextLogger(ctx).Error("error when updating order", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user