3 Commits 7193fbf975 ... 53f7a5ddaf

Author SHA1 Message Date
  Sergey Shchogolev 53f7a5ddaf 123 1 year ago
  Sergey Shchogolev 3717b1d16d Merge branch 'master' of https://git.kngnn.ru/schyogolev/kng-feed-api 1 year ago
  Sergey Shchogolev ea31a84633 add CarCaDe code 1 year ago
2 changed files with 3 additions and 2 deletions
  1. 1 1
      cron-job/cronJobs.go
  2. 2 1
      model/product.go

+ 1 - 1
cron-job/cronJobs.go

@@ -83,7 +83,7 @@ func CreateXMLFeed() {
 
 	for _, value := range rows {
 		var offer = Offer{
-			Id:         value.CodeUT10,
+			Id:         value.CodeCarCaDe,
 			Avalieble:  "true",
 			Name:       value.Name,
 			URL:        "https://b2bn.kngnn.ru/?item-code=" + value.CodeUT10,

+ 2 - 1
model/product.go

@@ -5,7 +5,8 @@ import (
 )
 
 type Product struct {
-	CodeUT10      string  `gorm:"size:6;not null; unique; index; primaryKey" json:"code_ut10"`
+	CodeCarCaDe   string  `gorm:"size:11;not null; unique; index; primaryKey" json:"code_carcade"`
+	CodeUT10      string  `gorm:"size:6;" json:"code_ut10"`
 	Name          string  `gorm:"size:100" json:"name"`
 	Manufacturer  string  `gorm:"size:50" json:"manufacturer"`
 	ArticleNumber string  `gorm:"size:50" json:"article_number"`