Commit 131275d6 authored by 龚小红's avatar 龚小红

Merge branch 'feat/20211013-xmc' into 'master'

代理人端改版需求合入

See merge request test-group/kejiji!133
parents 0feab100 5f44b8f4
...@@ -21,4 +21,6 @@ public class AgentBean { ...@@ -21,4 +21,6 @@ public class AgentBean {
private String companyLogo; private String companyLogo;
private Long appointmentNum; private Long appointmentNum;
private int inviteAuthStatus; private int inviteAuthStatus;
private int agentAwardOpenFlag; // 是否开启代理人邀约奖励
private int agentNeedInviteNum; // 还需邀请多少人才能开启红包
} }
...@@ -125,6 +125,8 @@ public class Agent implements Authorization { ...@@ -125,6 +125,8 @@ public class Agent implements Authorization {
AgentBean bean = agentBeans.get(0); AgentBean bean = agentBeans.get(0);
System.out.println(JSON.toJSONString(agentBeans)); System.out.println(JSON.toJSONString(agentBeans));
Assert.assertNotNull(bean, network.message(params, BasicConfig.MOBILE_Procurator, "查询直播列表失败", response.body().asString())); Assert.assertNotNull(bean, network.message(params, BasicConfig.MOBILE_Procurator, "查询直播列表失败", response.body().asString()));
// 判断代理人邀约奖励openFlag是否为开
Assert.assertEquals(bean.getAgentAwardOpenFlag(), 1, network.message(params, MOBILE_Procurator, "代理人邀约奖励开启状态错误", response.body().asString()));
} }
} }
......
...@@ -23,15 +23,19 @@ public class Customer implements Authorization { ...@@ -23,15 +23,19 @@ public class Customer implements Authorization {
@Test(description = "客户数量统计", priority = 1) @Test(description = "客户数量统计", priority = 1)
public void 客户数量统计() { public void 客户数量统计() {
Response response = network.getResponse(BasicConfig.MOBILE_potentialCount); Response cusStatRes = network.getResponse(BasicConfig.MOBILE_cusStat);
System.out.println(response.body().asString()); try{
int sumCount=response.jsonPath().getInt("data.sumCount"); int total = cusStatRes.jsonPath().getInt("data.totalCustomer");
Assert.assertTrue(sumCount>26, network.message(BasicConfig.MOBILE_potentialCount, "总客户数量不对", response.body().asString())); int award = cusStatRes.jsonPath().getInt("data.awardNum");
int lastLiveCount = response.jsonPath().getJsonObject("data.lastLiveCount"); int purchase = cusStatRes.jsonPath().getInt("data.purchaseNum");
Assert.assertTrue(lastLiveCount>1, network.message(BasicConfig.MOBILE_potentialCount, "最近一场直播客户数量为null", response.body().asString())); int indirectNum = cusStatRes.jsonPath().getInt("data.indirectNum");
int potentialCount = response.jsonPath().getJsonObject("data.potentialCount"); if (total < 0 || award < 0 || purchase < 0 || indirectNum < 0){
Assert.assertTrue(potentialCount>1, network.message(BasicConfig.MOBILE_potentialCount, "准客户数量为null", response.body().asString())); Assert.fail(network.message(BasicConfig.MOBILE_cusStat, "客户数量有误", cusStatRes.body().asString()));
lastLiveId=response.jsonPath().getString("data.lastLiveId"); }
}catch (NullPointerException e){
e.printStackTrace();
Assert.fail(network.message(BasicConfig.MOBILE_cusStat, "获取数据失败", cusStatRes.body().asString()));
}
} }
@Test(description = "代理人最近一场直播客户列表", priority = 2) @Test(description = "代理人最近一场直播客户列表", priority = 2)
...@@ -76,8 +80,28 @@ public class Customer implements Authorization { ...@@ -76,8 +80,28 @@ public class Customer implements Authorization {
} }
@Test(description = "查询代理人转介绍客户列表", priority = 5)
public void 查询代理人转介绍客户列表() {
Map<String, Object> custListPar = new HashMap<>();
custListPar.put("actionTypeList", 31);
Response custListRes = network.getResponse(custListPar, BasicConfig.MOBILE_custList);
try {
List<Map<String, Object>> cL = custListRes.jsonPath().getList("data.list");
if (cL.size() > 0){
for (Map<String, Object> cust : cL){
Assert.assertEquals((int)cust.get("firstInvitedFlag"), 0, network.message(custListPar, BasicConfig.MOBILE_custList, "有非转介绍客户", custListRes.body().asString()));
}
}else {
Assert.fail(network.message(custListPar, BasicConfig.MOBILE_custList, "转介绍客户数量错误", custListRes.body().asString()));
}
}catch (NullPointerException e){
e.printStackTrace();
Assert.fail(network.message(custListPar, BasicConfig.MOBILE_custList, "获取数据失败", custListRes.body().asString()));
}
}
@Test(description = "查询客户直播线索汇总信息", priority = 5) @Test(description = "查询客户直播线索汇总信息", priority = 6)
public void 查询客户直播线索汇总信息() { public void 查询客户直播线索汇总信息() {
Map<String, Object> Params = new HashMap<>(); Map<String, Object> Params = new HashMap<>();
Params.put("customerId",customerId); Params.put("customerId",customerId);
...@@ -91,7 +115,7 @@ public class Customer implements Authorization { ...@@ -91,7 +115,7 @@ public class Customer implements Authorization {
} }
@Test(description = "编辑客户基本信息", priority = 6) @Test(description = "编辑客户基本信息", priority = 7)
public void 编辑客户基本信息() { public void 编辑客户基本信息() {
Map<String, Object> Params = new HashMap<>(); Map<String, Object> Params = new HashMap<>();
Params.put("customerId",customerId); Params.put("customerId",customerId);
...@@ -168,7 +192,7 @@ public class Customer implements Authorization { ...@@ -168,7 +192,7 @@ public class Customer implements Authorization {
} }
@Test(description = "查询客户基本信息", priority = 7) @Test(description = "查询客户基本信息", priority = 8)
public void 查询客户基本信息() { public void 查询客户基本信息() {
Map<String, Object> Params = new HashMap<>(); Map<String, Object> Params = new HashMap<>();
Params.put("customerId",customerId); Params.put("customerId",customerId);
...@@ -179,7 +203,7 @@ public class Customer implements Authorization { ...@@ -179,7 +203,7 @@ public class Customer implements Authorization {
} }
@Test(description = "查询客户详情头像信息栏", priority = 8) @Test(description = "查询客户详情头像信息栏", priority = 9)
public void 查询客户详情头像信息栏() { public void 查询客户详情头像信息栏() {
Map<String, Object> Params = new HashMap<>(); Map<String, Object> Params = new HashMap<>();
Params.put("customerId",customerId); Params.put("customerId",customerId);
...@@ -194,7 +218,7 @@ public class Customer implements Authorization { ...@@ -194,7 +218,7 @@ public class Customer implements Authorization {
} }
@Test(description = "查询客户直播场次详情信息", priority = 9) @Test(description = "查询客户直播场次详情信息", priority = 10)
public void 查询客户直播场次详情信息() { public void 查询客户直播场次详情信息() {
Map<String, Object> Params = new HashMap<>(); Map<String, Object> Params = new HashMap<>();
Params.put("customerId",customerId); Params.put("customerId",customerId);
...@@ -208,7 +232,7 @@ public class Customer implements Authorization { ...@@ -208,7 +232,7 @@ public class Customer implements Authorization {
} }
@Test(description = "修改客户备注名", priority = 10) @Test(description = "修改客户备注名", priority = 11)
public void 修改客户备注名() { public void 修改客户备注名() {
Map<String, Object> Params = new HashMap<>(); Map<String, Object> Params = new HashMap<>();
Params.put("liveUserId",customerId); Params.put("liveUserId",customerId);
...@@ -220,7 +244,7 @@ public class Customer implements Authorization { ...@@ -220,7 +244,7 @@ public class Customer implements Authorization {
} }
@Test(description = "跟进机会列表", priority = 11) @Test(description = "跟进机会列表", priority = 12)
public void 跟进机会列表() { public void 跟进机会列表() {
Map<String, Object> Params = new HashMap<>(); Map<String, Object> Params = new HashMap<>();
Params.put("liveVisitorId",customerId); Params.put("liveVisitorId",customerId);
...@@ -233,7 +257,7 @@ public class Customer implements Authorization { ...@@ -233,7 +257,7 @@ public class Customer implements Authorization {
} }
@Test(description = "获取跟进机会回复建议", priority = 12) @Test(description = "获取跟进机会回复建议", priority = 13)
public void 获取跟进机会回复建议() { public void 获取跟进机会回复建议() {
Map<String, Object> Params = new HashMap<>(); Map<String, Object> Params = new HashMap<>();
Params.put("liveVisitorId",customerId); Params.put("liveVisitorId",customerId);
...@@ -245,7 +269,7 @@ public class Customer implements Authorization { ...@@ -245,7 +269,7 @@ public class Customer implements Authorization {
} }
@Test(description = "跟进机会详情", priority = 12) @Test(description = "跟进机会详情", priority = 14)
public void 跟进机会详情() { public void 跟进机会详情() {
Map<String, Object> Params = new HashMap<>(); Map<String, Object> Params = new HashMap<>();
Params.put("id",id); Params.put("id",id);
......
...@@ -117,7 +117,8 @@ public class LiveLater implements Authorization { ...@@ -117,7 +117,8 @@ public class LiveLater implements Authorization {
} }
// 代理人端改版,客户页不再调用clueList接口
/*
// 获取直播结束我的客户页面直接邀请tab; // 获取直播结束我的客户页面直接邀请tab;
@Test(description="直接邀请tab数据",priority = 6) @Test(description="直接邀请tab数据",priority = 6)
public void 直接邀请tab数据() { public void 直接邀请tab数据() {
...@@ -185,6 +186,7 @@ public class LiveLater implements Authorization { ...@@ -185,6 +186,7 @@ public class LiveLater implements Authorization {
} }
// 获取直播结束我的客户页面观看20分钟+tab; // 获取直播结束我的客户页面观看20分钟+tab;
@Test(description="观看20分钟+tab数据",priority = 10) @Test(description="观看20分钟+tab数据",priority = 10)
public void 观看20分钟以上tab数据() { public void 观看20分钟以上tab数据() {
...@@ -201,6 +203,43 @@ public class LiveLater implements Authorization { ...@@ -201,6 +203,43 @@ public class LiveLater implements Authorization {
} }
*/
@Test(description = "获取本场直播客户统计", priority = 8)
public void 获取本场直播客户统计() {
Map<String, Object> custStatPar = new HashMap<>();
custStatPar.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response custStatRes = network.getResponse(custStatPar, BasicConfig.MOBILE_custStat);
try {
int totalNum = custStatRes.jsonPath().getInt("data.totalNum");
int awardNum = custStatRes.jsonPath().getInt("data.awardNum");
int purchaseNum = custStatRes.jsonPath().getInt("data.purchaseNum");
int indirectNum = custStatRes.jsonPath().getInt("data.indirectNum");
if (totalNum < 0 || awardNum < 0 || purchaseNum < 0 || indirectNum < 0){
Assert.fail(network.message(custStatPar, BasicConfig.MOBILE_custStat, "本场直播客户统计数错误", custStatRes.body().asString()));
}
}catch (NullPointerException e){
e.printStackTrace();
Assert.fail(network.message(custStatPar, BasicConfig.MOBILE_custStat, "数据获取失败", custStatRes.body().asString()));
}
}
@Test(description = "直播中客户列表", priority = 9)
public void 直播中客户列表() {
Map<String, Object> custListPar = new HashMap<>();
custListPar.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response custListRes = network.getResponse(custListPar, BasicConfig.MOBILE_liveCustList);
try {
List<Map<String, Object>> visitorLists = custListRes.jsonPath().getList("data.list");
List<String> goodsList = (List<String>) visitorLists.get(0).get("goodsList");
Assert.assertTrue(goodsList.get(0).equals("自动化专用商品"), network.message(custListPar, BasicConfig.MOBILE_liveCustList, "客户购买商品名称错误", custListRes.body().asString()));
}catch (NullPointerException e){
e.printStackTrace();
Assert.fail(network.message(custListPar, BasicConfig.MOBILE_liveCustList, "获取数据失败", custListRes.body().asString()));
}
}
//查看客户线索详情 //查看客户线索详情
@Test(description="客户A线索已读",priority = 11) @Test(description="客户A线索已读",priority = 11)
......
...@@ -170,19 +170,6 @@ public class SecondKill implements Authorization { ...@@ -170,19 +170,6 @@ public class SecondKill implements Authorization {
} }
} }
// @Test(description = "无法同时上架多轮秒杀", priority = 10)
// public void 无法同时上架多轮秒杀() {
// Map<String, Object> goodsOnPar = new HashMap<>();
// goodsOnPar.put("id", ConfSecondKill.skIdSecond);
// Response goodsOnRes = network.postResponse(goodsOnPar, BasicConfig.ANCHOR_secondKillOn);
// try {
// boolean data = goodsOnRes.jsonPath().getBoolean("data");
// Assert.assertTrue(data, network.message(goodsOnPar, BasicConfig.ANCHOR_secondKillOn, "上架第二轮秒杀失败", goodsOnRes.body().asString()));
// }catch (NullPointerException e){
// e.printStackTrace();
// Assert.fail(network.message(goodsOnPar, BasicConfig.ANCHOR_secondKillOn, "未获取到数据", goodsOnRes.body().asString()));
// }
// }
@Test(description = "同时上架0秒杀商品", priority = 10) @Test(description = "同时上架0秒杀商品", priority = 10)
public void 同时上架0秒杀商品() { public void 同时上架0秒杀商品() {
adminAuth(); adminAuth();
......
...@@ -465,6 +465,7 @@ public class BasicConfig { ...@@ -465,6 +465,7 @@ public class BasicConfig {
//客户管理 //客户管理
public static final String MOBILE_potentialCount = MOBILE_HOST + "/kjy/live/agent/customer/potentialCount"; public static final String MOBILE_potentialCount = MOBILE_HOST + "/kjy/live/agent/customer/potentialCount";
public static final String MOBILE_cusStat = MOBILE_HOST + "/kjy/live/agent/customer/cusStat";
public static final String MOBILE_customerList = MOBILE_HOST + "/kjy/live/agent/customer/list"; public static final String MOBILE_customerList = MOBILE_HOST + "/kjy/live/agent/customer/list";
public static final String MOBILE_lastLiveList = MOBILE_HOST + "/kjy/live/agent/customer/lastLiveList"; public static final String MOBILE_lastLiveList = MOBILE_HOST + "/kjy/live/agent/customer/lastLiveList";
public static final String MOBILE_basicInfo = MOBILE_HOST + "/kjy/live/agent/customer/basicInfo"; public static final String MOBILE_basicInfo = MOBILE_HOST + "/kjy/live/agent/customer/basicInfo";
...@@ -475,6 +476,10 @@ public class BasicConfig { ...@@ -475,6 +476,10 @@ public class BasicConfig {
public static final String MOBILE_followChanceList = MOBILE_HOST + "/kjy/live/agent/customer/followChanceList"; public static final String MOBILE_followChanceList = MOBILE_HOST + "/kjy/live/agent/customer/followChanceList";
public static final String MOBILE_customerGetReplyAdvice = MOBILE_HOST + "/kjy/live/agent/customer/getReplyAdvice"; public static final String MOBILE_customerGetReplyAdvice = MOBILE_HOST + "/kjy/live/agent/customer/getReplyAdvice";
public static final String MOBILE_followChanceDetail = MOBILE_HOST + "/kjy/live/agent/customer/followChanceDetail"; public static final String MOBILE_followChanceDetail = MOBILE_HOST + "/kjy/live/agent/customer/followChanceDetail";
public static final String MOBILE_custList = MOBILE_HOST + "/kjy/live/agent/customer/custList";
//单场直播线索
public static final String MOBILE_custStat = MOBILE_HOST + "/kjy/live/customer/stat";
public static final String MOBILE_liveCustList = MOBILE_HOST + "/kjy/live/customer/list";
// *************** 代理人 *************** // *************** 代理人 ***************
public static final String MOBILE_recycleSuccessCase = MOBILE_HOST + "/kjy/live/agent/clue/recycleSuccessCase"; public static final String MOBILE_recycleSuccessCase = MOBILE_HOST + "/kjy/live/agent/clue/recycleSuccessCase";
public static final String MOBILE_providerInfo = MOBILE_HOST + "/kjy/live/agent/clue/providerInfo"; public static final String MOBILE_providerInfo = MOBILE_HOST + "/kjy/live/agent/clue/providerInfo";
......
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