Commit 3d0f5d38 authored by 赵然's avatar 赵然

zr

parent 399aed5e
......@@ -61,6 +61,9 @@ public class 出奖订单测试_DuibaTest extends DuibaTestBase {
Thread.sleep(2000);
Map<String, Object> selectResult = jdbc.findSimpleResult("select * from credits_hdtool.hdtool_orders_0687 where id = '"+orderId+"'");
Assert.assertEquals(String.valueOf(selectResult.get("exchange_status")),"2","子订单兑换状态正常");
logger.info("子订单状态为2,处于领奖成功状态");
logger.info("主订单为:"+selectResult.get("main_order_num"));
String main_orderId = String.valueOf(selectResult.get("main_order_num"));
......@@ -106,6 +109,9 @@ public class 出奖订单测试_DuibaTest extends DuibaTestBase {
response.prettyPrint();
}
Map<String, Object> selectResult = jdbc.findSimpleResult("select * from credits_hdtool.hdtool_orders_0687 where id = '"+orderId+"' ",null);
Assert.assertEquals(String.valueOf(selectResult.get("exchange_status")),"2","子订单兑换状态正常");
logger.info("子订单状态为2,处于领奖成功状态");
logger.info("主订单为:"+selectResult.get("main_order_num"));
String main_orderId = String.valueOf(selectResult.get("main_order_num"));
Map<String, Object> selectResult2 = jdbc.findSimpleResult("select * from orders_consumer.orders_0687 where order_num = '"+main_orderId+"' ");
......@@ -146,13 +152,21 @@ public class 出奖订单测试_DuibaTest extends DuibaTestBase {
}
String type = String.valueOf(response.jsonPath().getString("lottery.type"));
//领奖前子订单状态查询
Map<String, Object> selectResult = jdbc.findSimpleResult("select * from credits_hdtool.hdtool_orders_0687 where id = '"+orderId+"'");
Assert.assertEquals(String.valueOf(selectResult.get("exchange_status")),"1","子订单兑换状态正常");
logger.info("子订单状态为1,处于待领奖状态");
//领奖操作
String recordId = MatcherString.getString(response.asString(), "recordId=(.*?)&", 1);
response = newActivityService.doTakePrize(2720,type, recordId);
Assert.assertEquals(response.jsonPath().getString("message"), "领奖成功");
logger.info("结果:" + type + "领奖流程成功");
Map<String, Object> selectResult = jdbc.findSimpleResult("select * from credits_hdtool.hdtool_orders_0687 where id = '"+orderId+"'");
selectResult = jdbc.findSimpleResult("select * from credits_hdtool.hdtool_orders_0687 where id = '"+orderId+"'");
Assert.assertEquals(String.valueOf(selectResult.get("exchange_status")),"2","子订单兑换状态正常");
logger.info("子订单状态为2,处于领奖成功状态");
String main_orderId = String.valueOf(selectResult.get("main_order_num"));
logger.info("主订单为:"+main_orderId);
......
......@@ -28,8 +28,8 @@ public class 开发者签到编辑_signTest extends AbstractTestNGSpringContextT
Response response = signService.selectsignOperList("19515");
response.print();
Assert.assertEquals("false",response.jsonPath().getString("data.list[0].openToDev"),"来自Duiba的签到编辑权限失败");
Assert.assertEquals("true",response.jsonPath().getString("data.list[1].openToDev"),"来自开发者自有的签到编辑权限失败");
Assert.assertEquals(response.jsonPath().getString("data.list[0].openToDev"),"false","来自Duiba的签到编辑权限失败");
Assert.assertEquals(response.jsonPath().getString("data.list[1].openToDev"),"true","来自开发者自有的签到编辑权限失败");
logger.info("开发者签到编辑权限校验成功");
}
......
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