Commit 039a72e3 authored by 吕雯燕's avatar 吕雯燕

lv

parent d2591d15
......@@ -53,7 +53,8 @@ public class 新建活动测试_DuibaTest extends DuibaTestBase{
}else
if(method.getName().equals("新建自有单品抽奖活动")){
result = new Object[][]{
new Object[]{1,"177222","【自动化】自有实物","object","100","5","everyday","//yun.dui88.com/images/201811/hvhlu2ggta.png","0","","新建自有单品抽奖--每天抽奖"}, //case1
new Object[]{1,"177222","【自动化】自有实物","object","100","5","everyday","//yun.dui88.com/images/201811/hvhlu2ggta.png","0","","false","新建自有单品抽奖--每日次数"}, //case1
new Object[]{2,"159857","【自动化勿动】自有优惠券","coupon","2000","5","forever","//yun.dui88.com/images/201811/hvhlu2ggta.png","2","2","true","新建自有单品抽奖--永久次数和会员等级"}, //case1
};
......@@ -169,17 +170,18 @@ public class 新建活动测试_DuibaTest extends DuibaTestBase{
* @param bannerImgNew 新版banner图
* @param vipLimitType 会员等级配置
* @param vipLimits 会员的等级范围
* @param exchangeLimit 直充防刷
* @param caseName 用例名称
* @throws Exception
*/
@Test(dataProvider = "providerMethod")
public void 新建自有单品抽奖活动(int caseNum,String mainAppItemId,String appItemTitle,String appItemType,String mainAppItemRemaining,String freeDrawLimit,String freeDrawLimitScope,String bannerImgNew,String vipLimitType,String vipLimits,String caseName) throws Exception{
public void 新建自有单品抽奖活动(int caseNum,String mainAppItemId,String appItemTitle,String appItemType,String mainAppItemRemaining,String freeDrawLimit,String freeDrawLimitScope,String bannerImgNew,String vipLimitType,String vipLimits,String exchangeLimit,String caseName) throws Exception{
logger.info("-----------------------------"+caseName+"-----------------------------");
String data = PublicMethod.data();
String title = "【自动化】自有单品抽奖"+data;
//新建自有活动工具
developerService.saveDpAll("",title,mainAppItemId,appItemTitle,appItemType,mainAppItemRemaining,freeDrawLimit,freeDrawLimitScope,bannerImgNew,vipLimitType,vipLimits);
developerService.saveDpAll("",title,mainAppItemId,appItemTitle,appItemType,mainAppItemRemaining,freeDrawLimit,freeDrawLimitScope,bannerImgNew,vipLimitType,vipLimits,exchangeLimit);
//获取活动id
Response listResponse = developerService.list2(title);
......@@ -198,9 +200,20 @@ public class 新建活动测试_DuibaTest extends DuibaTestBase{
Assert.assertEquals(editResponse.jsonPath().getString("data.consumerDrawLimitScope"),"everyday","校验用户抽奖限制类型失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.mainAppItemId"),"177222","校验活动奖品id失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.mainAppItemRemaining"),"100","校验活动奖品数量失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.mainAppItemRate"),"66.66","校验活动奖品数量失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.limitDateJson"),"{\"endDay\":\"2020-02-01\",\"endThours\":\"22\",\"endTminute\":\"0\",\"startDay\":\"2018-11-26\",\"startHours\":\"6\",\"startTminute\":\"0\"}","校验活动抽奖日期限制失败");
logger.info("校验新建自有单品抽奖-1内容成功");
break;
case 2:
Assert.assertEquals(editResponse.jsonPath().getString("data.appItemTitle"),"【自动化勿动】自有优惠券","校验活动奖品名称失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.freeDrawLimit"),"5","校验活动免费抽奖次数失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.freeDrawLimitScope"),"forever","校验活动免费抽奖类型失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.mainAppItemId"),"159857","校验活动奖品id失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.appVipLimitOpen"),"true","校验活动会员等级开关失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.vipLimits"),"2","校验活动会员等级范围失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.exchangeLimit"),"true","校验活动直充防刷失败");
logger.info("校验新建自有单品抽奖-1内容成功");
break;
}
......
......@@ -977,7 +977,7 @@ public class DeveloperService {
}
//创建保存自有单品抽奖
public Response saveDpAll(String id,String title,String mainAppItemId,String appItemTitle,String appItemType, String mainAppItemRemaining,String freeDrawLimit,String freeDrawLimitScope,String bannerImgNew,String vipLimitType,String vipLimits) throws Exception {
public Response saveDpAll(String id,String title,String mainAppItemId,String appItemTitle,String appItemType, String mainAppItemRemaining,String freeDrawLimit,String freeDrawLimitScope,String bannerImgNew,String vipLimitType,String vipLimits,String exchangeLimit) throws Exception {
String url=hdHost+"/appSingleLottery/saveOrUpdate";
......@@ -1008,7 +1008,7 @@ public class DeveloperService {
map.put("startTminute","0");
map.put("endThours","22");
map.put("endTminute","0");
map.put("exchangeLimit","false");
map.put("exchangeLimit",exchangeLimit);
map.put("appItemType",appItemType);
map.put("mainAppItemId",mainAppItemId);
map.put("mainAppItemDegree","");
......
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