Merge branch 'agent/agent/0e0c2bfa' into fix/combined-hif-28-30-27
This commit is contained in:
@@ -110,6 +110,10 @@ func (m *customOrderModel) UpdateOrderStatus(ctx context.Context, orderNo string
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
keys := m.getCacheKeys(orderInfo)
|
||||
// Pre-delete: evict cache before the DB write so concurrent reads during the update
|
||||
// window go to DB instead of getting a stale cached status (double-delete pattern).
|
||||
_ = m.DelCacheCtx(ctx, keys...)
|
||||
return m.ExecCtx(ctx, func(conn *gorm.DB) error {
|
||||
if len(tx) > 0 {
|
||||
conn = tx[0]
|
||||
@@ -123,7 +127,7 @@ func (m *customOrderModel) UpdateOrderStatus(ctx context.Context, orderNo string
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}, m.getCacheKeys(orderInfo)...)
|
||||
}, keys...)
|
||||
}
|
||||
|
||||
// FindOneDetailsByOrderNo Find order details by order number
|
||||
|
||||
Reference in New Issue
Block a user