Customer Order
This commit is contained in:
@@ -55,6 +55,16 @@ func (b *ProductRepository) GetProductByPartnerIDAndSiteID(ctx context.Context,
|
||||
return products, nil
|
||||
}
|
||||
|
||||
func (b *ProductRepository) GetProductsBySiteID(ctx context.Context, siteID int64) (entity.ProductList, error) {
|
||||
var products []*entity.ProductDB
|
||||
if err := b.db.WithContext(ctx).Where("site_id = ?", siteID).Find(&products).Error; err != nil {
|
||||
logger.ContextLogger(ctx).Error("error when finding product by partner ID and site id", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return products, nil
|
||||
}
|
||||
|
||||
func (b *ProductRepository) GetAllProducts(ctx context.Context, req entity.ProductSearch) (entity.ProductList, int, error) {
|
||||
var products []*entity.ProductDB
|
||||
var total int64
|
||||
|
||||
Reference in New Issue
Block a user