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

新增团队分配奖品

parent a1c88391
......@@ -1238,11 +1238,15 @@ public class Lottery implements AdminAuthorization {
Response hasEndResA = network.getResponse(hasEndParam, BasicConfig.USER_result);
boolean dataA = getData(hasEndResA);
visitorAuth();
Response hasEndResC = network.getResponse(hasEndParam, BasicConfig.USER_result);
boolean dataC = getData(hasEndResC);
visitorAuth10();
Response hasEndResB = network.getResponse(hasEndParam, BasicConfig.USER_result);
boolean dataB = getData(hasEndResB);
String responseBody = "A=" + hasEndResA.body().asString() + ", B=" + hasEndResB.body().asString();
Assert.assertTrue(dataA || dataB, network.message(hasEndParam, BasicConfig.USER_result, "指定访客未中奖", responseBody));
Assert.assertTrue(dataA || dataB || dataC, network.message(hasEndParam, BasicConfig.USER_result, "指定访客未中奖", responseBody));
}
private boolean getData(Response hasEndRes) {
......@@ -1360,11 +1364,15 @@ public class Lottery implements AdminAuthorization {
Response hasEndResA = network.getResponse(hasEndParam, BasicConfig.USER_result);
boolean dataA = getDataLottery(hasEndResA);
visitorAuth();
Response hasEndResC = network.getResponse(hasEndParam, BasicConfig.USER_result);
boolean dataC = getData(hasEndResC);
visitorAuth10();
Response hasEndResB = network.getResponse(hasEndParam, BasicConfig.USER_result);
boolean dataB = getDataLottery(hasEndResB);
String responseBody = "A=" + hasEndResA.body().asString() + ", B=" + hasEndResB.body().asString();
Assert.assertTrue(dataA || dataB, network.message(hasEndParam, BasicConfig.USER_result, "访客未中奖", responseBody));
Assert.assertTrue(dataA ||dataB || dataC, network.message(hasEndParam, BasicConfig.USER_result, "访客未中奖", responseBody));
}
......
package com.kjj.cases.live.manager;
import com.alibaba.fastjson.JSON;
import com.kjj.bean.manager.TeamList;
import com.kjj.bean.manager.TreasureList;
import com.kjj.cases.live.admin.AdminAuthorization;
......@@ -59,8 +60,9 @@ public class TeamLottery implements AdminAuthorization {
saveParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
saveParam.put("confId",confId);
saveParam.put("teamId",3817);
saveParam.put("totalNum",100);
saveParam.put("totalNum",1);
Response response = network.postResponse(saveParam, BasicConfig.MANAGER_saveteam);
System.out.println(response.jsonPath());
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(saveParam, BasicConfig.MANAGER_saveteam, "新增团队失败", response.body().asString()));
......@@ -87,7 +89,7 @@ public class TeamLottery implements AdminAuthorization {
public void 修改团队份数() {
Map<String, Object> changeNumParam = new HashMap<>();
changeNumParam.put("id",Id);
changeNumParam.put("totalNum",99);
changeNumParam.put("totalNum",2);
Response response = network.postResponse(changeNumParam, BasicConfig.MANAGER_changeNum);
boolean data=response.jsonPath().getBoolean("data");
System.out.println(data);
......
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