added ImageID and LinkRewrite

This commit is contained in:
Daniel Goc
2026-03-20 09:31:08 +01:00
parent 1ea50af96a
commit 884e15bb8a
6 changed files with 129 additions and 12 deletions

View File

@@ -0,0 +1,46 @@
package menuService
import "git.ma-al.com/goc_daniel/b2b/repository/categoriesRepo"
type MenuService struct {
categoriesRepo categoriesRepo.UICategoriesRepo
}
func New() *MenuService {
return &MenuService{
categoriesRepo: categoriesRepo.New(),
}
}
func (s *MenuService) GetMenu() (string, error) {
// var menu_json string
// products, err := s.listProductsRepo.GetListing(id_shop, id_lang, p, filters)
// if err != nil {
// return products, err
// }
// var loopErr error
// parallel.ForEach(products.Items, func(t model.Product, i int) {
// // products.Items[i].PriceTaxed *= currRate.Rate.InexactFloat64()
// // products.Items[i].PriceTaxed = tiny_util.RoundUpMonetary(products.Items[i].PriceTaxed)
// if products.Items[i].Name.IsNull() {
// translation, err := s.listProductsRepo.GetTranslation(ctx, products.Items[i].ID, defaults.DefaultLanguageID)
// if err != nil {
// loopErr = err
// return
// }
// products.Items[i].Name = nullable.FromPrimitiveString(translation.Name)
// products.Items[i].DescriptionShort = nullable.FromPrimitiveString(translation.DescriptionShort)
// products.Items[i].LinkRewrite = nullable.FromPrimitiveString(translation.LinkRewrite)
// }
// })
// if loopErr != nil {
// return products, errs.Handled(span, loopErr, errs.InternalError, errs.ERR_TODO)
// }
// return products, nil
return "", nil
}