Commit 66f44507 authored by 钱雯君's avatar 钱雯君

add

parent b9fd75c0
...@@ -85,8 +85,8 @@ public class pk_开奖_瓜分红包_押注人数不同测试_AccessTest extends ...@@ -85,8 +85,8 @@ public class pk_开奖_瓜分红包_押注人数不同测试_AccessTest extends
@Test @Test
public void 瓜分红包_两个选项_押注人数不同_开奖测试(){ public void 瓜分红包_两个选项_押注人数不同_开奖测试() throws Exception{
try {
List<Map<String,Object>> pks = jdbc.findModeResult("select * from act_com_conf.tb_bet_option where bet_id = ?",newBetId); List<Map<String,Object>> pks = jdbc.findModeResult("select * from act_com_conf.tb_bet_option where bet_id = ?",newBetId);
logger.info("pk活动信息为"+JSONObject.toJSONString(pks)); logger.info("pk活动信息为"+JSONObject.toJSONString(pks));
...@@ -94,14 +94,14 @@ public class pk_开奖_瓜分红包_押注人数不同测试_AccessTest extends ...@@ -94,14 +94,14 @@ public class pk_开奖_瓜分红包_押注人数不同测试_AccessTest extends
optionsIds.add(pks.get(i).get("id").toString()); optionsIds.add(pks.get(i).get("id").toString());
} }
logger.info("pk活动id为:"+newBetId+",选项id为:"+ optionsIds.toString()); logger.info("pk活动id为:"+newBetId+",选项id为:"+ optionsIds.toString());
Map<String,Object> user01_account1 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0060 where consumer_id = '100066364' and account_type = '6'\n"); // Map<String,Object> user01_account1 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0060 where consumer_id = '100066364' and account_type = '6'\n");
Long use1_Acc1 = Long.valueOf(user01_account1.get("balance_amount").toString()); // Long use1_Acc1 = Long.valueOf(user01_account1.get("balance_amount").toString());
Map<String,Object> user02_account1 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0061 where consumer_id = '100066365' and account_type = '6'\n"); // Map<String,Object> user02_account1 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0061 where consumer_id = '100066365' and account_type = '6'\n");
Long use2_Acc1 = Long.valueOf(user02_account1.get("balance_amount").toString()); // Long use2_Acc1 = Long.valueOf(user02_account1.get("balance_amount").toString());
Map<String,Object> user03_account1 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0062 where consumer_id = '100066366' and account_type = '6'\n"); // Map<String,Object> user03_account1 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0062 where consumer_id = '100066366' and account_type = '6'\n");
Long use3_Acc1 = Long.valueOf(user03_account1.get("balance_amount").toString()); // Long use3_Acc1 = Long.valueOf(user03_account1.get("balance_amount").toString());
Map<String,Object> user04_account1 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0063 where consumer_id = '100066367' and account_type = '6'\n"); // Map<String,Object> user04_account1 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0063 where consumer_id = '100066367' and account_type = '6'\n");
Long use4_Acc1 = Long.valueOf(user04_account1.get("balance_amount").toString()); // Long use4_Acc1 = Long.valueOf(user04_account1.get("balance_amount").toString());
//押注第一个选项:user01,user02 //押注第一个选项:user01,user02
...@@ -157,24 +157,19 @@ public class pk_开奖_瓜分红包_押注人数不同测试_AccessTest extends ...@@ -157,24 +157,19 @@ public class pk_开奖_瓜分红包_押注人数不同测试_AccessTest extends
Assert.assertTrue(bet1Times<bet2Times,"活动获胜人数比失败人数多校验失败"); Assert.assertTrue(bet1Times<bet2Times,"活动获胜人数比失败人数多校验失败");
logger.info("选项1的押注人数为:"+bet1Result.get("bet_times").toString()+",选项2的押注人数为:"+bet2Result.get("bet_times").toString()); logger.info("选项1的押注人数为:"+bet1Result.get("bet_times").toString()+",选项2的押注人数为:"+bet2Result.get("bet_times").toString());
Map<String,Object> user01_account2 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0060 where consumer_id = '100066364' and account_type = '6'\n"); // Map<String,Object> user01_account2 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0060 where consumer_id = '100066364' and account_type = '6'\n");
Long use1_Acc2 = Long.valueOf(user01_account2.get("balance_amount").toString()); // Long use1_Acc2 = Long.valueOf(user01_account2.get("balance_amount").toString());
Assert.assertEquals(use1_Acc2,use1_Acc1,"用户1入账校验失败"); // Assert.assertEquals(use1_Acc2,use1_Acc1,"用户1入账校验失败");
Map<String,Object> user02_account2 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0061 where consumer_id = '100066365' and account_type = '6'\n"); // Map<String,Object> user02_account2 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0061 where consumer_id = '100066365' and account_type = '6'\n");
Long use2_Acc2 = Long.valueOf(user02_account2.get("balance_amount").toString()); // Long use2_Acc2 = Long.valueOf(user02_account2.get("balance_amount").toString());
Assert.assertEquals(use2_Acc2.toString(),String.valueOf(use2_Acc1+10),"用户2入账校验失败"); // Assert.assertEquals(use2_Acc2.toString(),String.valueOf(use2_Acc1+10),"用户2入账校验失败");
Map<String,Object> user03_account2 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0062 where consumer_id = '100066366' and account_type = '6'\n"); // Map<String,Object> user03_account2 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0062 where consumer_id = '100066366' and account_type = '6'\n");
Long use3_Acc2 = Long.valueOf(user03_account2.get("balance_amount").toString()); // Long use3_Acc2 = Long.valueOf(user03_account2.get("balance_amount").toString());
Assert.assertEquals(use3_Acc2.toString(),String.valueOf(use3_Acc1+10),"用户3入账校验失败"); // Assert.assertEquals(use3_Acc2.toString(),String.valueOf(use3_Acc1+10),"用户3入账校验失败");
Map<String,Object> user04_account2 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0063 where consumer_id = '100066367' and account_type = '6'\n"); // Map<String,Object> user04_account2 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0063 where consumer_id = '100066367' and account_type = '6'\n");
Long use4_Acc2 = Long.valueOf(user04_account2.get("balance_amount").toString()); // Long use4_Acc2 = Long.valueOf(user04_account2.get("balance_amount").toString());
Assert.assertEquals(use4_Acc2.toString(),String.valueOf(use4_Acc1+10),"用户4入账校验失败"); // Assert.assertEquals(use4_Acc2.toString(),String.valueOf(use4_Acc1+10),"用户4入账校验失败");
}catch (Exception e){
e.printStackTrace();
}
} }
......
...@@ -50,10 +50,10 @@ public class pk_开奖_瓜分红包_押注人数相同测试_AccessTest extends ...@@ -50,10 +50,10 @@ public class pk_开奖_瓜分红包_押注人数相同测试_AccessTest extends
private String groupId = "7"; private String groupId = "7";
private Integer user01 = 4782; private Integer user01 = 4784;
private String consumerId01 = "100107000";//activity_order_con.tb_trade_center_activity_order_0760 private String consumerId01 = "100108068";//activity_order_con.tb_trade_center_activity_order_0804
private Integer user02 = 4783; private Integer user02 = 4785;
private String consumerId02 = "100107001";//activity_order_con.tb_trade_center_activity_order_0761 private String consumerId02 = "100108069";//activity_order_con.tb_trade_center_activity_order_0805
private String newBetId = ""; private String newBetId = "";
...@@ -84,9 +84,9 @@ public class pk_开奖_瓜分红包_押注人数相同测试_AccessTest extends ...@@ -84,9 +84,9 @@ public class pk_开奖_瓜分红包_押注人数相同测试_AccessTest extends
} }
logger.info("pk活动id为:"+newBetId+",选项id为:"+ optionsIds.toString()); logger.info("pk活动id为:"+newBetId+",选项id为:"+ optionsIds.toString());
Map<String,Object> user01_account1 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0760 where consumer_id = '100107000' and account_type = '6'\n"); Map<String,Object> user01_account1 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0804 where consumer_id = '100108068' and account_type = '6'\n");
Long use1_Acc1 = Long.valueOf(user01_account1.get("balance_amount").toString()); Long use1_Acc1 = Long.valueOf(user01_account1.get("balance_amount").toString());
Map<String,Object> user02_account1 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0761 where consumer_id = '100107001' and account_type = '6'\n"); Map<String,Object> user02_account1 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0805 where consumer_id = '100108069' and account_type = '6'\n");
Long use2_Acc1 = Long.valueOf(user02_account1.get("balance_amount").toString()); Long use2_Acc1 = Long.valueOf(user02_account1.get("balance_amount").toString());
...@@ -121,9 +121,9 @@ public class pk_开奖_瓜分红包_押注人数相同测试_AccessTest extends ...@@ -121,9 +121,9 @@ public class pk_开奖_瓜分红包_押注人数相同测试_AccessTest extends
} }
} }
Map<String,Object> user01_order = jdbc.findSimpleResult("select * from activity_order_con.tb_trade_center_activity_order_0760 where consumer_id = '100107000' and duiba_activity_id = ?\n",newBetId); Map<String,Object> user01_order = jdbc.findSimpleResult("select * from activity_order_con.tb_trade_center_activity_order_0804 where consumer_id = '100108068' and duiba_activity_id = ?\n",newBetId);
Assert.assertEquals(user01_order.get("add_credits").toString(),"10","开奖后发奖值校验失败"); Assert.assertEquals(user01_order.get("add_credits").toString(),"10","开奖后发奖值校验失败");
Map<String,Object> user02_order = jdbc.findSimpleResult("select * from activity_order_con.tb_trade_center_activity_order_0761 where consumer_id = '100107001' and duiba_activity_id = ?\n",newBetId); Map<String,Object> user02_order = jdbc.findSimpleResult("select * from activity_order_con.tb_trade_center_activity_order_0805 where consumer_id = '100108069' and duiba_activity_id = ?\n",newBetId);
Assert.assertEquals(user02_order.get("add_credits").toString(),"","开奖后发奖值校验失败"); Assert.assertEquals(user02_order.get("add_credits").toString(),"","开奖后发奖值校验失败");
logger.info("用户01获取的红包值为:"+user01_order.get("add_credits").toString()+",用户02获取的红包值为:"+user02_order.get("add_credits").toString()); logger.info("用户01获取的红包值为:"+user01_order.get("add_credits").toString()+",用户02获取的红包值为:"+user02_order.get("add_credits").toString());
...@@ -136,10 +136,10 @@ public class pk_开奖_瓜分红包_押注人数相同测试_AccessTest extends ...@@ -136,10 +136,10 @@ public class pk_开奖_瓜分红包_押注人数相同测试_AccessTest extends
Assert.assertTrue(bet1Times>bet2Times,"活动获胜人数比失败人数多校验失败"); Assert.assertTrue(bet1Times>bet2Times,"活动获胜人数比失败人数多校验失败");
logger.info("选项1的押注人数为:"+bet1Result.get("bet_times").toString()+",选项2的押注人数为:"+bet2Result.get("bet_times").toString()); logger.info("选项1的押注人数为:"+bet1Result.get("bet_times").toString()+",选项2的押注人数为:"+bet2Result.get("bet_times").toString());
Map<String,Object> user01_account2 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0760 where consumer_id = '100107000' and account_type = '6'\n"); Map<String,Object> user01_account2 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0804 where consumer_id = '100108068' and account_type = '6'\n");
Long use1_Acc2 = Long.valueOf(user01_account2.get("balance_amount").toString()); Long use1_Acc2 = Long.valueOf(user01_account2.get("balance_amount").toString());
Assert.assertEquals(use1_Acc2.toString(),String.valueOf(use1_Acc1+10),"用户2入账校验失败"); Assert.assertEquals(use1_Acc2.toString(),String.valueOf(use1_Acc1+10),"用户2入账校验失败");
Map<String,Object> user02_account2 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0761 where consumer_id = '100107001' and account_type = '6'\n"); Map<String,Object> user02_account2 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0805 where consumer_id = '100108069' and account_type = '6'\n");
Long use2_Acc2 = Long.valueOf(user02_account2.get("balance_amount").toString()); Long use2_Acc2 = Long.valueOf(user02_account2.get("balance_amount").toString());
Assert.assertEquals(use2_Acc2,use2_Acc1,"用户2入账校验失败"); Assert.assertEquals(use2_Acc2,use2_Acc1,"用户2入账校验失败");
......
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