Commit a409faa0 by yangjian

优惠券+用于营销字段的参数

parent 8d60e6f1
......@@ -71,6 +71,8 @@ public class CouponTools extends BaseTestImpl {
body.put("receiveCondition", receiveCondition);
body.put("name", couponName);
body.put("allScope", allScope);
body.put("useForActivity",false);//不用于营销互动
if (allScope.equals(false)) {//适用范围不是选全部时
List<String> scope = new ArrayList<>();
scope.add("TRAINING_CAMP");
......@@ -248,6 +250,26 @@ public class CouponTools extends BaseTestImpl {
}
/**
* 定向给会员发放优惠券
* @param memberId 会员卡id
* @param couponId 优惠券id
*/
public void batchSendCoupon(String memberId,String couponId){
setUP("API_batchSendCoupon");
JSONObject body = new JSONObject();
List<String> receiverIds = new ArrayList<>();
receiverIds.add(memberId);
body.put("operatorId", dataApi.getLoginInfo().getAdminId());
body.put("studioId", dataApi.getLoginInfo().getStudioId());
body.put("brandId", dataApi.getLoginInfo().getBrandId());
body.put("receiverIds", receiverIds);
body.put("couponId", couponId);
dataApi.doRequest(RequestType.JSON, dataparams, body.toString(), dataheadrs);
Assert.assertTrue(Boolean.valueOf(XMJSONPath.readPath(dataApi.getApi_response(),"$.success"))==true,"调用接口返回结果:"+XMJSONPath.readPath(dataApi.getApi_response(),"$.message"));
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment