- up
This commit is contained in:
@@ -76,3 +76,70 @@ func TestCreatePromotionSkuLimitTime(t *testing.T) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestCancelPromotion(t *testing.T) {
|
||||||
|
promotionIDs := []int64{
|
||||||
|
24636389,
|
||||||
|
24753178,
|
||||||
|
24754087,
|
||||||
|
24970355,
|
||||||
|
24970383,
|
||||||
|
24970389,
|
||||||
|
25439508,
|
||||||
|
25444342,
|
||||||
|
25869363,
|
||||||
|
25871946,
|
||||||
|
26291079,
|
||||||
|
27036663,
|
||||||
|
27407558,
|
||||||
|
27407649,
|
||||||
|
27424152,
|
||||||
|
27424181,
|
||||||
|
27424247,
|
||||||
|
27424568,
|
||||||
|
27508490,
|
||||||
|
27555133,
|
||||||
|
27674289,
|
||||||
|
30969372,
|
||||||
|
41809699,
|
||||||
|
41810076,
|
||||||
|
41810296,
|
||||||
|
41811111,
|
||||||
|
44179379,
|
||||||
|
54080816,
|
||||||
|
54080829,
|
||||||
|
54080842,
|
||||||
|
55346987,
|
||||||
|
55347123,
|
||||||
|
55347340,
|
||||||
|
55348499,
|
||||||
|
55348706,
|
||||||
|
55348999,
|
||||||
|
55349177,
|
||||||
|
56723852,
|
||||||
|
56724283,
|
||||||
|
56725840,
|
||||||
|
56725955,
|
||||||
|
56726053,
|
||||||
|
60713479,
|
||||||
|
60714768,
|
||||||
|
60719242,
|
||||||
|
68818338,
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, v := range promotionIDs {
|
||||||
|
promotionInfo, err := api.QueryPromotionInfo(v)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
// t.Log(promotionInfo.PromotionType)
|
||||||
|
if promotionInfo.PromotionType == PromotionTypeLimitedTime {
|
||||||
|
err = api.CancelPromotionLimitTime(v, "", utils.GetUUID())
|
||||||
|
} else {
|
||||||
|
err = api.CancelPromotionSingle(v, "", utils.GetUUID())
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user