print page number
All checks were successful
Build and push image / deploy (push) Successful in 2m8s

This commit is contained in:
2023-12-27 18:22:26 +03:00
parent 9cdf9aa7dc
commit 50d59f6452
2 changed files with 3 additions and 3 deletions

View File

@ -47,7 +47,7 @@ var sumpayCommand = &cli.Command{
if err != nil {
return fmt.Errorf("GetGoods: %w", err)
}
log.Printf("inserting %d goods to DB", len(goods.Rows.Row))
log.Printf("got page %d/%d, inserting %d goods to DB", goods.Page, goods.Pages, len(goods.Rows.Row))
gormGoods := convertDigiGoodsToGorm(goods)
if err := db.Create(gormGoods).Error; err != nil {

View File

@ -34,10 +34,10 @@ type GoodsResponse struct {
Retdesc string `xml:"retdesc"`
IDSection int `xml:"id_section"`
NameSection string `xml:"name_section"`
Page string `xml:"page"`
Page int `xml:"page"`
Order string `xml:"order"`
CntGoods string `xml:"cnt_goods"`
Pages string `xml:"pages"`
Pages int `xml:"pages"`
Rows struct {
Cnt int `xml:"cnt,attr"`
Row []struct {