Browse Source

fix:供应商停用

Roc 2 months ago
parent
commit
50b9195f49
2 changed files with 4 additions and 0 deletions
  1. 1 0
      models/base_from_mysteel_chemical.go
  2. 3 0
      services/base_from_mysteel_chemical.go

+ 1 - 0
models/base_from_mysteel_chemical.go

@@ -226,6 +226,7 @@ type BaseFromMysteelChemicalIndex struct {
 	ModifyTime                        time.Time `description:"修改时间"`
 	IsStop                            int       `description:"是否停更:1:停更,0:未停更"`
 	TerminalCode                      string    `description:"终端编码"`
+	IsSupplierStop                    int       `description:"是否供应商停更:1:停更,0:未停更"`
 }
 
 type MysteelChemicalAPiCheck struct {

+ 3 - 0
services/base_from_mysteel_chemical.go

@@ -353,10 +353,12 @@ func handleIndex(indexItem *models.HandleMysteelIndex) (err error) {
 		indexObj.Frequency = indexItem.Frequency
 		indexObj.ModifyTime = time.Now()
 		indexId = item.BaseFromMysteelChemicalIndexId
+		indexObj.IsSupplierStop = item.IsSupplierStop
 
 		var isStop int
 		if strings.Contains(indexItem.IndexName, "停") {
 			isStop = 1
+			indexObj.IsSupplierStop = 1
 		}
 		indexObj.IsStop = isStop
 
@@ -371,6 +373,7 @@ func handleIndex(indexItem *models.HandleMysteelIndex) (err error) {
 		updateColsArr = append(updateColsArr, "describe")
 		updateColsArr = append(updateColsArr, "end_date")
 		updateColsArr = append(updateColsArr, "is_stop")
+		updateColsArr = append(updateColsArr, "is_supplier_stop")
 		updateColsArr = append(updateColsArr, "modify_time")
 
 		e := indexObj.Update(updateColsArr)