Commit 0ef17e21 by DuJunLi
parents 58362b5e 9de7a417
...@@ -113,6 +113,14 @@ public class GoodCTools extends XMBaseTest { ...@@ -113,6 +113,14 @@ public class GoodCTools extends XMBaseTest {
/** /**
* @param * @param
* @description:C端购买物品 * @description:C端购买物品
* @param depositAmount:储值卡抵扣金额(充值+赠送金额)如果没有就填"0.00"
* @param depositCardId:储值卡ID 是下单拉取储值卡列表的那个储值卡ID 如果没有就填null
* @param memberId:会员ID
* @param memo:备注
* @param receivableAmount:剩余需支付金额
* @param id:skuID
* @param price:sku价格
* @param quantity:购买数量
* @author: yff * @author: yff
**/ **/
......
...@@ -49,7 +49,7 @@ public class TestListXcxGoodsGroup extends BaseTestImpl { ...@@ -49,7 +49,7 @@ public class TestListXcxGoodsGroup extends BaseTestImpl {
JSONArray result=listXcxGoodsGroup.getJSONArray("result"); JSONArray result=listXcxGoodsGroup.getJSONArray("result");
boolean success=false; boolean success=false;
for(int i=0;i<result.size();i++){ for(int i=0;i<result.size();i++){
if( ! result.getJSONObject(1).getString("id").equals(id)){ if( ! result.getJSONObject(i).getString("id").equals(id)){
success=true; success=true;
break; break;
} }
...@@ -86,9 +86,6 @@ public class TestListXcxGoodsGroup extends BaseTestImpl { ...@@ -86,9 +86,6 @@ public class TestListXcxGoodsGroup extends BaseTestImpl {
} }
JSONArray result1=listXcxGoodsGroup1.getJSONArray("result"); JSONArray result1=listXcxGoodsGroup1.getJSONArray("result");
JSONObject result0= result1.getJSONObject(0);
System.out.println("result1"+result1);
System.out.println("result11"+result0);
boolean success1=false; boolean success1=false;
for(int i=0;i < result1.size();i++){ for(int i=0;i < result1.size();i++){
...@@ -123,7 +120,7 @@ public class TestListXcxGoodsGroup extends BaseTestImpl { ...@@ -123,7 +120,7 @@ public class TestListXcxGoodsGroup extends BaseTestImpl {
JSONArray result2=listXcxGoodsGroup2.getJSONArray("result"); JSONArray result2=listXcxGoodsGroup2.getJSONArray("result");
boolean success2=false; boolean success2=false;
for(int i=0;i<result2.size();i++){ for(int i=0;i<result2.size();i++){
if( ! result2.getJSONObject(1).getString("id").equals(id)){ if( ! result2.getJSONObject(i).getString("id").equals(id)){
success2=true; success2=true;
break; break;
} }
...@@ -151,7 +148,7 @@ public class TestListXcxGoodsGroup extends BaseTestImpl { ...@@ -151,7 +148,7 @@ public class TestListXcxGoodsGroup extends BaseTestImpl {
JSONArray result3=listXcxGoodsGroup3.getJSONArray("result"); JSONArray result3=listXcxGoodsGroup3.getJSONArray("result");
boolean success3=false; boolean success3=false;
for(int i=0;i<result3.size();i++){ for(int i=0;i<result3.size();i++){
if( ! result3.getJSONObject(1).getString("id").equals(id)){ if( ! result3.getJSONObject(i).getString("id").equals(id)){
success3=true; success3=true;
break; break;
} }
......
...@@ -95,8 +95,8 @@ public class TestGoodsOrder extends XMBaseTest { ...@@ -95,8 +95,8 @@ public class TestGoodsOrder extends XMBaseTest {
JSONObject beforeGetCostData_type=financeDataTools.getCostData_type("DAY","GOODS", TimeUtils.getTodayTime(),TimeUtils.getTodayEndTime()); JSONObject beforeGetCostData_type=financeDataTools.getCostData_type("DAY","GOODS", TimeUtils.getTodayTime(),TimeUtils.getTodayEndTime());
BigDecimal beforeConfirmedAmount=new BigDecimal(beforeGetCostData_type.getJSONObject("result").getString("confirmedAmount"));//确认收入 BigDecimal beforeConfirmedAmount=new BigDecimal(beforeGetCostData_type.getJSONObject("result").getString("confirmedAmount"));//确认收入
//购买物品
JSONObject purchaseGoods = goodCTools.purchaseGoods("0.00", null,memberId,"",price.toString(),id,price,1,info); JSONObject purchaseGoods = goodCTools.purchaseGoods("0.00", null,memberId,"",String.valueOf(price),id,price,1,info);
String orderId1=purchaseGoods.getJSONObject("result").getString("id"); String orderId1=purchaseGoods.getJSONObject("result").getString("id");
//生成待支付订单后,去B端继续收款 //生成待支付订单后,去B端继续收款
...@@ -196,7 +196,7 @@ public class TestGoodsOrder extends XMBaseTest { ...@@ -196,7 +196,7 @@ public class TestGoodsOrder extends XMBaseTest {
BigDecimal beforeConfirmedAmount=new BigDecimal(beforeGetCostData_type.getJSONObject("result").getString("confirmedAmount"));//确认收入 BigDecimal beforeConfirmedAmount=new BigDecimal(beforeGetCostData_type.getJSONObject("result").getString("confirmedAmount"));//确认收入
JSONObject purchaseGoods = goodCTools.purchaseGoods("0.00", null,memberId,"",price.toString(),id,price,1,info); JSONObject purchaseGoods = goodCTools.purchaseGoods("0.00", null,memberId,"",String.valueOf(price),id,price,1,info);
String orderId2=purchaseGoods.getJSONObject("result").getString("id"); String orderId2=purchaseGoods.getJSONObject("result").getString("id");
//生成待支付订单后,去B端继续收款 //生成待支付订单后,去B端继续收款
......
...@@ -118,7 +118,9 @@ public class TestGoodsOrderByDeposit extends XMBaseTest { ...@@ -118,7 +118,9 @@ public class TestGoodsOrderByDeposit extends XMBaseTest {
JSONObject beforeGetCostData_type=financeDataTools.getCostData_type("DAY","GOODS", TimeUtils.getTodayTime(),TimeUtils.getTodayEndTime()); JSONObject beforeGetCostData_type=financeDataTools.getCostData_type("DAY","GOODS", TimeUtils.getTodayTime(),TimeUtils.getTodayEndTime());
BigDecimal beforeConfirmedAmount=new BigDecimal(beforeGetCostData_type.getJSONObject("result").getString("confirmedAmount"));//确认收入 BigDecimal beforeConfirmedAmount=new BigDecimal(beforeGetCostData_type.getJSONObject("result").getString("confirmedAmount"));//确认收入
JSONObject purchaseGoods = goodCTools.purchaseGoods(String.valueOf(cardPrice.add(cardBalance.setScale(2, RoundingMode.HALF_UP))), cardId1, memberId, "", "0.00", id, price, 1, info); //购买物品
JSONObject purchaseGoods = goodCTools.purchaseGoods(String.valueOf(cardPrice.add(cardBalance.setScale(2, RoundingMode.HALF_UP))),
cardId1, memberId, "", String.valueOf(price.subtract(cardPrice.add(cardBalance.setScale(2, RoundingMode.HALF_UP)))), id, price, 1, info);
String signOrderId1 = purchaseGoods.getJSONObject("result").getString("id"); String signOrderId1 = purchaseGoods.getJSONObject("result").getString("id");
//校验1:获取B端订单详情:已完成状态 //校验1:获取B端订单详情:已完成状态
......
...@@ -102,7 +102,7 @@ public class TestRefundGoods extends XMBaseTest { ...@@ -102,7 +102,7 @@ public class TestRefundGoods extends XMBaseTest {
//校验一下物品购买是否可以通过,为true才可以 //校验一下物品购买是否可以通过,为true才可以
if(checkAllowPurchase==true) { if(checkAllowPurchase==true) {
JSONObject purchaseGoods = goodCTools.purchaseGoods("0.00", null, memberId, "", price.toString(), id, price, 1, info); JSONObject purchaseGoods = goodCTools.purchaseGoods("0.00", null, memberId, "", String.valueOf(price), id, price, 1, info);
String signOrderId1 = purchaseGoods.getJSONObject("result").getString("id"); String signOrderId1 = purchaseGoods.getJSONObject("result").getString("id");
//生成待支付订单后,去B端继续收款 //生成待支付订单后,去B端继续收款
......
...@@ -259,7 +259,7 @@ public class GoodTools extends XMBaseTest { ...@@ -259,7 +259,7 @@ public class GoodTools extends XMBaseTest {
* @param * @param
* @description:新建物品_多规格(三个规格,每个规格都是三个规格值) * @description:新建物品_多规格(三个规格,每个规格都是三个规格值)
* @param xcxSaleState:是否开启小程序售卖 YES:开启 NO:关闭; * @param xcxSaleState:是否开启小程序售卖 YES:开启 NO:关闭;
* @param price:每个规格值的售价 * @param price:每个sku的售价
* @param inventory 库存 * @param inventory 库存
* @author: yff * @author: yff
**/ **/
......
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