mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-25 07:45:44 +00:00
HOTFIX[BE]: update total price calculation based on product flags for delivery and sales orders
This commit is contained in:
@@ -26,7 +26,10 @@ func NewMarketingProductRepository(db *gorm.DB) MarketingProductRepository {
|
||||
|
||||
func (r *MarketingProductRepositoryImpl) GetByMarketingID(ctx context.Context, marketingID uint) ([]entity.MarketingProduct, error) {
|
||||
var products []entity.MarketingProduct
|
||||
if err := r.DB().WithContext(ctx).Where("marketing_id = ?", marketingID).Find(&products).Error; err != nil {
|
||||
if err := r.DB().WithContext(ctx).
|
||||
Preload("ProductWarehouse.Product.Flags").
|
||||
Where("marketing_id = ?", marketingID).
|
||||
Find(&products).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(products) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user