Просмотр исходного кода

Merge branch 'v1.0.1_ws' of moapp/jy_docs into feature/v1.0.1

wangshan 1 год назад
Родитель
Сommit
89599576d1

+ 3 - 3
rpc/partnerlib/crontab/service/docinInfo.go

@@ -71,8 +71,8 @@ func InsertDocinInfos(b []byte) (err error, lastId int64, expectTotal, actualTot
 					DocSummary:      v.Desc,
 					PreviewImgId:    common.InterfaceToStr(v.ProductId),
 					EncryptionLevel: 0,
-					Source:          2,              //豆丁
-					ProductType:     v.Ifcharge + 1, //Ifcharge:是否付费,0:免费,1:收费;ProductType:商品类型:默认:0:全部;1:会员免费;2:精品(付费)
+					Source:          2,                          //豆丁
+					ProductType:     v.Ifcharge + entity.Charge, //Ifcharge:是否付费,0:免费,1:收费;ProductType:商品类型:默认:0:全部;1:会员免费;2:精品(付费)
 					UpdateDate:      date.NowFormat(date.Date_Full_Layout),
 				})
 				//elastic
@@ -91,7 +91,7 @@ func InsertDocinInfos(b []byte) (err error, lastId int64, expectTotal, actualTot
 					"uploadDate":   date.NowFormat(date.Date_Full_Layout),
 					"viewTimes":    v.VisitCount,
 					"source":       2, //豆丁
-					"productType":  v.Ifcharge + 1,
+					"productType":  v.Ifcharge + entity.Charge,
 				})
 			}
 			if len(docs) > 0 {

+ 1 - 1
rpc/partnerlib/crontab/service/docinUpdate.go

@@ -27,7 +27,7 @@ func UpdateDocinInfos(b []byte) (err error, lastId int64, expectTotal, actualTot
 				doc.UpdateDate, _ = time.ParseInLocation(date.Date_Full_Layout, v.ModifyDate, time.Local)
 				doc.Price = int(v.Price * entity.Multiple)
 				doc.PriceVip = v.PriceVip
-				doc.ProductType = v.Ifcharge + 1
+				doc.ProductType = v.Ifcharge + entity.Charge
 				doc.DownOrUp = v.State
 				if err := partner.DocsUpdate(doc); err == nil {
 					actualTotal++

+ 1 - 0
rpc/partnerlib/entity/entity.go

@@ -19,4 +19,5 @@ const (
 var (
 	SyncExpectTotal, SyncActualTotal, UpdateExpectTotal, UpdateActualTotal int //批次预计处理数据和实际处理数据
 	DocsLock                                                               = &sync.Mutex{}
+	Charge                                                                 = 1
 )