print page number
All checks were successful
Build and push image / deploy (push) Successful in 2m8s
All checks were successful
Build and push image / deploy (push) Successful in 2m8s
This commit is contained in:
@ -47,7 +47,7 @@ var sumpayCommand = &cli.Command{
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("GetGoods: %w", err)
|
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)
|
gormGoods := convertDigiGoodsToGorm(goods)
|
||||||
if err := db.Create(gormGoods).Error; err != nil {
|
if err := db.Create(gormGoods).Error; err != nil {
|
||||||
|
@ -34,10 +34,10 @@ type GoodsResponse struct {
|
|||||||
Retdesc string `xml:"retdesc"`
|
Retdesc string `xml:"retdesc"`
|
||||||
IDSection int `xml:"id_section"`
|
IDSection int `xml:"id_section"`
|
||||||
NameSection string `xml:"name_section"`
|
NameSection string `xml:"name_section"`
|
||||||
Page string `xml:"page"`
|
Page int `xml:"page"`
|
||||||
Order string `xml:"order"`
|
Order string `xml:"order"`
|
||||||
CntGoods string `xml:"cnt_goods"`
|
CntGoods string `xml:"cnt_goods"`
|
||||||
Pages string `xml:"pages"`
|
Pages int `xml:"pages"`
|
||||||
Rows struct {
|
Rows struct {
|
||||||
Cnt int `xml:"cnt,attr"`
|
Cnt int `xml:"cnt,attr"`
|
||||||
Row []struct {
|
Row []struct {
|
||||||
|
Reference in New Issue
Block a user