package productService import ( "encoding/json" "git.ma-al.com/goc_daniel/b2b/app/repos/productsRepo" constdata "git.ma-al.com/goc_daniel/b2b/app/utils/const_data" ) type ProductService struct { productsRepo productsRepo.UIProductsRepo } func New() *ProductService { return &ProductService{ productsRepo: productsRepo.New(), } } func (s *ProductService) GetJSON(p_id_product, p_id_lang, p_id_customer, b2b_id_country, p_quantity int) (*json.RawMessage, error) { products, err := s.productsRepo.GetJSON(p_id_product, constdata.SHOP_ID, p_id_lang, p_id_customer, b2b_id_country, p_quantity) if err != nil { return products, err } return products, nil }