Commit f59629db authored by 龚小红's avatar 龚小红

增加自动发红包和问卷有奖配置

parent fb636a3c
......@@ -3,18 +3,13 @@
<suite name="直播" verbose="1" thread-count="3">
<!-->专用于自测</!-->
<test preserve-order="true" name="创建直播">
<classes>
<class name="com.kjj.cases.live.liveConfig.SaveLive"/>
</classes>
</test>
<test preserve-order="true" name="配置秒杀轮次及秒杀预告">
<classes>
<class name="com.kjj.cases.live.secondKill.ConfSecondKill"/>
</classes>
</test>
<test preserve-order="true" name="绑定关系绑定">
<classes>
<class name="com.kjj.cases.live.liveConfig.LiveBinding"/>
......@@ -27,17 +22,29 @@
</classes>
</test>
<test preserve-order="true" name="用户到场">
<test preserve-order="true" name="访客签到">
<classes>
<class name="com.kjj.cases.live.liveConfig.ConnectLive"/>
<class name="com.kjj.cases.live.lotteryCode.SignIn"/>
</classes>
</test>
<test preserve-order="true" name="秒杀互动">
<!-- 仅用于自测 -->
<!-- <test preserve-order="true" name="秒杀到场">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.liveConfig.ConnectLive"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="红包领取">
<classes>
<class name="com.kjj.cases.live.secondKill.SecondKill"/>
<class name="com.kjj.cases.live.red.LiveVistorRed"/>
</classes>
</test>
<test preserve-order="true" name="助播-结束直播">
<classes>
<class name="com.kjj.cases.live.anchor.CloseLive"/>
</classes>
</test>
</suite>
......@@ -6,7 +6,6 @@ import lombok.Data;
public class GuessList {
private String confId;
private Integer redSort;
private Integer afterMin;
private String id;
}
......@@ -25,6 +25,7 @@ public class AnchorRedList {
private int totalSurplusNum;
private int luckSurplusNum;
private int redStatus;
private int afterMin;
}
private String redPackReceiving;
......
......@@ -118,7 +118,8 @@ public class PersonalCenter implements Authorization{
int size = response.jsonPath().getInt("data.size()");
Assert.assertTrue(size>0,network.message(USINGSTRATAGY_index,"接口返回失败",response.body().asString()));
}
@Test(description = "修改消息通知设置",priority = 8)
@Test(description = "修改消息通知设置",priority = 9)
public void 修改消息通知设置(){
//开启免打扰
HashMap<String,Object> params = new HashMap<String,Object>();
......@@ -155,23 +156,15 @@ public class PersonalCenter implements Authorization{
params.put("pushType", 1);
params.put("pushSwitch", 0);
response = network.getResponse(params,PUSH_switch);
//关闭其他通知
params.put("pushType", 2);
response = network.getResponse(params,PUSH_switch);
params.put("pushType", 3);
response = network.getResponse(params,PUSH_switch);
params.put("pushType", 4);
response = network.getResponse(params,PUSH_switch);
params.put("pushType", 5);
response = network.getResponse(params,PUSH_switch);
params.put("pushType", 11);
response = network.getResponse(params,PUSH_switch);
params.put("pushType", 7);
response = network.getResponse(params,PUSH_switch);
params.put("pushType", 8);
response = network.getResponse(params,PUSH_switch);
params.put("pushType", 10);
params.put("pushType", 12);
response = network.getResponse(params,PUSH_switch);
//验证是免打扰是否开启成功
......@@ -189,9 +182,7 @@ public class PersonalCenter implements Authorization{
//验证其他开关是否关闭成功
int close1 = response.jsonPath().getInt("data.find{ it.label ==1 }.sellerPushSwitchVos.findAll{ it.pushSwitch==0}.size()");
int close2 = response.jsonPath().getInt("data.find{ it.label ==2 }.sellerPushSwitchVos.findAll{ it.pushSwitch==0}.size()");
int close3= response.jsonPath().getInt("data.find{ it.label ==3 }.sellerPushSwitchVos.findAll{ it.pushSwitch==0}.size()");
int close4 = response.jsonPath().getInt("data.find{ it.label ==5 }.sellerPushSwitchVos.findAll{ it.pushSwitch==0}.size()");
Assert.assertTrue(close1 + close2 +close3 +close4 == 9,network.message(PUSH_list,"接口返回失败",response.body().asString()));
Assert.assertTrue(close1 + close2 == 6,network.message(PUSH_list,"接口返回失败",response.body().asString()));
//还原
params.clear();
......@@ -207,30 +198,21 @@ public class PersonalCenter implements Authorization{
params.put("pushType", 1);
params.put("pushSwitch", 0);
response = network.getResponse(params,PUSH_switch);
params.put("pushType", 2);
//关闭其他通知
params.put("pushType", 1);
params.put("pushSwitch", 1);
response = network.getResponse(params,PUSH_switch);
//关闭其他通知
params.put("pushType", 2);
response = network.getResponse(params,PUSH_switch);
params.put("pushType", 3);
response = network.getResponse(params,PUSH_switch);
params.put("pushType", 4);
response = network.getResponse(params,PUSH_switch);
params.put("pushType", 5);
response = network.getResponse(params,PUSH_switch);
params.put("pushType", 11);
response = network.getResponse(params,PUSH_switch);
params.put("pushType", 7);
response = network.getResponse(params,PUSH_switch);
params.put("pushType", 8);
response = network.getResponse(params,PUSH_switch);
params.put("pushType", 10);
params.put("pushType", 12);
response = network.getResponse(params,PUSH_switch);
//验证是免打扰是否开启成功
response = network.getResponse(PUSH_list);
System.out.println(response.body().asString());
......@@ -246,12 +228,10 @@ public class PersonalCenter implements Authorization{
Assert.assertEquals(pushSwitch,1,network.message(PUSH_list,"免打扰开启失败",response.body().asString()));
close1 = response.jsonPath().getInt("data.find{ it.label ==1 }.sellerPushSwitchVos.findAll{ it.pushSwitch==1}.size()");
close2 = response.jsonPath().getInt("data.find{ it.label ==2 }.sellerPushSwitchVos.findAll{ it.pushSwitch==1}.size()");
close3 = response.jsonPath().getInt("data.find{ it.label ==3 }.sellerPushSwitchVos.findAll{ it.pushSwitch==1}.size()");
close4 = response.jsonPath().getInt("data.find{ it.label ==5 }.sellerPushSwitchVos.findAll{ it.pushSwitch==1}.size()");
Assert.assertTrue(close1 + close2 +close3 +close4 == 9,network.message(PUSH_list,"接口返回失败",response.body().asString()));
Assert.assertTrue(close1 + close2 == 6,network.message(PUSH_list,"接口返回失败",response.body().asString()));
}
@Test(description = "关闭向客户展示底部和顶部名片",priority = 9)
@Test(description = "关闭向客户展示底部和顶部名片",priority = 10)
public void 关闭向客户展示底部和顶部名片(){
//关闭向客户展示底部和顶部名片
HashMap<String,Object> params = new HashMap<String,Object>();
......@@ -310,7 +290,7 @@ public class PersonalCenter implements Authorization{
Assert.assertTrue(size==2,network.message(USINGSTRATAGY_index,"接口返回失败",response.body().asString()));
}
@Test(description = "关闭理财类互动区展示设置",priority = 10)
@Test(description = "关闭理财类互动区展示设置",priority = 11)
public void 关闭理财类互动区展示设置(){
//关闭推荐你看
HashMap<String,Object> params = new HashMap<String,Object>();
......@@ -384,7 +364,7 @@ public class PersonalCenter implements Authorization{
Assert.assertTrue(size==3,network.message(SELLERCARD_getInsuranceConceptConfig,"关闭后再开启失败",response.body().asString()));
}
@Test(description = "关闭增员类互动区展示设置",priority = 11)
@Test(description = "关闭增员类互动区展示设置",priority = 12)
public void 关闭增员类互动区展示设置(){
//关闭互助问答
HashMap<String,Object> params = new HashMap<String,Object>();
......
......@@ -29,22 +29,14 @@ public class Cashback implements Authorization {
agentAuth();
try {
//取关公众号----小葡萄
userId = (long) unsubscribe(openId1);
//禁用账号
disableUser(userId);
//关注公众号
tku1=subscribe(openId1);
//取关公众号-----小葡萄
tku1= beNewUser(openId1);
userId = ForwardAndRead.decodeTku(tku1).get("userId");
sellerId = ForwardAndRead.decodeTku(tku1).get("sellerId");
insertTestUser(userId);
//取关公众号-----小米粥
userId2 = (long) unsubscribe(openId2);
//禁用账号
disableUser(userId2);
//关注公众号
tku2=subscribe(openId2);
tku2= beNewUser(openId2);
userId2 = ForwardAndRead.decodeTku(tku2).get("userId");
sellerId2 = ForwardAndRead.decodeTku(tku2).get("sellerId");
insertTestUser(userId2);
......@@ -53,6 +45,7 @@ public class Cashback implements Authorization {
}
}
@Test(description = "一级用户绑定分享合伙人关系",priority = 1)
public void 一级用户绑定分享合伙人关系() {
newUser1();
......@@ -344,6 +337,9 @@ public class Cashback implements Authorization {
Assert.assertTrue(size >0, network.message(PAY_accDetail, "提现记录为null", response.body().asString()));
float changeMoney1 = response.jsonPath().getFloat("data[0].changeMoney");
Assert.assertTrue(changeMoney1 ==35.0, network.message(PAY_accDetail, "一级付费普通代理人返现金额不为35", response.body().asString()));
deleteTestUser(userId);
deleteTestUser(userId2);
}
}
......@@ -665,7 +665,6 @@ public class SaveLive implements Authorization {
AmountParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Response response = network.getResponse(AmountParam, BasicConfig.MANAGER_getSurplusAmount);
Integer data = response.jsonPath().getInt("data");
System.out.println(data);
Assert.assertTrue(data > 0, network.message(AmountParam, BasicConfig.MANAGER_getSurplusAmount, "查询剩余可配金额失败", response.body().asString()));
}
......@@ -730,8 +729,6 @@ public class SaveLive implements Authorization {
boolean data3 = response.jsonPath().getBoolean("data");
System.out.println(data3);
Assert.assertTrue(data3, network.message(Params, BasicConfig.MANAGER_saveOrUpdate1, "新增猜数字红包失败", response.body().asString()));
}
@Test(description = "查询猜数字红包列表", priority = 38)
......@@ -740,8 +737,9 @@ public class SaveLive implements Authorization {
listParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Response response = network.getResponse(listParam, BasicConfig.MANAGER_list_1);
List<GuessList> list = JsonUtil.parseResponsePathToListBean(response,"data.list", GuessList.class);
System.out.println(list);
this.confId = list;
int deliverType =response.jsonPath().getInt("data.deliverType");
Assert.assertEquals(deliverType,1, network.message(listParam, BasicConfig.MANAGER_list_1, "发放方式非手动发放", response.body().asString()));
Assert.assertNotNull(list, network.message(listParam, BasicConfig.MANAGER_list_1, "查询猜数字红包列表失败", response.body().asString()));
}
......@@ -753,8 +751,9 @@ public class SaveLive implements Authorization {
detailParam.put("confId", this.confId.get(0).getConfId());
Response response = network.getResponse(detailParam, BasicConfig.MANAGER_detail_1);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
int afterMin = response.jsonPath().getInt("data.afterMin");
Assert.assertNotNull(data, network.message(detailParam, BasicConfig.MANAGER_detail_1, "查询猜数字红包详情页失败", response.body().asString()));
Assert.assertEquals(afterMin,0, network.message(detailParam, BasicConfig.MANAGER_detail_1, "手动发放的发放时间错误", response.body().asString()));
}
......@@ -1556,6 +1555,7 @@ public class SaveLive implements Authorization {
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_TimeRedSave, "保存第3轮配置红包失败", response.body().asString()));
}
@Test(description = "查询第3轮红包配置列表", priority = 86)
public void 查询第3轮红包配置列表() {
Map<String, Object> Params = new HashMap<>();
......@@ -2255,6 +2255,17 @@ public class SaveLive implements Authorization {
}
}
@Test(description = "开启亲友抽奖券配置", priority = 126)
public void 开启亲友抽奖券配置() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("openStatus", 1);
Response response = network.postResponse(Params, BasicConfig.MANAGER_switchStatusLottery);
System.out.println(response.body().asString());
boolean data =response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_switchStatusLottery, "开启亲友券配置失败", response.body().asString()));
}
@Test(description = "查看亲友抽奖券配置详情", priority = 127)
public void 查看亲友抽奖券配置详情() {
Map<String, Object> Params = new HashMap<>();
......@@ -2270,14 +2281,243 @@ public class SaveLive implements Authorization {
Assert.assertEquals(lotteryNum,3, network.message(Params, BasicConfig.MANAGER_detailLottery, "亲友抽奖券数量错误", response.body().asString()));
}
@Test(description = "开启亲友抽奖券配置", priority = 126)
public void 开启亲友抽奖券配置() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("openStatus", 1);
Response response = network.postResponse(Params, BasicConfig.MANAGER_switchStatusLottery);
System.out.println(response.body().asString());
/***************************红包发放方式******************************/
//猜数字红包
@Test(description = "查询最新的猜数字红包列表", priority = 128)
public void 查询最新的猜数字红包列表() {
Map<String, Object> listParam = new HashMap<>();
listParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Response response = network.getResponse(listParam, BasicConfig.MANAGER_list_1);
List<GuessList> list = JsonUtil.parseResponsePathToListBean(response,"data.list", GuessList.class);
this.confId = list;
}
@Test(description = "修改猜数字的红包发放方式", priority = 129)
public void 修改猜数字的红包发放方式() {
//修改发放时间
confId.get(0).setAfterMin(5);
confId.get(1).setAfterMin(10);
confId.get(2).setAfterMin(20);
confId.get(0).setId(confId.get(0).getConfId());
confId.get(1).setId(confId.get(1).getConfId());
confId.get(2).setId(confId.get(2).getConfId());
Map<String, Object> saveParam = new HashMap<>();
System.out.println(confId.toString());
saveParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
saveParam.put("deliverType", 2);
saveParam.put("list", confId);
Response response = network.postResponse(saveParam, BasicConfig.MANAGER_guessDeliver_save);
boolean data =response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_switchStatusLottery, "开启亲友券配置失败", response.body().asString()));
Assert.assertTrue(data, network.message(saveParam, BasicConfig.MANAGER_guessDeliver_save, "新增猜数字红包失败", response.body().asString()));
}
@Test(description = "查询猜数字的红包发放方式", priority = 130)
public void 查询猜数字的红包发放方式() {
Map<String, Object> saveParam = new HashMap<>();
saveParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Response response = network.getResponse(saveParam, BasicConfig.MANAGER_guessDeliver_detail);
int deliverType =response.jsonPath().getInt("data.deliverType");
int afterMin =response.jsonPath().getInt("data.list.get(0).afterMin");
Assert.assertEquals(deliverType,2, network.message(saveParam, BasicConfig.MANAGER_guessDeliver_detail, "发放方式错误", response.body().asString()));
Assert.assertEquals(afterMin,5, network.message(saveParam, BasicConfig.MANAGER_guessDeliver_detail, "自动发放下的红包发放时间错误", response.body().asString()));
}
@Test(description = "助播直播前查看猜数字红包列表", priority = 131)
public void 助播直播前查看猜数字红包列表() {
adminAuth();
Map<String, Object> listParam = new HashMap<>();
listParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(listParam, BasicConfig.MOBILE_list);
List<GuessList> list = JsonUtil.parseResponseToListBean(response, GuessList.class, "guessList");
Assert.assertNotNull(list, network.message(listParam, BasicConfig.MOBILE_list, "助播直播前猜数字红包列表查询失败", response.body().asString()));
int deliverType =response.jsonPath().getInt("data.deliverType");
int afterMin =response.jsonPath().getInt("data.guessList.get(0).afterMin");
Object broadcastTime =response.jsonPath().getJsonObject("data.broadcastTime");
Object startTime =response.jsonPath().getJsonObject("data.startTime");
Assert.assertEquals(deliverType,2, network.message(listParam, BasicConfig.MOBILE_list, "发放方式错误", response.body().asString()));
Assert.assertEquals(afterMin,5, network.message(listParam, BasicConfig.MOBILE_list, "自动发放下的红包发放时间错误", response.body().asString()));
Assert.assertNotNull(broadcastTime, network.message(listParam, BasicConfig.MOBILE_list, "预计开播时间为空", response.body().asString()));
Assert.assertNull(startTime,network.message(listParam, BasicConfig.MOBILE_list, "实际开播时间不为空", response.body().asString()));
}
@Test(description = "助播查看直播前猜数字红包详情页", priority = 132)
public void 助播查看直播前猜数字红包详情页() {
adminAuth();
Map<String, Object> detailParam = new HashMap<>();
detailParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
detailParam.put("confId", IdMakeUtil.encodingId(Long.valueOf(this.confId.get(0).getConfId())));
Response response = network.getResponse(detailParam, BasicConfig.MOBILE_detail);
Object data = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(data, network.message(detailParam, BasicConfig.MOBILE_detail, "助播直播前猜数字红包详情页查询失败", response.body().asString()));
int afterMin =response.jsonPath().getInt("data.afterMin");
Assert.assertEquals(afterMin,5, network.message(detailParam, BasicConfig.MOBILE_detail, "自动发放下的红包发放时间错误", response.body().asString()));
}
@Test(description = "还原猜数字的红包发放方式", priority = 133)
public void 还原猜数字的红包发放方式() {
Map<String, Object> saveParam = new HashMap<>();
saveParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
saveParam.put("deliverType", 1);
saveParam.put("list", confId);
Response response = network.postResponse(saveParam, BasicConfig.MANAGER_guessDeliver_save);
boolean data =response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(saveParam, BasicConfig.MANAGER_guessDeliver_save, "新增猜数字红包失败", response.body().asString()));
}
//普通红包
@Test(description = "查询最新的普通红包列表", priority = 134)
public void 查询最新的普通红包列表() {
Map<String, Object> listParam = new HashMap<>();
listParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Response response = network.getResponse(listParam, BasicConfig.MANAGER_red_findRedList);
List<GuessList> list = JsonUtil.parseResponsePathToListBean(response,"data.redList", GuessList.class);
this.confId = list;
int deliverType =response.jsonPath().getInt("data.deliverType");
int afterMin =response.jsonPath().getInt("data.redList.get(0).afterMin");
Assert.assertEquals(deliverType,1, network.message(listParam, BasicConfig.MANAGER_red_findRedList, "发放方式错误", response.body().asString()));
Assert.assertEquals(afterMin,0, network.message(listParam, BasicConfig.MANAGER_red_findRedList, "自动发放下的红包发放时间错误", response.body().asString()));
}
@Test(description = "修改普通红包的红包发放方式", priority = 135)
public void 修改普通红包的红包发放方式() {
//修改发放时间
confId.get(0).setAfterMin(5);
confId.get(0).setId(confId.get(0).getConfId());
Map<String, Object> saveParam = new HashMap<>();
System.out.println(confId.toString());
saveParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
saveParam.put("deliverType", 2);
saveParam.put("list", confId);
Response response = network.postResponse(saveParam, BasicConfig.MANAGER_redDeliver_save);
boolean data =response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(saveParam, BasicConfig.MANAGER_redDeliver_save, "新增猜数字红包失败", response.body().asString()));
}
@Test(description = "查询普通红包的红包发放方式", priority = 136)
public void 查询普通红包的红包发放方式() {
Map<String, Object> saveParam = new HashMap<>();
saveParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Response response = network.getResponse(saveParam, BasicConfig.MANAGER_redDeliver_detail);
int deliverType =response.jsonPath().getInt("data.deliverType");
int afterMin =response.jsonPath().getInt("data.list.get(0).afterMin");
Assert.assertEquals(deliverType,2, network.message(saveParam, BasicConfig.MANAGER_redDeliver_detail, "发放方式错误", response.body().asString()));
Assert.assertEquals(afterMin,5, network.message(saveParam, BasicConfig.MANAGER_redDeliver_detail, "自动发放下的红包发放时间错误", response.body().asString()));
}
@Test(description = "助播直播前查看普通红包列表", priority = 137)
public void 助播直播前查看普通红包列表() {
adminAuth();
Map<String, Object> listParam = new HashMap<>();
listParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(listParam, BasicConfig.MOBILE_red_list);
List<GuessList> list = JsonUtil.parseResponseToListBean(response, GuessList.class, "redList");
Assert.assertNotNull(list, network.message(listParam, BasicConfig.MOBILE_red_list, "助播直播前猜数字红包列表查询失败", response.body().asString()));
int deliverType =response.jsonPath().getInt("data.deliverType");
int afterMin =response.jsonPath().getInt("data.redList.get(0).afterMin");
Object broadcastTime =response.jsonPath().getJsonObject("data.broadcastTime");
Object startTime =response.jsonPath().getJsonObject("data.startTime");
Assert.assertEquals(deliverType,2, network.message(listParam, BasicConfig.MOBILE_red_list, "发放方式错误", response.body().asString()));
Assert.assertEquals(afterMin,5, network.message(listParam, BasicConfig.MOBILE_red_list, "自动发放下的红包发放时间错误", response.body().asString()));
Assert.assertNotNull(broadcastTime, network.message(listParam, BasicConfig.MOBILE_red_list, "预计开播时间为空", response.body().asString()));
Assert.assertNull(startTime,network.message(listParam, BasicConfig.MOBILE_red_list, "实际开播时间不为空", response.body().asString()));
}
@Test(description = "助播查看直播前普通字红包详情页", priority = 138)
public void 助播查看直播前普通字红包详情页() {
adminAuth();
Map<String, Object> detailParam = new HashMap<>();
detailParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
detailParam.put("confId", IdMakeUtil.encodingId(Long.valueOf(this.confId.get(0).getConfId())));
Response response = network.getResponse(detailParam, BasicConfig.MOBILE_red_detail);
Object data = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(data, network.message(detailParam, BasicConfig.MOBILE_red_detail, "助播直播前猜数字红包详情页查询失败", response.body().asString()));
int afterMin =response.jsonPath().getInt("data.afterMin");
Assert.assertEquals(afterMin,5, network.message(detailParam, BasicConfig.MOBILE_red_detail, "自动发放下的红包发放时间错误", response.body().asString()));
}
@Test(description = "还原普通红包的红包发放方式", priority = 139)
public void 还原普通红包的红包发放方式() {
Map<String, Object> saveParam = new HashMap<>();
saveParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
saveParam.put("deliverType", 1);
saveParam.put("list", confId);
Response response = network.postResponse(saveParam, BasicConfig.MANAGER_redDeliver_save);
boolean data =response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(saveParam, BasicConfig.MANAGER_redDeliver_save, "新增猜数字红包失败", response.body().asString()));
}
/**************查询奖品列表*****************/
@Test(description = "查询公司奖品列表", priority = 140)
public void 查询公司奖品列表() {
Map<String, Object> saveParam = new HashMap<>();
saveParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
saveParam.put("pageIndex", 1);
saveParam.put("pageSize", 20);
Response response = network.getResponse(saveParam, BasicConfig.MANAGER_welfare_list);
Object data =response.jsonPath().getJsonObject("data");
Assert.assertNotNull(data, network.message(saveParam, BasicConfig.MANAGER_welfare_list, "公司奖品列表为空", response.body().asString()));
List<WelfareList> list = JsonUtil.parseResponseToPageBean(response, WelfareList.class);
this.id = list;
}
@Test(description = "保存问卷有奖配置", priority = 141)
public void 保存问卷有奖配置() {
Map<String, Object> saveParam = new HashMap<>();
saveParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
saveParam.put("surveyUrl", "https://kjj.m.duibatest.com.cn/live/pages/survey/index?id=73");
saveParam.put("surveyId", 73);
saveParam.put("interactNum", 1);
saveParam.put("welfareId", id.get(0).getId());
Response response = network.postResponse(saveParam, BasicConfig.MANAGER_surveyReward_saveOrUpdate);
boolean data =response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(saveParam, BasicConfig.MANAGER_surveyReward_saveOrUpdate, "保存问卷有奖失败", response.body().asString()));
}
@Test(description = "查询问卷有奖配置", priority = 142)
public void 查询问卷有奖配置() {
Map<String, Object> saveParam = new HashMap<>();
saveParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Response response = network.getResponse(saveParam, BasicConfig.MANAGER_surveyReward_detail);
String surveyUrl =response.jsonPath().getString("data.surveyUrl");
int welfareId =response.jsonPath().getInt("data.welfareId");
int surplusNum =response.jsonPath().getInt("data.surplusNum");
Assert.assertEquals(welfareId,id.get(0).getId(), network.message(saveParam, BasicConfig.MANAGER_surveyReward_detail, "奖品ID错误", response.body().asString()));
Assert.assertEquals(surplusNum,1, network.message(saveParam, BasicConfig.MANAGER_surveyReward_detail, "剩余奖品错误", response.body().asString()));
Assert.assertNotNull(surveyUrl, network.message(saveParam, BasicConfig.MANAGER_surveyReward_detail, "问卷链接为空", response.body().asString()));
}
@Test(description = "开启问卷有奖配置", priority = 143)
public void 开启问卷有奖配置() {
Map<String, Object> saveParam = new HashMap<>();
saveParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
saveParam.put("open", true);
Response response = network.postResponse(saveParam, BasicConfig.MANAGER_surveyReward_openOrClose);
boolean data =response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(saveParam, BasicConfig.MANAGER_surveyReward_openOrClose, "开启问卷有奖失败", response.body().asString()));
}
@Test(description = "查询问卷有奖状态", priority = 144)
public void 查询问卷有奖状态() {
Map<String, Object> params = new HashMap<>();
params.put("liveId", liveID);
Response response = network.getResponse(params, BasicConfig.MANAGER_getConfDetail);
boolean confSurveyReward =response.jsonPath().getBoolean("data.confSurveyReward");
boolean surveyRewardStatus =response.jsonPath().getBoolean("data.surveyRewardStatus");
Assert.assertTrue(confSurveyReward, network.message(params, BasicConfig.MANAGER_getConfDetail, "问卷有奖未配置", response.body().asString()));
Assert.assertTrue(surveyRewardStatus, network.message(params, BasicConfig.MANAGER_getConfDetail, "问卷有奖未开启", response.body().asString()));
}
}
package com.kjj.cases.live.liveConfig;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.kjj.bean.answer.AddReward;
import com.kjj.bean.answer.AddWelfareConf;
import com.kjj.bean.answer.RewardList;
import com.kjj.bean.issue.Dialogue;
import com.kjj.bean.lottery.ConfIdList;
import com.kjj.bean.manager.*;
import com.kjj.cases.admin.Authorization;
import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
import com.kjj.utils.IdMakeUtil;
import com.kjj.utils.JsonUtil;
import com.kjj.utils.ThreadSleepUtils;
import io.restassured.response.Response;
import org.apache.commons.lang3.RandomUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.*;
import static com.kjj.utils.BaseUtils.ssoLogin;
public class SimpleLiveConfig implements Authorization {
public String liveID;
public String EncodeLiveID;
public long welfareConfId;
private Integer taskId;
public List<RedList> redId;
@BeforeClass
public void setUp() {
ssoLogin(); }
/**
* 创建直播
*/
@Test(description = "创建直播", priority = 1)
public void 创建直播() {
Map<String, Object> Params = new HashMap<>();
Params.put("posterUrl", "https://streamimg.kjjcrm.com/kjy/image/20210201/e36cb31828e14a3ebb9d01e6be79ad66.jpg");
Params.put("videoUrl", "http://streamimg.kjjcrm.com/kjy/image/20210201/1612171657348.mp4");
Params.put("welfareUrl", "https://streamimg.kjjcrm.com/kjy/image/20210201/62c25dcb3b9b4d269a74894e4255a193.jpg");
Params.put("coverUrl", "https://streamimg.kjjcrm.com/kjy/image/20210201/d4093b24aaca49da8f0e3e276721feea.jpg");
Params.put("mpShareUrl", "https://streamimg.kjjcrm.com/kjy/image/20210201/182f3659e39b4ea6898af781cc6344a1.jpg");
Params.put("title", "直播测试" + RandomUtils.nextInt(1, 100));
Params.put("mpShareTitle", "自动化直播");
Params.put("companyId", 101);
Params.put("agentInviteAuthType", 1);
Params.put("agentInviteAuthLimitNum", 1);
long noticeTime = DateUtils.addHours(new Date(), 2).getTime();
long broadcastTime = DateUtils.addHours(new Date(), 5).getTime();
Params.put("noticeTime", noticeTime);
Params.put("broadcastTime", broadcastTime);
Params.put("shareContent", "自动化直播 #{shortLink}");
Params.put("shelfStatus", 2);
Params.put("secondPoster", "https://streamimg.kjjcrm.com/kjy/image/20210201/cc999ebde48e49f99ac3f0d93480453f.jpg");
Params.put("regionType",1);
Params.put("preAwardUrl","https://yun.dui88.com/kjy/image/20210629/1624949155842.png");
Params.put("preWindowUrl","https://yun.dui88.com/kjy/image/20210629/1624949098093.png");
Params.put("distributionType", 1);
Params.put("existSeriesPoster", 0);
Params.put("followPushState", 0);
Response response = network.postResponse(Params, BasicConfig.MANAGER_saveAndUpdate_0);
liveID = response.jsonPath().getString("data");
EncodeLiveID = IdMakeUtil.encodingId(Long.valueOf(liveID));
System.out.println(liveID);
LiveConstants.setValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey(), liveID);
LiveConstants.setValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey(), EncodeLiveID);
Assert.assertNotNull(liveID, network.message(Params, BasicConfig.MANAGER_saveAndUpdate_0, "新增直播失败", response.body().asString()));
LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey());
}
/**
* 基础配置
*/
@Test(description = "查询直播配置", priority = 2)
public void 查询直播配置() {
Map<String, Object> params = new HashMap<>();
params.put("liveId", liveID);
Response response = network.getResponse(params, BasicConfig.MANAGER_getConfDetail);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(params, BasicConfig.MANAGER_getConfDetail, "查询配置失败", response.body().asString()));
}
@Test(description = "单场红包配置", priority = 3)
public void 单场红包配置() {
//单场红包限额
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", liveID);
Params.put("maxAmount", 100000);
Response response = network.postResponse(Params, BasicConfig.MANAGER_MaxAmount);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_MaxAmount, "单场红包限额配置失败", response.body().asString()));
}
@Test(description = "展示红包金额", priority = 4)
public void 展示红包金额() {
//展示红包金额
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", liveID);
Params.put("showAmount", 100000);
Response response = network.postResponse(Params, BasicConfig.MANAGER_ShowAmount);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_ShowAmount, "展示红包配置失败", response.body().asString()));
}
@Test(description = "直播资料", priority = 5)
public void 直播资料() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", liveID);
List<Material> ids = new ArrayList<>();
ids.add(new Material(355L,0));
ids.add(new Material(356L,0));
ids.add(new Material(357L,0));
ids.add(new Material(358L,0));
ids.add(new Material(359L,0));
ids.add(new Material(960L,0));
ids.add(new Material(3384L,0));
Params.put("resourceList", ids);
Response response = network.postResponse(Params, BasicConfig.MANAGER_saveAndUpdate_8);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(response.body().asString());
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_saveAndUpdate_8, "产品资料配置失败", response.body().asString()));
}
/**
* 直播中奖品
*/
//直播中奖品配置
@Test(description = "直播中抽奖", priority = 9)
public void 直播中抽奖() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", liveID);
Params.put("interactNum", 1);
Params.put("showInteractNum", 1);
Params.put("welfareId", 191);
Params.put("afterMin", 20);
Response response = network.postResponse(Params, BasicConfig.MANAGER_add_1);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_add_1, "直播中抽奖配置失败", response.body().asString()));
}
}
......@@ -15,8 +15,8 @@ import java.util.List;
import java.util.Map;
import java.util.Objects;
import static com.kjj.config.BasicConfig.visitorAuth;
import static com.kjj.config.BasicConfig.*;
import static com.kjj.utils.ThreadSleepUtils.sleep;
public class SignIn implements Authorization {
......@@ -37,7 +37,7 @@ public class SignIn implements Authorization {
//循环发送心跳,长时间不发消息,链接会断开
for (int i = 0; i < 5; i++) {
MyWebSocketUtil.hb(client);
ThreadSleepUtils.sleep(5000);
sleep(5000);
}
//退出直播间
MyWebSocketUtil.out(client, LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
......@@ -48,12 +48,11 @@ public class SignIn implements Authorization {
MyWebSocketUtil.close(client);
}
@Test(description = "查询用户是否获得签到码", priority = 4)
@Test(description = "查询用户是否获得签到码", priority = 2)
public void 查询用户是否获得签到码() {
ThreadSleepUtils.sleep(500);
sleep(500);
Map<String, Object> myLotteryCodeParam = new HashMap<>();
myLotteryCodeParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
// myLotteryCodeParam.put("liveId","Kj21MjU5Njc");
myLotteryCodeParam.put("pageIndex",1);
myLotteryCodeParam.put("pageSize",30);
Response myLotteryCodeRes = network.getResponse(myLotteryCodeParam, BasicConfig.MOBILE_MyLotteryCode);
......@@ -70,9 +69,35 @@ public class SignIn implements Authorization {
Assert.assertTrue(result, network.message(myLotteryCodeParam, BasicConfig.MOBILE_MyLotteryCode, "查询用户自己的抽奖券列表失败", myLotteryCodeRes.body().asString()));
}
@Test(description = "查看直播中问卷有奖配置", priority = 3)
public void 查看直播中问卷有奖配置() {
Map<String,Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params,USER_clueInfoData);
try{
int on = response.jsonPath().getInt("data.on");
System.out.println(on);
String confStr = Integer.toBinaryString(on);
System.out.println(confStr);
char confStatus = confStr.charAt(confStr.length()-14);
Assert.assertEquals(confStatus, '1',network.message(params,USER_clueInfoData, "问卷有奖未开启", response.body().asString()));
}catch (Exception e){
e.printStackTrace();
Assert.fail(network.message(params, MOBILE_allLottery, "未获取到数据", response.body().asString()));
}
}
@Test(description = "查看直播中问卷有奖领取状态", priority = 4)
public void 查看直播中问卷有奖领取状态() {
sleep(1000);
Map<String,Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params,MANAGER_surveyReward_record);
int status = response.jsonPath().getInt("data.status");
String surveyUrl = response.jsonPath().getString("data.surveyUrl");
Assert.assertEquals(status, 0,network.message(params,MANAGER_surveyReward_record, "问卷有奖未开启", response.body().asString()));
Assert.assertNotNull(surveyUrl,network.message(params,MANAGER_surveyReward_record, "问卷有奖的问卷链接为空", response.body().asString()));
}
}
......
......@@ -87,6 +87,8 @@ public class LiveVistorRed implements Authorization {
confId_Red = notPublishRed.getConfId();
System.out.println(JSON.toJSONString(Beans));
Assert.assertNotNull(Beans, network.message(params, BasicConfig.MOBILE_AnchorRedList, "查询主播端红包轮次失败", response.body().asString()));
Assert.assertEquals(Beans.getRedList().get(0).getRedStatus(),4, network.message(params, BasicConfig.MOBILE_AnchorRedList, "查询主播端红包轮次失败", response.body().asString()));
Assert.assertEquals(Beans.getRedList().get(0).getAfterMin(),5, network.message(params, BasicConfig.MOBILE_AnchorRedList, "查询主播端红包轮次失败", response.body().asString()));
}
//主播端单个红包配置详情查询
......@@ -103,18 +105,22 @@ public class LiveVistorRed implements Authorization {
Assert.assertNotNull(Beans, network.message(params, BasicConfig.MOBILE_RedFindDetail, "查询主播端单个红包配置详情失败", response.body().asString()));
}
/*主播端上架普通红包*/
@Test(description = "主播端上架普通红包", priority = 5)
public void 主播端上架普通红包()
/*查询访客端红包状态*/
@Test(description = "红包状态查询", priority = 5)
public void 红包状态查询列表()
{
adminAuth();
ThreadSleepUtils.sleep(2000);
visitorAuth9();
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("confId",confId_Red);
Response response = network.postResponse(params, BasicConfig.MOBILE_Grounding);
boolean data = response.jsonPath().getBoolean("success");
System.out.println(JSON.toJSONString(data));
Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_Grounding, "上架普通红包失败", response.body().asString()));
Response response = network.getResponse(params, BasicConfig.MOBILE_FindRedList);
List<RedOrdinary> Beans = JsonUtil.parseResponseToListBean(response, RedOrdinary.class);
RedOrdinary one = Beans.get(0);
System.out.println(one.getConfId());
visitor_red=one.getConfId();
System.out.println(JSON.toJSONString(Beans));
Assert.assertNotNull(Beans, network.message(params, BasicConfig.MOBILE_FindRedList, "查询红包状态失败", response.body().asString()));
Assert.assertEquals(one.getRedStatus(),4, network.message(params, BasicConfig.MOBILE_FindRedList, "查询红包状态失败", response.body().asString()));
}
/*主播端发放普通红包*/
......@@ -131,7 +137,7 @@ public class LiveVistorRed implements Authorization {
Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_RedStart, "发放普通红包失败", response.body().asString()));
}
/*********普通红包上架************/
/*查询红包开始时间,倒计时*/
@Test(description = "查询红包开始时间", priority = 7)
public void 查询红包开始时间()
......@@ -146,24 +152,6 @@ public class LiveVistorRed implements Authorization {
Assert.assertNotNull(Beans, network.message(params, BasicConfig.MOBILE_RedGetSimple, "查询主播端发放红包开始时间失败", response.body().asString()));
}
/*查询访客端红包状态*/
@Test(description = "红包状态查询", priority = 8)
public void 红包状态查询列表()
{
ThreadSleepUtils.sleep(2000);
visitorAuth9();
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params, BasicConfig.MOBILE_FindRedList);
List<RedOrdinary> Beans = JsonUtil.parseResponseToListBean(response, RedOrdinary.class);
RedOrdinary one = Beans.get(0);
System.out.println(one.getConfId());
visitor_red=one.getConfId();
System.out.println(JSON.toJSONString(Beans));
Assert.assertNotNull(Beans, network.message(params, BasicConfig.MOBILE_FindRedList, "查询红包状态失败", response.body().asString()));
}
/*访客A开普通红包*/
@Test(description = "访客A开普通红包", priority = 9)
public void 访客A开普通红包()
......@@ -303,20 +291,7 @@ public class LiveVistorRed implements Authorization {
Assert.assertNotNull(Beans, network.message(params, BasicConfig.MOBILE_RedFindDetail, "查询主播端单个手气王红包配置详情失败", response.body().asString()));
}
/*主播端上架手气王红包*/
@Test(description = "主播端上架手气王红包", priority = 18)
public void 主播端上架手气王红包()
{
adminAuth();
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("confId",confId_Red);
Response response = network.postResponse(params, BasicConfig.MOBILE_Grounding);
boolean data = response.jsonPath().getBoolean("success");
System.out.println(JSON.toJSONString(data));
Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_Grounding, "上架普通红包失败", response.body().asString()));
}
/*********自动上架手气王红包********/
/*访客端-访客A获取直播间参数-getShareSign*/
@Test(description = "访客H获取直播间参数", priority = 19)
public void 访客H获取直播间参数()
......
......@@ -991,14 +991,13 @@ public class SecondKill implements Authorization {
}
int state = orderResultRes.jsonPath().getInt("data.state");
Assert.assertEquals(state, 3, network.message(orderResultPar, BasicConfig.MOBILE_secondKill_goodsOrderResult, "下单未成功", orderResultRes.body().asString()));
System.out.println(data);
}catch (Exception e){
e.printStackTrace();
Assert.fail(network.message(orderResultPar, BasicConfig.MOBILE_secondKill_goodsOrderResult, "获取数据失败", orderResultRes.body().asString()));
}
}
@Test(description = "管理后台查看用户秒杀订单",priority = 47)
@Test(description = "管理后台查看用户秒杀订单",priority = 48)
public void 管理后台查看用户秒杀订单(){
sleep(10000);
Map<String,Object> params =new HashMap<>();
......@@ -1013,7 +1012,7 @@ public class SecondKill implements Authorization {
orderId = response.jsonPath().getString("data.list.get(0).orderId");
}
@Test(description = "管理后台退款_用户秒杀订单",priority = 48)
@Test(description = "管理后台退款_用户秒杀订单",priority = 49)
public void 管理后台退款_用户秒杀订单(){
Map<String,Object> params =new HashMap<>();
params.put("liveUserId",81);
......@@ -1024,7 +1023,7 @@ public class SecondKill implements Authorization {
Assert.assertTrue(data, network.message(params,BasicConfig.MANAGER_order_refund,"退款失败",response.body().asString()));
}
@Test(description = "用户查看秒杀列表",priority = 49)
@Test(description = "用户查看秒杀列表",priority = 50)
public void 用户查看秒杀列表(){
sleep(3000);
Map<String,Object> params =new HashMap<>();
......@@ -1036,7 +1035,7 @@ public class SecondKill implements Authorization {
recordId = response.jsonPath().getString("data.list.get(0).recordId");
}
@Test(description = "用户查看退款详情",priority = 50)
@Test(description = "用户查看退款详情",priority = 51)
public void 用户查看退款详情(){
Map<String,Object> params =new HashMap<>();
params.put("recordId",recordId);
......@@ -1048,8 +1047,8 @@ public class SecondKill implements Authorization {
}
//代理人查询客户退款详情
@Test(description="查看客户A线索详情",priority = 51)
public void 查看客户A线索详情() {
@Test(description="查看假用户线索详情",priority = 52)
public void 查看假用户线索详情() {
agentAuth();
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
......
......@@ -284,10 +284,6 @@ public class BasicConfig {
public static final String MANAGER_saveOrUpdateV2 = MANAGER_HOST +"/kjy/manager/flip/word/saveOrUpdate/v2";
public static final String MANAGER_detailV2 = MANAGER_HOST +"/kjy/manager/flip/word/detail/v2";
public static final String MANAGER_wordDelete = MANAGER_HOST +"/kjy/manager/flip/word/delete";
public static final String MOBILE_status = MOBILE_HOST + "/kjy/live/flip/word/status";
public static final String MOBILE_wordConf= MOBILE_HOST + "/kjy/live/flip/word/conf";
public static final String MOBILE_checkIn= MOBILE_HOST + "/kjy/live/flip/word/checkIn";
public static final String MOBILE_history= MOBILE_HOST + "/kjy/live/flip/word/user/history";
public static final String MOBILE_finishStatus= MOBILE_HOST + "/kjy/live/flip/word/user/finishStatus";
......@@ -317,6 +313,12 @@ public class BasicConfig {
public static final String MOBILE_oldenEggTimeOut = MOBILE_HOST +"/test/goldenEggTimeOut";
public static final String MOBILE_goldenEgg_reset = MOBILE_HOST +"/kjy/live/treasure/goldenEgg/reset";
//问卷有奖
public static final String MANAGER_welfare_list = MANAGER_HOST + "/kjy/manager/live/welfare/list";
public static final String MANAGER_surveyReward_saveOrUpdate = MANAGER_HOST + "/kjy/manager/live/surveyReward/saveOrUpdate";
public static final String MANAGER_surveyReward_detail = MANAGER_HOST + "/kjy/manager/live/surveyReward/detail";
public static final String MANAGER_surveyReward_openOrClose = MANAGER_HOST + "/kjy/manager/live/surveyReward/openOrClose";
public static final String MANAGER_surveyReward_record = MOBILE_HOST + "/kjy/live/survey/reward/record";
// *************** 猜数字红包 ***************
public static final String MANAGER_getSurplusAmount = MANAGER_HOST + "/kjy/manager/red/conf/getSurplusAmount";
......@@ -338,10 +340,8 @@ public class BasicConfig {
public static final String MOBILE_guess = MOBILE_HOST + "/clue/guess/number/red/guess";
public static final String MOBILE_open= MOBILE_HOST + "/clue/guess/number/red/open";
public static final String MOBILE_result = MOBILE_HOST + "/clue/guess/number/red/result";
public static final String MANAGER_encode = MANAGER_HOST + "/kjy/manager/testUser/encode";
public static final String MANAGER_guessDeliver_detail = MANAGER_HOST + "/kjy/manager/red/guess/deliver/detail";
public static final String MANAGER_guessDeliver_save = MANAGER_HOST + "/kjy/manager/red/guess/deliver/save";
// *************** 宝箱裂变 ***************
public static final String MANAGER_getList4Admin = MANAGER_HOST + "/kjy/manager/welfare/pre/conf/getList4Admin";
......@@ -668,6 +668,11 @@ public class BasicConfig {
public static final String MOBILE_QuesDetail = MOBILE_HOST + "/clue/ques/reward/detail";
public static final String MOBILE_QuesParticipate = MOBILE_HOST + "/clue/ques/reward/participate";
public static final String MOBILE_QuesParticipateInfo = MOBILE_HOST + "/clue/ques/reward/participateInfo";
public static final String MANAGER_red_findRedList = MANAGER_HOST + "/kjy/manager/red/conf/findRedList";
public static final String MANAGER_redDeliver_detail = MANAGER_HOST + "/kjy/manager/red/conf/deliver/detail";
public static final String MANAGER_redDeliver_save = MANAGER_HOST + "/kjy/manager/red/conf/deliver/save";
public static final String MOBILE_red_list = MOBILE_HOST + "/conf/pre/red/findRedList";
public static final String MOBILE_red_detail = MOBILE_HOST + "/conf/pre/red/findRedDetail";
//***************直播素材*****************
public static final String MANAGER_saveOrUpdate_6 = MANAGER_HOST+ "/kjy/manager/conf/base/welfare/saveOrUpdate";
......@@ -1027,12 +1032,6 @@ public class BasicConfig {
// ************** 设置中心 ***************
public static final String SELLERCONFIG_EDITCONFIG = HOST + "/kjy/mp/sellerConfig/editConfig";
//*************** 签到领红包 ************************
public static final String ATTEND_entrance = HOST + "/kjy/mp/attend/entrance";
public static final String ATTEND_detail = HOST + "/kjy/mp/attend/detail";
public static final String ATTEND_income = HOST + "/kjy/mp/attend/income";
public static final String ATTEND_open = HOST + "/kjy/mp/attend/open";
// ************** BOSS看板 ***************
public static final String BOSS_ROLE = HOST + "/kjy/mp/seller/team/member/role";
public static final String BOSS_CODE = HOST + "/kjy/mp/seller/team/invite/code";
......@@ -1214,6 +1213,7 @@ public class BasicConfig {
public static final String MANAGER_solutionActivityName = MANAGER_HOST + "/kjy/manager/interact/solution/activityName";
public static final String MANAGER_itemConfDetail = MANAGER_HOST + "/kjy/manager/exclusiveItem/itemConfDetail";
public static final String MANAGER_adviceWordDelWord = MANAGER_HOST + "/kjy/manager/adviceWord/delWord";
// 管理后台—企业后台
public static final String MANAGER_cockpitSaveOrUpdate = MANAGER_HOST +"/kjy/manager/corp/cockpit/saveOrUpdate";
public static final String MANAGER_cockpitList = MANAGER_HOST +"/kjy/manager/corp/cockpit/list";
......
......@@ -112,6 +112,16 @@ public class BaseUtils {
Assert.assertTrue(result,network.message(params,MANAGER_disableUser,"返回数据为空",response.body().asString()));
}
//成为新用户
public static String beNewUser(String userOpenId) throws SQLException {
long userTest = (long) unsubscribe(userOpenId);
//禁用账号
disableUser(userTest);
//关注公众号
return subscribe(userOpenId);
}
/**
* 切换会员
* choice-1切换为非会员,choice为其他切换为会员
......
......@@ -16,91 +16,91 @@
<class name="com.kjj.cases.assistant.menu.NoviceGuidance"/>
</classes>
</test>
<test preserve-order="true" name = "首页">
<classes>
<class name="com.kjj.cases.assistant.homePage.HomePage"/>
</classes>
</test>
<test preserve-order="true" name="我的名片">
<classes>
<class name="com.kjj.cases.assistant.card.PersonCard"/>
</classes>
</test>
<test preserve-order="true" name="文章中个人名片">
<classes>
<class name="com.kjj.cases.assistant.card.ArticalPersonCard"/>
</classes>
</test>
<test preserve-order="true" name = "种草素材">
<classes>
<class name="com.kjj.cases.assistant.homePage.RecommendMaterial"/>
</classes>
</test>
<test preserve-order="true" name = "今日早报">
<classes>
<class name="com.kjj.cases.assistant.homePage.DailyPaper"/>
</classes>
</test>
<test preserve-order="true" name = "上传链接">
<classes>
<class name="com.kjj.cases.assistant.homePage.Upload"/>
</classes>
</test>
<test preserve-order="true" name = "获取访客">
<classes>
<class name="com.kjj.cases.assistant.whoSawMe.ForwardAndRead"/>
</classes>
</test>
<test preserve-order="true" name = "谁看过我">
<classes>
<class name="com.kjj.cases.assistant.whoSawMe.WhoSawMe"/>
</classes>
</test>
<test preserve-order="true" name = "我的转发">
<classes>
<class name="com.kjj.cases.assistant.whoSawMe.MyForward"/>
</classes>
</test>
<test preserve-order="true" name = "我的客户">
<classes>
<class name="com.kjj.cases.assistant.whoSawMe.MyCustomer"/>
</classes>
</test>
<test preserve-order="true" name = "贺卡">
<classes>
<class name="com.kjj.cases.assistant.markettools.GreetingCrad"/>
</classes>
</test>
<test preserve-order="true" name = "抽奖转盘">
<classes>
<class name="com.kjj.cases.assistant.markettools.GameLottery"/>
</classes>
</test>
<test preserve-order="true" name = "邀请函">
<classes>
<class name="com.kjj.cases.assistant.markettools.InvitationLetter"/>
</classes>
</test>
<test preserve-order="true" name = "使用攻略和设置中心">
<classes>
<class name="com.kjj.cases.assistant.menu.PersonalCenter"/>
</classes>
</test>
<test preserve-order="true" name = "企业后台">
<classes>
<class name="com.kjj.cases.assistant.enterprise.Enterprise"/>
</classes>
</test>
<test preserve-order="true" name = "管理后台-企业后台">
<classes>
<class name="com.kjj.cases.assistant.management.Management"/>
</classes>
</test>
<test preserve-order="true" name = "企业后台代理人端">
<classes>
<class name="com.kjj.cases.assistant.enterpriseAgent.EnterpriseAgent"/>
</classes>
</test>
<!-- <test preserve-order="true" name = "首页">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.homePage.HomePage"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="我的名片">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.card.PersonCard"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="文章中个人名片">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.card.ArticalPersonCard"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "种草素材">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.homePage.RecommendMaterial"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "今日早报">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.homePage.DailyPaper"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "上传链接">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.homePage.Upload"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "获取访客">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.whoSawMe.ForwardAndRead"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "谁看过我">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.whoSawMe.WhoSawMe"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "我的转发">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.whoSawMe.MyForward"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "我的客户">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.whoSawMe.MyCustomer"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "贺卡">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.markettools.GreetingCrad"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "抽奖转盘">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.markettools.GameLottery"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "邀请函">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.markettools.InvitationLetter"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "使用攻略和设置中心">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.menu.PersonalCenter"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "企业后台">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.enterprise.Enterprise"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "管理后台-企业后台">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.management.Management"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "企业后台代理人端">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.enterpriseAgent.EnterpriseAgent"/>-->
<!-- </classes>-->
<!-- </test>-->
</suite>
<!-- Suite -->
......
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