Commit e1fcc804 authored by 张艳玲's avatar 张艳玲

update

parent 3523be8d
......@@ -149,18 +149,18 @@ public class SaveAndUpdate implements AdminAuthorization {
Assert.assertTrue(data5, network.message(saveOrUpdate4Param, BasicConfig.MANAGER_SAVEORUPDATE4, "问卷配置失败", saveOrUpdate4Res.body().asString()));
}
@Test(description = "代理人参与条件", priority = 9)
public void 代理人参与条件() {
Map<String, Object> saveAgentParticipateParam = new HashMap<>();
saveAgentParticipateParam.put("liveId", liveID);
saveAgentParticipateParam.put("inviteCount", 1);
Response saveAgentParticipateParamRes = network.postResponse(saveAgentParticipateParam, BasicConfig.MANAGER_SAVEAGENTPARTICIPATE);
boolean data6 = saveAgentParticipateParamRes.jsonPath().getBoolean("data");
System.out.println(data6);
Assert.assertTrue(data6, network.message(saveAgentParticipateParam, BasicConfig.MANAGER_SAVEAGENTPARTICIPATE, "代理人参与条件配置失败", saveAgentParticipateParamRes.body().asString()));
}
// @Test(description = "代理人参与条件", priority = 9)
// public void 代理人参与条件() {
//
// Map<String, Object> saveAgentParticipateParam = new HashMap<>();
// saveAgentParticipateParam.put("liveId", liveID);
// saveAgentParticipateParam.put("inviteCount", 1);
//
// Response saveAgentParticipateParamRes = network.postResponse(saveAgentParticipateParam, BasicConfig.MANAGER_SAVEAGENTPARTICIPATE);
// boolean data6 = saveAgentParticipateParamRes.jsonPath().getBoolean("data");
// System.out.println(data6);
// Assert.assertTrue(data6, network.message(saveAgentParticipateParam, BasicConfig.MANAGER_SAVEAGENTPARTICIPATE, "代理人参与条件配置失败", saveAgentParticipateParamRes.body().asString()));
// }
@Test(description = "指定中奖奖品", priority = 10)
public void 指定中奖奖品() {
......@@ -170,6 +170,9 @@ public class SaveAndUpdate implements AdminAuthorization {
saveSpecifyAwardParam.put("specifyAwardType", 1);//1:统一采购,2:自行准备
saveSpecifyAwardParam.put("totalCount", 5);
saveSpecifyAwardParam.put("unitPrice", 2990);
saveSpecifyAwardParam.put("maxCanSpecifyCount", 0);
saveSpecifyAwardParam.put("privilegeScope", 1);
saveSpecifyAwardParam.put("inviteCount", 1);
saveSpecifyAwardParam.put("welfareConfId", 192);
Response saveSpecifyAwardRes = network.postResponse(saveSpecifyAwardParam, BasicConfig.MANAGER_SAVESPECIFYAWARD);
......@@ -324,15 +327,54 @@ public class SaveAndUpdate implements AdminAuthorization {
public void 直播中抽奖() {
Map<String, Object> add1Param = new HashMap<>();
add1Param.put("liveId", liveID);
add1Param.put("interactNum", 10);
add1Param.put("showInteractNum", 10);
add1Param.put("interactNum", 100);
add1Param.put("showInteractNum", 100);
add1Param.put("welfareId", 191);
add1Param.put("afterMin", 10);
add1Param.put("afterMin", 20);
Response add1Res = network.postResponse(add1Param, BasicConfig.MANAGER_ADD1);
Object data = add1Res.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(add1Param, BasicConfig.MANAGER_ADD1, "直播中抽奖配置失败", add1Res.body().asString()));
Map<String, Object> add2Param = new HashMap<>();
add2Param.put("liveId", liveID);
add2Param.put("interactNum", 100);
add2Param.put("showInteractNum", 100);
add2Param.put("welfareId", 192);
add2Param.put("afterMin", 30);
Response add2Res = network.postResponse(add2Param, BasicConfig.MANAGER_ADD1);
Object data1 = add2Res.jsonPath().getJsonObject("data");
System.out.println(data1);
Assert.assertNotNull(data1, network.message(add2Param, BasicConfig.MANAGER_ADD1, "直播中抽奖配置失败", add2Res.body().asString()));
Map<String, Object> add3Param = new HashMap<>();
add3Param.put("liveId", liveID);
add3Param.put("interactNum", 100);
add3Param.put("showInteractNum", 100);
add3Param.put("welfareId", 193);
add3Param.put("afterMin", 35);
Response add3Res = network.postResponse(add3Param, BasicConfig.MANAGER_ADD1);
Object data2 = add3Res.jsonPath().getJsonObject("data");
System.out.println(data2);
Assert.assertNotNull(data2, network.message(add3Param, BasicConfig.MANAGER_ADD1, "直播中抽奖配置失败", add3Res.body().asString()));
Map<String, Object> add4Param = new HashMap<>();
add4Param.put("liveId", liveID);
add4Param.put("interactNum", 100);
add4Param.put("showInteractNum", 100);
add4Param.put("welfareId", 194);
add4Param.put("afterMin", 40);
Response add4Res = network.postResponse(add4Param, BasicConfig.MANAGER_ADD1);
Object data3 = add4Res.jsonPath().getJsonObject("data");
System.out.println(data3);
Assert.assertNotNull(data3, network.message(add4Param, BasicConfig.MANAGER_ADD1, "直播中抽奖配置失败", add4Res.body().asString()));
}
//配置免费福利
......
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