1
0

3 Ревизии 7193fbf975 ... 53f7a5ddaf

Автор SHA1 Съобщение Дата
  Sergey Shchogolev 53f7a5ddaf 123 преди 1 година
  Sergey Shchogolev 3717b1d16d Merge branch 'master' of https://git.kngnn.ru/schyogolev/kng-feed-api преди 1 година
  Sergey Shchogolev ea31a84633 add CarCaDe code преди 1 година
променени са 2 файла, в които са добавени 3 реда и са изтрити 2 реда
  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"`