- 活动同步标志从int改回为int8,所有同步标志都是int8

This commit is contained in:
gazebo
2019-07-17 11:28:56 +08:00
parent 75d3411125
commit 6bb543f544
6 changed files with 19 additions and 16 deletions

View File

@@ -163,7 +163,7 @@ func AdjustPromotionSku(promotionType int, infoId int64, outInfoId string, skus
return skusResult, err
}
func storeSku2Jd(actStoreSku []*model.ActStoreSku2, handler func(syncStatus int) bool) (jdActStoreSku []*jdapi.PromotionSku) {
func storeSku2Jd(actStoreSku []*model.ActStoreSku2, handler func(syncStatus int8) bool) (jdActStoreSku []*jdapi.PromotionSku) {
for _, v := range actStoreSku {
if handler(v.SyncStatus) {
if v.VendorStoreID != "" && v.VendorSkuID != "" {

View File

@@ -23,7 +23,7 @@ func actOrderRules2Mtwm(actOrderRules []*model.ActOrderRule) (actDetails []*mtwm
return actDetails
}
func storeSku2ActData(act *model.Act2, actStoreSku []*model.ActStoreSku2, handler func(int) bool) (actData []*mtwmapi.RetailDiscountActData) {
func storeSku2ActData(act *model.Act2, actStoreSku []*model.ActStoreSku2, handler func(int8) bool) (actData []*mtwmapi.RetailDiscountActData) {
orderLimit := 1
if act.LimitCount > 0 {
orderLimit = act.LimitCount
@@ -54,7 +54,7 @@ func storeSku2ActData(act *model.Act2, actStoreSku []*model.ActStoreSku2, handle
return actData
}
func storeSku2ActData4Delete(actStoreSku []*model.ActStoreSku2, handler func(int) bool) (actIDList []string) {
func storeSku2ActData4Delete(actStoreSku []*model.ActStoreSku2, handler func(int8) bool) (actIDList []string) {
for _, v := range actStoreSku {
if handler == nil || handler(v.SyncStatus) {
if v.VendorActID != "" {
@@ -65,7 +65,7 @@ func storeSku2ActData4Delete(actStoreSku []*model.ActStoreSku2, handler func(int
return actIDList
}
func isCreateOrUpdate(syncStatus int) bool {
func isCreateOrUpdate(syncStatus int8) bool {
return model.IsSyncStatusNeedCreate(syncStatus) || model.IsSyncStatusNeedUpdate(syncStatus)
}