修复(#87): 修复批量促销配价提前返回
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -129,7 +129,10 @@ func (m *defaultPromoModel) UpsertPrices(ctx context.Context, ruleId int64, item
|
||||
return err
|
||||
}
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
return tx.Create(item).Error
|
||||
if err := tx.Create(item).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
continue
|
||||
}
|
||||
existing.Quantity = item.Quantity
|
||||
existing.PromoPrice = item.PromoPrice
|
||||
|
||||
Reference in New Issue
Block a user