mtwmapi.ParseErr4RetailDiscountDelete
This commit is contained in:
@@ -65,14 +65,14 @@ func TestFulllDiscountShippingFeeList(t *testing.T) {
|
||||
|
||||
func TestRetailDiscountBatchSave(t *testing.T) {
|
||||
result, err := api.RetailDiscountBatchSave(testPoiCode, []*RetailDiscountActData{&RetailDiscountActData{
|
||||
AppFoodCode: "5246",
|
||||
AppFoodCode: "1140",
|
||||
UserType: UserTypeAll,
|
||||
StartTime: time.Now().Unix(),
|
||||
EndTime: time.Now().Add(24 * time.Hour).Unix(),
|
||||
OrderLimit: 1,
|
||||
DayLimit: 1,
|
||||
SettingType: SettingTypeAsDiscount,
|
||||
DiscountCoefficient: 9.7,
|
||||
DiscountCoefficient: 0.97,
|
||||
}})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -102,3 +102,13 @@ func TestInStoreCouponList(t *testing.T) {
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestParseErr4RetailDiscountDelete(t *testing.T) {
|
||||
errStr := `
|
||||
{"error_list":[{"act_id":1053302130,"error_msg":"活动ID不存在"},{"act_id":1053302127,"error_msg":"活动ID不存在"},{"act_id":1053302128,"error_msg":"活动ID不存在"},{"act_id":1053302129,"error_msg":"活动ID不存在"},{"act_id":1053302135,"error_msg":"活动ID不存在"},{"act_id":1053302132,"error_msg":"活动ID不存在"},{"act_id":1053302123,"error_msg":"活动ID不存在"},{"act_id":1053302125,"error_msg":"活动ID不存在"},{"act_id":1053302124,"error_msg":"活动ID不存在"},{"act_id":1053302133,"error_msg":"活动ID不存在"},{"act_id":1053302126,"error_msg":"活动ID不存在"},{"act_id":1053302134,"error_msg":"活动ID不存在"},{"act_id":1053302131,"error_msg":"活动ID不存在"}]}
|
||||
|
||||
`
|
||||
errExt := utils.NewErrorCode(errStr, "")
|
||||
failedList := ParseErr4RetailDiscountDelete(errExt)
|
||||
t.Log(utils.Format4Output(failedList, false))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user