Commit 8c281e96 authored by 张艳玲's avatar 张艳玲

奖品签收

parent 80d5cf18
package com.kjj.bean.manager;
import lombok.Data;
@Data
public class SaveRewardConfig {
private Integer confName;
private Integer confValue;
}
package com.kjj.cases.live.manager;
import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.config.BasicConfig;
import com.kjj.utils.BaseUtils;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.HashMap;
import java.util.Map;
public class QuesReward implements AdminAuthorization {
@BeforeClass
public void setUp() {
BaseUtils.ssoLogin();
}
@Test(description = "获取有奖答题列表信息", priority = 1)
public void 获取有奖答题列表信息() {
Map<String, Object> getConfParam = new HashMap<>();
// getConfParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
getConfParam.put("liveId", 2960);
Response response = network.getResponse(getConfParam, BasicConfig.MANAGER_reward);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(getConfParam, BasicConfig.MANAGER_reward, "获取有奖答题列表信息失败", response.body().asString()));
}
@Test(description = "获取本场答题有奖规则", priority = 2)
public void 获取本场答题有奖规则() {
Map<String, Object> getConfParam = new HashMap<>();
// getConfParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
getConfParam.put("liveId", 2960);
Response response = network.getResponse(getConfParam, BasicConfig.MANAGER_getQuestionPrizesRule);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(getConfParam, BasicConfig.MANAGER_getQuestionPrizesRule, "获取本场答题有奖规则失败", response.body().asString()));
}
}
...@@ -303,6 +303,7 @@ public class SaveAndUpdate implements AdminAuthorization { ...@@ -303,6 +303,7 @@ public class SaveAndUpdate implements AdminAuthorization {
} }
@Test(description = "获取剩余红包金额", priority = 14) @Test(description = "获取剩余红包金额", priority = 14)
public void 获取剩余红包金额() { public void 获取剩余红包金额() {
Map<String, Object> getSurplusAmountParam = new HashMap<>(); Map<String, Object> getSurplusAmountParam = new HashMap<>();
......
package com.kjj.cases.live.manager.signing;
import com.kjj.bean.manager.SaveRewardConfig;
import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
import com.kjj.utils.BaseUtils;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class AgentOpen implements AdminAuthorization {
@BeforeClass
public void setUp() {
BaseUtils.ssoLogin();
}
@Test(description = "扫码签收核奖_代理人得红包", priority = 1)
public void 扫码签收核奖_代理人得红包() {
Map<String, Object> configParam = new HashMap<>();
// configParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
configParam.put("liveId", 3031);
List<SaveRewardConfig> configs = new ArrayList<>();
SaveRewardConfig saveReward = new SaveRewardConfig();
saveReward.setConfName(24);
saveReward.setConfValue(2);
configs.add(saveReward);
SaveRewardConfig saveReward1 = new SaveRewardConfig();
saveReward1.setConfName(23);
saveReward1.setConfValue(2);
configs.add(saveReward1);
SaveRewardConfig saveReward2 = new SaveRewardConfig();
saveReward2.setConfName(25);
saveReward2.setConfValue(1);
configs.add(saveReward2);
configParam.put("list",configs);
Response response = network.postResponse(configParam, BasicConfig.MANAGER_saveRewardConfig);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(configParam, BasicConfig.MANAGER_saveRewardConfig, "不开启核奖设置失败", response.body().asString()));
}
@Test(description = "获取中奖名单配置", priority = 2)
public void 获取中奖名单配置() {
Map<String, Object> getConfParam = new HashMap<>();
// getConfParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
getConfParam.put("liveId", 3031);
Response response = network.getResponse(getConfParam, BasicConfig.MANAGER_getConf);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(getConfParam, BasicConfig.MANAGER_getConf, "获取中奖名单配置失败", response.body().asString()));
}
}
package com.kjj.cases.live.manager.signing;
import com.alibaba.fastjson.JSON;
import com.kjj.bean.manager.SaveRewardConfig;
import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
import com.kjj.utils.BaseUtils;
import io.restassured.response.Response;
import org.apache.commons.math3.analysis.function.Add;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class NuclearAward implements AdminAuthorization {
@BeforeClass
public void setUp() {
BaseUtils.ssoLogin();
}
@Test(description = "不开启核奖", priority = 1)
public void 不开启核奖() {
Map<String, Object> configParam = new HashMap<>();
// configParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
configParam.put("liveId", 3031);
List<SaveRewardConfig> configs = new ArrayList<>();
SaveRewardConfig saveReward = new SaveRewardConfig();
saveReward.setConfName(24);
saveReward.setConfValue(1);
configs.add(saveReward);
SaveRewardConfig saveReward1 = new SaveRewardConfig();
saveReward1.setConfName(23);
saveReward1.setConfValue(1);
configs.add(saveReward1);
configParam.put("list",configs);
Response response = network.postResponse(configParam, BasicConfig.MANAGER_saveRewardConfig);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(configParam, BasicConfig.MANAGER_saveRewardConfig, "接口调用失败"+ JSON.toJSONString(response.jsonPath().get()), response.body().asString()));
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(configParam, BasicConfig.MANAGER_saveRewardConfig, "不开启核奖设置失败", response.body().asString()));
}
@Test(description = "获取不开启核奖配置是否正确", priority = 2)
public void 获取不开启核奖配置是否正确() {
Map<String, Object> getConfParam = new HashMap<>();
// getConfParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
getConfParam.put("liveId", 3031);
Response response = network.getResponse(getConfParam, BasicConfig.MANAGER_getConf);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(getConfParam, BasicConfig.MANAGER_getConf, "不开启核奖配置未配置成功", response.body().asString()));
}
}
package com.kjj.cases.live.manager.signing;
import com.kjj.bean.manager.SaveRewardConfig;
import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
import com.kjj.utils.BaseUtils;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class SignAward implements AdminAuthorization {
@BeforeClass
public void setUp() {
BaseUtils.ssoLogin();
}
@Test(description = "扫码签收核奖_不开启红包", priority = 1)
public void 扫码签收核奖_不开启红包() {
Map<String, Object> configParam = new HashMap<>();
// configParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
configParam.put("liveId", 3058);
List<SaveRewardConfig> configs = new ArrayList<>();
SaveRewardConfig saveReward = new SaveRewardConfig();
saveReward.setConfName(24);
saveReward.setConfValue(1);
configs.add(saveReward);
SaveRewardConfig saveReward1 = new SaveRewardConfig();
saveReward1.setConfName(23);
saveReward1.setConfValue(2);
configs.add(saveReward1);
SaveRewardConfig saveReward2 = new SaveRewardConfig();
saveReward2.setConfName(25);
saveReward2.setConfValue(1);
configs.add(saveReward2);
configParam.put("list",configs);
Response response = network.postResponse(configParam, BasicConfig.MANAGER_saveRewardConfig);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(configParam, BasicConfig.MANAGER_saveRewardConfig, "不开启红包设置失败", response.body().asString()));
}
@Test(description = "获取中奖名单配置", priority = 2)
public void 获取中奖名单配置() {
Map<String, Object> getConfParam = new HashMap<>();
// getConfParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
getConfParam.put("liveId", 3058);
Response response = network.getResponse(getConfParam, BasicConfig.MANAGER_getConf);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(getConfParam, BasicConfig.MANAGER_getConf, "获取中奖名单配置失败", response.body().asString()));
}
@Test(description = "获取奖品签收小程序码", priority = 3)
public void 获取奖品签收小程序码() {
Map<String, Object> CodeParam = new HashMap<>();
// CodeParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
CodeParam.put("liveId", 3058);
Response response = network.getResponse(CodeParam, BasicConfig.MANAGER_rewardSignQrCode);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(CodeParam, BasicConfig.MANAGER_rewardSignQrCode, "获取小程序码失败", response.body().asString()));
}
}
package com.kjj.cases.live.manager.signing;
import com.kjj.bean.manager.SaveRewardConfig;
import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
import com.kjj.utils.BaseUtils;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class UserOpen implements AdminAuthorization {
@BeforeClass
public void setUp() {
BaseUtils.ssoLogin();
}
@Test(description = "扫码签收核奖_代理人得红包", priority = 1)
public void 扫码签收核奖_代理人得红包() {
Map<String, Object> configParam = new HashMap<>();
// configParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
configParam.put("liveId", 3031);
List<SaveRewardConfig> configs = new ArrayList<>();
SaveRewardConfig saveReward = new SaveRewardConfig();
saveReward.setConfName(24);
saveReward.setConfValue(3);
configs.add(saveReward);
SaveRewardConfig saveReward1 = new SaveRewardConfig();
saveReward1.setConfName(23);
saveReward1.setConfValue(2);
configs.add(saveReward1);
SaveRewardConfig saveReward2 = new SaveRewardConfig();
saveReward2.setConfName(25);
saveReward2.setConfValue(1);
configs.add(saveReward2);
configParam.put("list",configs);
Response response = network.postResponse(configParam, BasicConfig.MANAGER_saveRewardConfig);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(configParam, BasicConfig.MANAGER_saveRewardConfig, "扫码签收代理人得红包配置失败", response.body().asString()));
}
@Test(description = "获取中奖名单配置", priority = 2)
public void 获取中奖名单配置() {
Map<String, Object> getConfParam = new HashMap<>();
// getConfParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
getConfParam.put("liveId", 3031);
Response response = network.getResponse(getConfParam, BasicConfig.MANAGER_getConf);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(getConfParam, BasicConfig.MANAGER_getConf, "获取代理人得红包配置失败", response.body().asString()));
}
}
...@@ -9,7 +9,7 @@ public class BasicConfig { ...@@ -9,7 +9,7 @@ public class BasicConfig {
// 代理人的openid(固定) // 代理人的openid(固定)
public static final String OPEN_ID = "osi5w5ggFiEXk0tPJH9b0KO_XU08"; public static final String OPEN_ID = "osi5w5ggFiEXk0tPJH9b0KO_XU08";
//直播管理员(吉吉) //直播管理员(吉吉)
public static String ADMIN_KEY="LEH7epeHVDJWzhZ6DiexTHnsy27vJ5iyL7U5xfY7SmyYGfEoTV5n7LGS9CsYKeQUAaczX94yaV3d4K97F37Yz7LUzipki"; public static String ADMIN_KEY="LEH7epeHVDJWzhZ6DiexTHnsy28ubjrAPGJYU3yPhwb8v3QC3S7b3s2kv18XVBS3CMLT1cmiLu1BdrrC3xbx1EHzWNbcL";
// 直播代理人 (艳玲) // 直播代理人 (艳玲)
public static String AUTH_KEY ="LEH7epeHVDJWzhZ6DiexTHnfZY2NrKorVWS9R85xTeuUZzyc2boHSYWYU56ttSUbcAb9ngEb3LJBB3qZ7a9eCkEoPV5yu"; public static String AUTH_KEY ="LEH7epeHVDJWzhZ6DiexTHnfZY2NrKorVWS9R85xTeuUZzyc2boHSYWYU56ttSUbcAb9ngEb3LJBB3qZ7a9eCkEoPV5yu";
//直播访客 (志勇) //直播访客 (志勇)
...@@ -20,7 +20,7 @@ public class BasicConfig { ...@@ -20,7 +20,7 @@ public class BasicConfig {
public static String VISITORKEY3 ="LEH7epeHVDJWzhZ6DiexTHnsaP3ed5NWb7fwGDRPzUCcfxMKyEZr5fYSmKv5AZVQu1w2FRoEvz6mP3RzfeKLqjV8Kq1XE"; public static String VISITORKEY3 ="LEH7epeHVDJWzhZ6DiexTHnsaP3ed5NWb7fwGDRPzUCcfxMKyEZr5fYSmKv5AZVQu1w2FRoEvz6mP3RzfeKLqjV8Kq1XE";
//直播访客 (李执) //直播访客 (李执)
public static String VISITORKEY4 ="5MgSyboxqzAQZZJEsTf43nVX8FkunrWfgVgxhR9mmo6thaPjMjfgUM62TrCUYvnSdn3kTGsGvJsSaiS4m5LS1up5twWa"; public static String VISITORKEY4 ="5MgSyboxqzAQZZJEsTf43nVX8FkunrWfgVgxhR9mmo6thaPjMjfgUM62TrCUYvnSdn3kTGsGvJsSaiS4m5LS1up5twWa";
//直播访客 (嘿保险 //直播访客 (吉吉
public static String VISITORKEY9 ="LEH7epeHVDJWzhZ6DiexTHnfZY2NrKnNHmHY52FxaDfigK3U4NQpLsQrodQUPUXwmumQ1kr3xsfZoGw7cEswYryWfUtMW"; public static String VISITORKEY9 ="LEH7epeHVDJWzhZ6DiexTHnfZY2NrKnNHmHY52FxaDfigK3U4NQpLsQrodQUPUXwmumQ1kr3xsfZoGw7cEswYryWfUtMW";
//直播访客 (周成) //直播访客 (周成)
public static String VISITORKEY5 ="LEH7epeHVDJWzhZ6DiexTHnsy28uMFcnMj6a1Nh76ZtqrBohi2vbvjsoksZjyRcqFdSgh5zddoi95S8gKvBbuggy6Bhku"; public static String VISITORKEY5 ="LEH7epeHVDJWzhZ6DiexTHnsy28uMFcnMj6a1Nh76ZtqrBohi2vbvjsoksZjyRcqFdSgh5zddoi95S8gKvBbuggy6Bhku";
...@@ -277,6 +277,16 @@ public class BasicConfig { ...@@ -277,6 +277,16 @@ public class BasicConfig {
public static final String MANAGER_del1 = MANAGER_HOST+ "/kjy/manager/live/lottery/delete"; public static final String MANAGER_del1 = MANAGER_HOST+ "/kjy/manager/live/lottery/delete";
public static final String MANAGER_result = MANAGER_HOST+ "/kjy/manager/live/import/result"; public static final String MANAGER_result = MANAGER_HOST+ "/kjy/manager/live/import/result";
//***************奖品签收*****************
public static final String MANAGER_getConf = MANAGER_HOST+ "/kjy/manager/live/awardGrant/getConf";
public static final String MANAGER_rewardSignQrCode = MANAGER_HOST+ "/kjy/manager/live/awardGrant/rewardSignQrCode";
public static final String MANAGER_saveRewardConfig = MANAGER_HOST+ "/kjy/manager/live/awardGrant/saveRewardConfig";
//***************有奖答题*****************
public static final String MANAGER_reward = MANAGER_HOST+ "/kjy/manager/live/ques/reward/list";
public static final String MANAGER_getQuestionPrizesRule = MANAGER_HOST+ "/kjy/manager/live/ques/reward/getQuestionPrizesRule";
// *************** 素材ID *************** // *************** 素材ID ***************
......
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