Commit bcd10a17 authored by 吕雯燕's avatar 吕雯燕

lv

parent f56bcb89
......@@ -34,18 +34,19 @@ public class 新多档位话费_兑换流程测试_ExchangeTest extends CheckTem
MobileService mobileService;
// @Test(description = "1元话费用户兑换限制永久1次")
@Test(description = "1元话费用户兑换限制永久1次")
public void 话费用户永久兑换限制测试() throws Exception{
int uid = 7280;
int uid = 7266;
String actualCredits = "10";
String degreeId = "1";
String appItemId = "195998";
String appItemId = "196923";
String credits = "10";
String message = "";
try{
//支付宝兑换
//划分兑换
Response response = this.话费兑换(uid,actualCredits,degreeId,appItemId,credits);
Assert.assertEquals(response.jsonPath().getString("data.payCreditsStatus"),"1","校验兑换失败");
logger.info("用户成功兑换一次");
......@@ -77,25 +78,25 @@ public class 新多档位话费_兑换流程测试_ExchangeTest extends CheckTem
}finally {
jdbc.update("DELETE FROM credits_dev.consumer_limit_record_only WHERE item_id = 1 and consumer_id = 100147134 and sub_key = 1");
jdbc.update("DELETE FROM credits_dev.consumer_limit_record WHERE item_id = 1 and consumer_id = 100147134 and sub_key = 1");
jdbc.update("DELETE FROM credits_dev.consumer_limit_record_only WHERE item_id = 1 and consumer_id = 100152006");
jdbc.update("DELETE FROM credits_dev.consumer_limit_record WHERE item_id = 1 and consumer_id = 100152006");
}
}
// @Test(description = "2元话费用户兑换限制每天1次")
@Test(description = "2元话费用户兑换限制每天1次")
public void 话费用户每天兑换限制测试() throws Exception{
int uid = 7281;
int uid = 7267;
String actualCredits = "20";
String degreeId = "2";
String appItemId = "195998";
String appItemId = "196923";
String credits = "20";
String message = "";
try{
//支付宝兑换
//话费兑换
Response response = this.话费兑换(uid,actualCredits,degreeId,appItemId,credits);
Assert.assertEquals(response.jsonPath().getString("data.payCreditsStatus"),"1","校验兑换失败");
logger.info("用户成功兑换一次");
......@@ -137,7 +138,7 @@ public class 新多档位话费_兑换流程测试_ExchangeTest extends CheckTem
logger.info("当前时间-1天:" + dateFormat.format(calendar.getTime()));
//更新表记录,修改记录为前一天
String sql = "UPDATE credits_dev.consumer_limit_record SET gmt_create = '" + dateFormat.format(calendar.getTime()) +"' WHERE item_id = 1 and consumer_id = 100147136 ORDER BY id DESC LIMIT 1";
String sql = "UPDATE credits_dev.consumer_limit_record SET gmt_create = '" + dateFormat.format(calendar.getTime()) +"' WHERE item_id = 1 and consumer_id = 100152007 ORDER BY id DESC LIMIT 1";
jdbc.update(sql);
......@@ -145,19 +146,18 @@ public class 新多档位话费_兑换流程测试_ExchangeTest extends CheckTem
}
// @Test(description = "10元话费用户兑换限制每月1次")
@Test(description = "10元话费用户兑换限制每月1次")
public void 话费用户每月兑换限制测试() throws Exception{
int uid = 7282;
String actualCredits = "50";
int uid = 7268;
String actualCredits = "5";
String degreeId = "10";
String appItemId = "195998";
String credits = "50";
String appItemId = "196923";
String credits = "5";
String message = "";
try{
//支付宝兑换
Thread.sleep(3000);
//话费兑换
Response response = this.话费兑换(uid,actualCredits,degreeId,appItemId,credits);
Assert.assertEquals(response.jsonPath().getString("data.payCreditsStatus"),"1","校验兑换失败");
logger.info("用户成功兑换一次");
......@@ -199,7 +199,7 @@ public class 新多档位话费_兑换流程测试_ExchangeTest extends CheckTem
logger.info("当前时间-30天:" + dateFormat.format(calendar.getTime()));
//更新表记录,修改记录为前一个月
String sql = "UPDATE credits_dev.consumer_limit_record SET gmt_create = '" + dateFormat.format(calendar.getTime()) +"' WHERE item_id = 1 and consumer_id = 100147137 ORDER BY id DESC LIMIT 1";
String sql = "UPDATE credits_dev.consumer_limit_record SET gmt_create = '" + dateFormat.format(calendar.getTime()) +"' WHERE item_id = 1 and consumer_id = 100152008 ORDER BY id DESC LIMIT 1";
jdbc.update(sql);
......@@ -207,17 +207,17 @@ public class 新多档位话费_兑换流程测试_ExchangeTest extends CheckTem
}
// @Test(description = "话费会员等级限制LV5")
@Test(description = "话费会员等级限制LV5")
public void 话费会员等级测试() throws Exception{
int uid = 7282;
String actualCredits = "20";
int uid = 7268;
String actualCredits = "2";
String degreeId = "20";
String appItemId = "195998";
String credits = "20";
String appItemId = "196923";
String credits = "2";
String message = "";
//用户登录, vip=5
Map cookies = authorization.generateSignAutoLogin("SvSQyVi2iLSoXgaRutJgK1UCkWb",7273);
Map cookies = authorization.generateSignAutoLogin("3aWcuY9uqeV9Mzs8cuwttvWMtSNY",7265);
//会员符合条件,兑换
......
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