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

update

parent 02d10636
...@@ -9,6 +9,7 @@ public class RewardList { ...@@ -9,6 +9,7 @@ public class RewardList {
private List<RewardList.Reward_List> list; private List<RewardList.Reward_List> list;
@Data @Data
public static class Reward_List{ public static class Reward_List{
private int id;
private String question; private String question;
private int quesType; private int quesType;
private int num; private int num;
......
...@@ -19,7 +19,7 @@ public class SaveAndUpdate implements AdminAuthorization { ...@@ -19,7 +19,7 @@ public class SaveAndUpdate implements AdminAuthorization {
public String liveID; public String liveID;
public String EncodeLiveID; public String EncodeLiveID;
public long welfareConfId; public long welfareConfId;
public int quesType; public int id;
@Test(description = "创建直播", priority = 1) @Test(description = "创建直播", priority = 1)
public void 创建直播() { public void 创建直播() {
...@@ -330,7 +330,6 @@ public class SaveAndUpdate implements AdminAuthorization { ...@@ -330,7 +330,6 @@ public class SaveAndUpdate implements AdminAuthorization {
Assert.assertNotNull(data, network.message(saveOrUpdateRedParam, BasicConfig.MANAGER_SAVEORUPDATERED, "普通红包配置失败", saveOrUpdateRedRes.body().asString())); Assert.assertNotNull(data, network.message(saveOrUpdateRedParam, BasicConfig.MANAGER_SAVEORUPDATERED, "普通红包配置失败", saveOrUpdateRedRes.body().asString()));
} }
//有奖答题_答题现金红包
@Test(description = "答题现金红包", priority = 16) @Test(description = "答题现金红包", priority = 16)
public void 答题现金红包() { public void 答题现金红包() {
Map<String, Object> addParam = new HashMap<>(); Map<String, Object> addParam = new HashMap<>();
...@@ -364,8 +363,102 @@ public class SaveAndUpdate implements AdminAuthorization { ...@@ -364,8 +363,102 @@ public class SaveAndUpdate implements AdminAuthorization {
Assert.assertTrue(data, network.message(addParam, BasicConfig.MANAGER_add, "答题红包配置失败", addRes.body().asString())); Assert.assertTrue(data, network.message(addParam, BasicConfig.MANAGER_add, "答题红包配置失败", addRes.body().asString()));
} }
//有奖答题列表数据查询 @Test(description = "查询新增答题现金红包", priority = 17)
@Test(description = "查询答题现金红包", priority = 17) public void 查询新增答题现金红包() {
Map<String, Object> rewardParam = new HashMap<>();
rewardParam.put("liveId", liveID);
Response rewardRes = network.getResponse(rewardParam, BasicConfig.MANAGER_rewardList);
Object data = rewardRes.jsonPath().getJsonObject("data");
System.out.println(data);
List<RewardList.Reward_List> list= JsonUtil.parseResponseToListBean(rewardRes, RewardList.Reward_List.class);
RewardList.Reward_List reward = list.get(list.size()-1);
boolean red = reward.getQuesType() == 1;
id =reward.getId();
Assert.assertTrue(red, network.message(rewardParam, BasicConfig.MANAGER_rewardList, "获取答题现金红包配置失败", rewardRes.body().asString()));
}
@Test(description = "删除新增答题现金红包", priority = 18)
public void 删除新增答题现金红包() {
Map<String, Object> delParam = new HashMap<>();
delParam.put("id", id);
Response delRes = network.getResponse(delParam, BasicConfig.MANAGER_delete);
boolean data = delRes.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(delParam, BasicConfig.MANAGER_delete, "删除答题现金红包", delRes.body().asString()));
}
@Test(description = "新增答题现金红包", priority = 19)
public void 新增答题现金红包() {
Map<String, Object> addParam = new HashMap<>();
addParam.put("liveId", liveID);
addParam.put("quesType", "1");
List<AnswerBean> Answers = new ArrayList<>();
AnswerBean Answer = new AnswerBean();
Answer.setOptionDetail("选项一");
Answer.setOptionType(1);
Answers.add(Answer);
AnswerBean Answer2 = new AnswerBean();
Answer2.setOptionDetail("选项二");
Answer2.setOptionType(2);
Answers.add(Answer2);
AnswerListBean bean = new AnswerListBean();
bean.setQuestionDetail("答题现金红包");
bean.setOptionList(Answers);
addParam.put("questionConf", bean);
AddReward redConf =new AddReward();
redConf.setAmount(100);
redConf.setShowAmount(100);
redConf.setNum(3);
addParam.put("redConf", redConf);
addParam.put("welfareConf", null);
Response addRes = network.postResponse(addParam, BasicConfig.MANAGER_add);
boolean data = addRes.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertTrue(data, network.message(addParam, BasicConfig.MANAGER_add, "答题红包配置失败", addRes.body().asString()));
}
@Test(description = "修改答题现金红包", priority = 20)
public void 修改答题现金红包() {
Map<String, Object> addParam = new HashMap<>();
addParam.put("id", id);
addParam.put("liveId", liveID);
addParam.put("quesType", "1");
List<AnswerBean> Answers = new ArrayList<>();
AnswerBean Answer = new AnswerBean();
Answer.setOptionDetail("正确选项");
Answer.setOptionType(1);
Answers.add(Answer);
AnswerBean Answer2 = new AnswerBean();
Answer2.setOptionDetail("错误选项");
Answer2.setOptionType(2);
Answers.add(Answer2);
AnswerListBean bean = new AnswerListBean();
bean.setQuestionDetail("答题现金红包");
bean.setOptionList(Answers);
addParam.put("questionConf", bean);
AddReward redConf =new AddReward();
redConf.setAmount(100);
redConf.setShowAmount(100);
redConf.setNum(3);
addParam.put("redConf", redConf);
addParam.put("welfareConf", null);
Response addRes = network.postResponse(addParam, BasicConfig.MANAGER_update);
boolean data = addRes.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(addParam, BasicConfig.MANAGER_update, "修改答题红包配置失败", addRes.body().asString()));
}
@Test(description = "查询答题现金红包", priority = 21)
public void 查询答题现金红包() { public void 查询答题现金红包() {
Map<String, Object> rewardParam = new HashMap<>(); Map<String, Object> rewardParam = new HashMap<>();
rewardParam.put("liveId", liveID); rewardParam.put("liveId", liveID);
...@@ -380,7 +473,7 @@ public class SaveAndUpdate implements AdminAuthorization { ...@@ -380,7 +473,7 @@ public class SaveAndUpdate implements AdminAuthorization {
} }
//有奖答题_实物奖品 //有奖答题_实物奖品
@Test(description = "答题实物奖品", priority = 18) @Test(description = "答题实物奖品", priority = 22)
public void 答题实物奖品() { public void 答题实物奖品() {
Map<String, Object> addParam = new HashMap<>(); Map<String, Object> addParam = new HashMap<>();
addParam.put("liveId", liveID); addParam.put("liveId", liveID);
...@@ -414,7 +507,7 @@ public class SaveAndUpdate implements AdminAuthorization { ...@@ -414,7 +507,7 @@ public class SaveAndUpdate implements AdminAuthorization {
} }
//有奖答题实物奖品列表数据查询 //有奖答题实物奖品列表数据查询
@Test(description = "查询答题实物奖品", priority = 19) @Test(description = "查询答题实物奖品", priority = 23)
public void 查询答题实物奖品() { public void 查询答题实物奖品() {
Map<String, Object> rewardParam = new HashMap<>(); Map<String, Object> rewardParam = new HashMap<>();
rewardParam.put("liveId", liveID); rewardParam.put("liveId", liveID);
...@@ -430,7 +523,7 @@ public class SaveAndUpdate implements AdminAuthorization { ...@@ -430,7 +523,7 @@ public class SaveAndUpdate implements AdminAuthorization {
} }
//直播前奖品配置 //直播前奖品配置
@Test(description = "直播前抽奖", priority = 20) @Test(description = "直播前抽奖", priority = 24)
public void 直播前抽奖() { public void 直播前抽奖() {
Map<String, Object> addParam = new HashMap<>(); Map<String, Object> addParam = new HashMap<>();
addParam.put("liveId", liveID); addParam.put("liveId", liveID);
...@@ -448,7 +541,7 @@ public class SaveAndUpdate implements AdminAuthorization { ...@@ -448,7 +541,7 @@ public class SaveAndUpdate implements AdminAuthorization {
//配置免费福利 //配置免费福利
@Test(description = "配置免费福利", priority = 21) @Test(description = "配置免费福利", priority = 25)
public void 配置免费福利() { public void 配置免费福利() {
Map<String, Object> saveOrUpdate8Param = new HashMap<>(); Map<String, Object> saveOrUpdate8Param = new HashMap<>();
saveOrUpdate8Param.put("liveId", liveID); saveOrUpdate8Param.put("liveId", liveID);
......
...@@ -63,7 +63,14 @@ public class BasicConfig { ...@@ -63,7 +63,14 @@ public class BasicConfig {
// *************** 直播抽奖 *************** // *************** 直播抽奖 ***************
public static final String USER_getLiveAwardList = MOBILE_HOST + "/kjy/live/conf/specifyAward/getLiveAwardList"; public static final String USER_getLiveAwardList = MOBILE_HOST + "/kjy/live/conf/specifyAward/getLiveAwardList";
public static final String USER_listLiveLottery = MOBILE_HOST + "/kjy/live/lottery/listLiveLottery"; public static final String USER_listLiveLottery = MOBILE_HOST + "/kjy/live/lottery/listLiveLottery";
public static final String USER_pageList = MOBILE_HOST + "/clue/lottery/pageList";
public static final String USER_result = MOBILE_HOST + "/clue/lottery/result";
public static final String USER_allLotteryName = MOBILE_HOST + "/clue/lottery/allLotteryName";
public static final String USER_locationResult = MOBILE_HOST + "/clue/lottery/locationResult";
public static final String USER_submitInfo = MOBILE_HOST + "/clue/lottery/submitInfo";
public static final String USER_hasEnd = MOBILE_HOST + "/clue/lottery/hasEnd";
public static final String USER_info = MOBILE_HOST + "/clue/lottery/info";
public static final String USER_connectSuccess = MOBILE_HOST + "/kjy/live/connectSuccess";
// *************** 访客端 *************** // *************** 访客端 ***************
public static final String USER_SUBSCRIBE = MOBILE_HOST + "/kjy/live/user/appointment/subscribe"; public static final String USER_SUBSCRIBE = MOBILE_HOST + "/kjy/live/user/appointment/subscribe";
public static final String USER_FIND = MOBILE_HOST + "/kjy/live/user/subscribe/find"; public static final String USER_FIND = MOBILE_HOST + "/kjy/live/user/subscribe/find";
...@@ -71,8 +78,8 @@ public class BasicConfig { ...@@ -71,8 +78,8 @@ public class BasicConfig {
public static final String USER_savePoster = MOBILE_HOST + "/kjy/live/user/share/savePoster"; public static final String USER_savePoster = MOBILE_HOST + "/kjy/live/user/share/savePoster";
public static final String USER_myCount = MOBILE_HOST + "/kjy/live/user/lottery/myCount"; public static final String USER_myCount = MOBILE_HOST + "/kjy/live/user/lottery/myCount";
public static final String USER_wxIdAllList = MOBILE_HOST1 + "/kjy/mp/msg/config/live/user/wxIdAllList"; public static final String USER_wxIdAllList = MOBILE_HOST1 + "/kjy/mp/msg/config/live/user/wxIdAllList";
public static final String USER_info = MOBILE_HOST1 + "/clue/lottery/info";
public static final String USER_draw = MOBILE_HOST1 + "/clue/lottery/draw";
// *************** 直播管理端 *************** // *************** 直播管理端 ***************
public static final String MANAGER_SAVEANDUPDATE = MANAGER_HOST + "/kjy/manager/live/pre/conf/saveAndUpdate"; public static final String MANAGER_SAVEANDUPDATE = MANAGER_HOST + "/kjy/manager/live/pre/conf/saveAndUpdate";
...@@ -95,7 +102,8 @@ public class BasicConfig { ...@@ -95,7 +102,8 @@ public class BasicConfig {
public static final String MANAGER_SAVEORUPDATE7 = MANAGER_HOST + "/kjy/manager/welfare/pre/conf/saveOrUpdate"; public static final String MANAGER_SAVEORUPDATE7 = MANAGER_HOST + "/kjy/manager/welfare/pre/conf/saveOrUpdate";
public static final String MANAGER_getLiveAwardList = MANAGER_HOST + "/kjy/manager/specifyAward/pre/conf/getLiveAwardList"; public static final String MANAGER_getLiveAwardList = MANAGER_HOST + "/kjy/manager/specifyAward/pre/conf/getLiveAwardList";
public static final String MANAGER_rewardList = MANAGER_HOST + "/kjy/manager/live/ques/reward/list"; public static final String MANAGER_rewardList = MANAGER_HOST + "/kjy/manager/live/ques/reward/list";
public static final String MANAGER_delete = MANAGER_HOST + "/kjy/manager/live/ques/reward/delete";
public static final String MANAGER_update = MANAGER_HOST + "/kjy/manager/live/ques/reward/update";
// *************** 代理人 *************** // *************** 代理人 ***************
//代理人列表// //代理人列表//
......
package com.kjj.utils; package com.kjj.utils;
//延时
public class ThreadSleepUtils { public class ThreadSleepUtils {
private ThreadSleepUtils() {} private ThreadSleepUtils() {}
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</classes> </classes>
</test> </test>
<test preserve-order="true" name="红包"> <test preserve-order="true" name="红包领取">
<classes> <classes>
<class name="com.kjj.cases.live.LiveVistorRed"/> <class name="com.kjj.cases.live.LiveVistorRed"/>
</classes> </classes>
......
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