Commit 7d3f5ba5 authored by 马博's avatar 马博

Merge branch 'mabo' of gitlab2.dui88.com:mabo/test-platform into mabo

parents dc7eba44 10d35dcb
...@@ -108,11 +108,12 @@ public class 账户余额清零_AccessTest extends DuibaTestBase { ...@@ -108,11 +108,12 @@ public class 账户余额清零_AccessTest extends DuibaTestBase {
//获取最新的提现记录 //获取最新的提现记录
Thread.sleep(3000);
Map cookies = authorization.dafuwengLogin(uid); Map cookies = authorization.dafuwengLogin(uid);
Response response = walletAccountService.walletDetail(cookies); Response response = walletAccountService.walletDetail(cookies);
String money = response.jsonPath().getString("data[1].money"); String money = response.jsonPath().getString("data[0].money");
String subType = response.jsonPath().getString("data[1].subType"); String subType = response.jsonPath().getString("data[0].subType");
String description = response.jsonPath().getString("data[1].description"); String description = response.jsonPath().getString("data[0].description");
Assert.assertTrue(new BigDecimal(money).compareTo(new BigDecimal("100"))==0,"扣款金额校验失败"); Assert.assertTrue(new BigDecimal(money).compareTo(new BigDecimal("100"))==0,"扣款金额校验失败");
Assert.assertEquals(subType, "0", "日志类型校验失败"); Assert.assertEquals(subType, "0", "日志类型校验失败");
......
...@@ -42,8 +42,8 @@ public class 账户异常提现_AccessTest extends DuibaTestBase{ ...@@ -42,8 +42,8 @@ public class 账户异常提现_AccessTest extends DuibaTestBase{
//指定用户 //指定用户
private static int uid = 4459; private static int uid = 4459;
private static String consumerId = "100098000"; private static String consumerId = "100098000";
private static int uid2 = 4460; private static int uid2 = 4822;
private static String consumerId2 = "100098001"; private static String consumerId2 = "100108125";
private static int uid3 = 4793; private static int uid3 = 4793;
private static String consumerId3 = "100108076"; private static String consumerId3 = "100108076";
private static int uid4 = 4474; private static int uid4 = 4474;
...@@ -103,9 +103,11 @@ public class 账户异常提现_AccessTest extends DuibaTestBase{ ...@@ -103,9 +103,11 @@ public class 账户异常提现_AccessTest extends DuibaTestBase{
@Test @Test
public void 提现账号已使用() throws Exception { public void 提现账号已使用() throws Exception {
//修改账户过期时间,确保账户余额不会过期清零
jdbc.update("update consumer_account_log.tb_expire_consumer_account set gmt_modified ='"+getTime(1)+"' where account_id = '"+consumerId2+"_6_0'");
//获取原账户余额 //获取原账户余额
Map<String, Object> selectResult = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0977 where account_id = '"+consumerId2+"_6_0' "); Map<String, Object> selectResult = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0861 where account_id = '"+consumerId2+"_6_0' ");
int balance = Integer.parseInt(String.valueOf(selectResult.get("balance_amount"))); int balance = Integer.parseInt(String.valueOf(selectResult.get("balance_amount")));
logger.info("账户原有余额为"+balance); logger.info("账户原有余额为"+balance);
...@@ -119,7 +121,7 @@ public class 账户异常提现_AccessTest extends DuibaTestBase{ ...@@ -119,7 +121,7 @@ public class 账户异常提现_AccessTest extends DuibaTestBase{
Assert.assertEquals(response.jsonPath().getString("message"),"一个支付宝账户仅允许一个账户提现","/walletAccount/doTakePrize接口失败"); Assert.assertEquals(response.jsonPath().getString("message"),"一个支付宝账户仅允许一个账户提现","/walletAccount/doTakePrize接口失败");
//获取新账户余额 //获取新账户余额
selectResult = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0977 where account_id = '"+consumerId2+"_6_0' "); selectResult = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0861 where account_id = '"+consumerId2+"_6_0' ");
int balanceNew = Integer.parseInt(String.valueOf(selectResult.get("balance_amount"))); int balanceNew = Integer.parseInt(String.valueOf(selectResult.get("balance_amount")));
logger.info("账户新余额为"+balanceNew); logger.info("账户新余额为"+balanceNew);
......
...@@ -38,8 +38,8 @@ public class 账户正常提现_AccessTest extends DuibaTestBase{ ...@@ -38,8 +38,8 @@ public class 账户正常提现_AccessTest extends DuibaTestBase{
HbaseService hbaseService; HbaseService hbaseService;
private DuibaLog logger = DuibaLog.getLogger(); private DuibaLog logger = DuibaLog.getLogger();
//指定用户 //指定用户
private static int uid = 4244; private static int uid = 4823;
private static String consumerId = "100092758"; private static String consumerId = "100108126";
private static String orderId; private static String orderId;
@AfterClass @AfterClass
public void afterclass() { public void afterclass() {
...@@ -77,7 +77,7 @@ public class 账户正常提现_AccessTest extends DuibaTestBase{ ...@@ -77,7 +77,7 @@ public class 账户正常提现_AccessTest extends DuibaTestBase{
public void a_提现失败_账户错误(int caseNum,String alipay,String realname) throws Exception { public void a_提现失败_账户错误(int caseNum,String alipay,String realname) throws Exception {
//获取原账户余额 //获取原账户余额
Map<String, Object> selectResult = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0854 where account_id = '100092758_6_0' "); Map<String, Object> selectResult = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0862 where account_id = '100108126_6_0' ");
int balance = Integer.parseInt(String.valueOf(selectResult.get("balance_amount"))); int balance = Integer.parseInt(String.valueOf(selectResult.get("balance_amount")));
logger.info("账户原有余额为"+balance); logger.info("账户原有余额为"+balance);
...@@ -101,7 +101,7 @@ public class 账户正常提现_AccessTest extends DuibaTestBase{ ...@@ -101,7 +101,7 @@ public class 账户正常提现_AccessTest extends DuibaTestBase{
} }
//获取新账户余额 //获取新账户余额
selectResult = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0854 where account_id = '100092758_6_0' "); selectResult = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0862 where account_id = '100108126_6_0' ");
int balanceNew = Integer.parseInt(String.valueOf(selectResult.get("balance_amount"))); int balanceNew = Integer.parseInt(String.valueOf(selectResult.get("balance_amount")));
logger.info("账户新余额为"+balanceNew); logger.info("账户新余额为"+balanceNew);
...@@ -113,7 +113,7 @@ public class 账户正常提现_AccessTest extends DuibaTestBase{ ...@@ -113,7 +113,7 @@ public class 账户正常提现_AccessTest extends DuibaTestBase{
public void b_正常提现() throws Exception { public void b_正常提现() throws Exception {
//获取原账户余额 //获取原账户余额
Map<String, Object> selectResult = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0854 where account_id = '100092758_6_0' "); Map<String, Object> selectResult = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0862 where account_id = '100108126_6_0' ");
int balance = Integer.parseInt(String.valueOf(selectResult.get("balance_amount"))); int balance = Integer.parseInt(String.valueOf(selectResult.get("balance_amount")));
logger.info("账户原有余额为"+balance); logger.info("账户原有余额为"+balance);
balance = balance - 1; balance = balance - 1;
...@@ -123,7 +123,7 @@ public class 账户正常提现_AccessTest extends DuibaTestBase{ ...@@ -123,7 +123,7 @@ public class 账户正常提现_AccessTest extends DuibaTestBase{
this.账户提现(cookies,"peeulk6392@sandbox.com","沙箱环境"); this.账户提现(cookies,"peeulk6392@sandbox.com","沙箱环境");
Thread.sleep(2000); Thread.sleep(2000);
//获取新账户余额 //获取新账户余额
selectResult = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0854 where account_id = '100092758_6_0' "); selectResult = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0862 where account_id = '100108126_6_0' ");
int balanceNew = Integer.parseInt(String.valueOf(selectResult.get("balance_amount"))); int balanceNew = Integer.parseInt(String.valueOf(selectResult.get("balance_amount")));
logger.info("账户新余额为"+balanceNew); logger.info("账户新余额为"+balanceNew);
Assert.assertEquals(balanceNew,balance,"全局红包增加账户余额失败"); Assert.assertEquals(balanceNew,balance,"全局红包增加账户余额失败");
...@@ -169,7 +169,7 @@ public class 账户正常提现_AccessTest extends DuibaTestBase{ ...@@ -169,7 +169,7 @@ public class 账户正常提现_AccessTest extends DuibaTestBase{
public void d_提现失败_登录次数不足() throws Exception { public void d_提现失败_登录次数不足() throws Exception {
//获取原账户余额 //获取原账户余额
Map<String, Object> selectResult = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0854 where account_id = '100092758_6_0' "); Map<String, Object> selectResult = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0862 where account_id = '100108126_6_0' ");
int balance = Integer.parseInt(String.valueOf(selectResult.get("balance_amount"))); int balance = Integer.parseInt(String.valueOf(selectResult.get("balance_amount")));
logger.info("账户原有余额为"+balance); logger.info("账户原有余额为"+balance);
...@@ -183,7 +183,7 @@ public class 账户正常提现_AccessTest extends DuibaTestBase{ ...@@ -183,7 +183,7 @@ public class 账户正常提现_AccessTest extends DuibaTestBase{
Assert.assertEquals(response.jsonPath().getString("message"),"连续登录天数不足","/walletAccount/doTakePrize接口失败"); Assert.assertEquals(response.jsonPath().getString("message"),"连续登录天数不足","/walletAccount/doTakePrize接口失败");
//获取新账户余额 //获取新账户余额
selectResult = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0854 where account_id = '100092758_6_0' "); selectResult = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0862 where account_id = '100108126_6_0' ");
int balanceNew = Integer.parseInt(String.valueOf(selectResult.get("balance_amount"))); int balanceNew = Integer.parseInt(String.valueOf(selectResult.get("balance_amount")));
logger.info("账户新余额为"+balanceNew); logger.info("账户新余额为"+balanceNew);
......
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