Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xm-sportstest
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiamai-test
xm-sportstest
Commits
5e953052
Commit
5e953052
authored
Jan 03, 2025
by
yangfangfang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物品
parent
85c30bb6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
13 deletions
+13
-13
src/main/java/com/xiaomai/cases/lunar/goods/GoodCTools.java
+2
-2
src/main/java/com/xiaomai/cases/lunar/goods/TestListXcxGoodsGroup.java
+1
-1
src/main/java/com/xiaomai/cases/lunar/goods/TestPurchaseGoods.java
+3
-3
src/main/java/com/xiaomai/cases/polar/goods/TestGoodsOrder.java
+4
-4
src/main/java/com/xiaomai/cases/polar/goods/TestGoodsOrderByDeposit.java
+1
-1
src/main/java/com/xiaomai/cases/polar/goods/TestRefundGoods.java
+2
-2
No files found.
src/main/java/com/xiaomai/cases/lunar/goods/GoodCTools.java
View file @
5e953052
...
...
@@ -89,7 +89,7 @@ public class GoodCTools extends XMBaseTest {
* @author: yff
**/
public
JSONObject
checkAllowPurchase
(
String
goodsSpecId
,
String
memberId
,
String
price
,
int
quantity
,
DataUserInfo
...
userInfos
){
public
JSONObject
checkAllowPurchase
(
String
goodsSpecId
,
String
memberId
,
BigDecimal
price
,
int
quantity
,
DataUserInfo
...
userInfos
){
dataApi
.
setApiModule
(
ApiModule
.
Lunar_Goods
)
.
setApiName
(
"API_checkAllowPurchase"
)
.
setTerminal
(
Terminal
.
minApp
);
...
...
@@ -116,7 +116,7 @@ public class GoodCTools extends XMBaseTest {
* @author: yff
**/
public
JSONObject
purchaseGoods
(
String
depositAmount
,
String
depositCardId
,
String
memberId
,
String
memo
,
String
receivableAmount
,
String
id
,
String
price
,
int
quantity
,
DataUserInfo
...
userInfos
){
public
JSONObject
purchaseGoods
(
String
depositAmount
,
String
depositCardId
,
String
memberId
,
String
memo
,
String
receivableAmount
,
String
id
,
BigDecimal
price
,
int
quantity
,
DataUserInfo
...
userInfos
){
dataApi
.
setApiModule
(
ApiModule
.
Lunar_Goods
)
.
setApiName
(
"API_purchaseGoods"
)
.
setTerminal
(
Terminal
.
minApp
);
...
...
src/main/java/com/xiaomai/cases/lunar/goods/TestListXcxGoodsGroup.java
View file @
5e953052
...
...
@@ -87,7 +87,7 @@ public class TestListXcxGoodsGroup extends BaseTestImpl {
JSONArray
result1
=
listXcxGoodsGroup1
.
getJSONArray
(
"result"
);
boolean
success1
=
false
;
for
(
int
i
=
0
;
i
<
result1
.
size
();
i
++){
for
(
int
i
=
0
;
i
<
result1
.
size
();
i
++){
if
(
result1
.
getJSONObject
(
1
).
getString
(
"id"
).
equals
(
id
)){
success1
=
true
;
}
...
...
src/main/java/com/xiaomai/cases/lunar/goods/TestPurchaseGoods.java
View file @
5e953052
...
...
@@ -83,7 +83,7 @@ public class TestPurchaseGoods extends BaseTestImpl {
//获取C端商品详情
JSONObject
getDetail_goods_C
=
goodCTools
.
getDetail_goods_C
(
goodsId1
);
String
id
=
getDetail_goods_C
.
getJSONObject
(
"result"
).
getJSONObject
(
"multiSpecInfo"
).
getJSONArray
(
"specCombinationList"
).
getJSONObject
(
0
).
getString
(
"id"
);
String
price
=
getDetail_goods_C
.
getJSONObject
(
"result"
).
getJSONObject
(
"multiSpecInfo"
).
getJSONArray
(
"specCombinationList"
).
getJSONObject
(
0
).
getString
(
"price"
);
BigDecimal
price
=
new
BigDecimal
(
getDetail_goods_C
.
getJSONObject
(
"result"
).
getJSONObject
(
"multiSpecInfo"
).
getJSONArray
(
"specCombinationList"
).
getJSONObject
(
0
).
getString
(
"price"
)
);
int
beforeInventory
=
Integer
.
parseInt
(
getDetail_goods_C
.
getJSONObject
(
"result"
).
getJSONObject
(
"multiSpecInfo"
).
getJSONArray
(
"specCombinationList"
).
getJSONObject
(
0
).
getString
(
"inventory"
));
try
{
...
...
@@ -210,7 +210,7 @@ public class TestPurchaseGoods extends BaseTestImpl {
JSONObject
beforeGetCostData_type
=
financeDataTools
.
getCostData_type
(
"DAY"
,
"GOODS"
,
TimeUtils
.
getTodayTime
(),
TimeUtils
.
getTodayEndTime
(),
info
);
BigDecimal
beforeConfirmedAmount
=
new
BigDecimal
(
beforeGetCostData_type
.
getJSONObject
(
"result"
).
getString
(
"confirmedAmount"
));
//确认收入
boolean
checkAllowPurchase
=
Boolean
.
parseBoolean
(
goodCTools
.
checkAllowPurchase
(
id
,
memberId
,
"0.00"
,
beforeInventory
).
getJSONObject
(
"result"
).
getString
(
"success"
));
boolean
checkAllowPurchase
=
Boolean
.
parseBoolean
(
goodCTools
.
checkAllowPurchase
(
id
,
memberId
,
price
,
beforeInventory
).
getJSONObject
(
"result"
).
getString
(
"success"
));
//校验一下物品购买是否可以通过,为true才可以
if
(
checkAllowPurchase
==
true
){
...
...
@@ -308,7 +308,7 @@ public class TestPurchaseGoods extends BaseTestImpl {
JSONObject
beforeGetCostData_type
=
financeDataTools
.
getCostData_type
(
"DAY"
,
"GOODS"
,
TimeUtils
.
getTodayTime
(),
TimeUtils
.
getTodayEndTime
(),
info
);
BigDecimal
beforeConfirmedAmount
=
new
BigDecimal
(
beforeGetCostData_type
.
getJSONObject
(
"result"
).
getString
(
"confirmedAmount"
));
//确认收入
boolean
checkAllowPurchase
=
Boolean
.
parseBoolean
(
goodCTools
.
checkAllowPurchase
(
id
,
memberId
,
"0.00"
,
beforeInventory
).
getJSONObject
(
"result"
).
getString
(
"success"
));
boolean
checkAllowPurchase
=
Boolean
.
parseBoolean
(
goodCTools
.
checkAllowPurchase
(
id
,
memberId
,
price
,
beforeInventory
).
getJSONObject
(
"result"
).
getString
(
"success"
));
//校验一下物品购买是否可以通过,为true才可以
if
(
checkAllowPurchase
==
true
){
...
...
src/main/java/com/xiaomai/cases/polar/goods/TestGoodsOrder.java
View file @
5e953052
...
...
@@ -82,7 +82,7 @@ public class TestGoodsOrder extends XMBaseTest {
//获取B端商品详情
JSONObject
getDetail_goods
=
goodTools
.
getDetail_goods
(
goodsId1
);
String
id
=
getDetail_goods
.
getJSONObject
(
"result"
).
getString
(
"id"
);
String
price
=
getDetail_goods
.
getJSONObject
(
"result"
).
getJSONObject
(
"singleSpecInfo"
).
getString
(
"price"
);
BigDecimal
price
=
new
BigDecimal
(
getDetail_goods
.
getJSONObject
(
"result"
).
getJSONObject
(
"singleSpecInfo"
).
getString
(
"price"
)
);
int
beforeInventory
=
Integer
.
parseInt
(
getDetail_goods
.
getJSONObject
(
"result"
).
getJSONObject
(
"singleSpecInfo"
).
getString
(
"inventory"
));
try
{
...
...
@@ -100,7 +100,7 @@ public class TestGoodsOrder extends XMBaseTest {
//校验一下物品购买是否可以通过,为true才可以
if
(
checkAllowPurchase
==
true
)
{
JSONObject
purchaseGoods
=
goodCTools
.
purchaseGoods
(
"0.00"
,
null
,
memberId
,
""
,
price
,
id
,
price
,
1
,
info
);
JSONObject
purchaseGoods
=
goodCTools
.
purchaseGoods
(
"0.00"
,
null
,
memberId
,
""
,
price
.
toString
()
,
id
,
price
,
1
,
info
);
String
orderId1
=
purchaseGoods
.
getJSONObject
(
"result"
).
getString
(
"id"
);
//生成待支付订单后,去B端继续收款
...
...
@@ -189,7 +189,7 @@ public class TestGoodsOrder extends XMBaseTest {
//获取B端商品详情
JSONObject
getDetail_goods
=
goodTools
.
getDetail_goods
(
goodsId1
);
String
id
=
getDetail_goods
.
getJSONObject
(
"result"
).
getString
(
"id"
);
String
price
=
getDetail_goods
.
getJSONObject
(
"result"
).
getJSONObject
(
"singleSpecInfo"
).
getString
(
"price"
);
BigDecimal
price
=
new
BigDecimal
(
getDetail_goods
.
getJSONObject
(
"result"
).
getJSONObject
(
"singleSpecInfo"
).
getString
(
"price"
)
);
int
beforeInventory
=
Integer
.
parseInt
(
getDetail_goods
.
getJSONObject
(
"result"
).
getJSONObject
(
"singleSpecInfo"
).
getString
(
"inventory"
));
try
{
...
...
@@ -207,7 +207,7 @@ public class TestGoodsOrder extends XMBaseTest {
//校验一下物品购买是否可以通过,为true才可以
if
(
checkAllowPurchase
==
true
)
{
JSONObject
purchaseGoods
=
goodCTools
.
purchaseGoods
(
"0.00"
,
null
,
memberId
,
""
,
price
,
id
,
price
,
1
,
info
);
JSONObject
purchaseGoods
=
goodCTools
.
purchaseGoods
(
"0.00"
,
null
,
memberId
,
""
,
price
.
toString
()
,
id
,
price
,
1
,
info
);
String
orderId2
=
purchaseGoods
.
getJSONObject
(
"result"
).
getString
(
"id"
);
//生成待支付订单后,去B端继续收款
...
...
src/main/java/com/xiaomai/cases/polar/goods/TestGoodsOrderByDeposit.java
View file @
5e953052
...
...
@@ -103,7 +103,7 @@ public class TestGoodsOrderByDeposit extends XMBaseTest {
//获取B端商品详情
JSONObject
getDetail_goods
=
goodTools
.
getDetail_goods
(
goodsId1
);
String
id
=
getDetail_goods
.
getJSONObject
(
"result"
).
getJSONObject
(
"multiSpecInfo"
).
getJSONArray
(
"specCombinationList"
).
getJSONObject
(
0
).
getString
(
"id"
);
String
price
=
getDetail_goods
.
getJSONObject
(
"result"
).
getJSONObject
(
"multiSpecInfo"
).
getJSONArray
(
"specCombinationList"
).
getJSONObject
(
0
).
getString
(
"price"
);
BigDecimal
price
=
new
BigDecimal
(
getDetail_goods
.
getJSONObject
(
"result"
).
getJSONObject
(
"multiSpecInfo"
).
getJSONArray
(
"specCombinationList"
).
getJSONObject
(
0
).
getString
(
"price"
)
);
int
beforeInventory
=
Integer
.
parseInt
(
getDetail_goods
.
getJSONObject
(
"result"
).
getJSONObject
(
"multiSpecInfo"
).
getJSONArray
(
"specCombinationList"
).
getJSONObject
(
0
).
getString
(
"inventory"
));
try
{
...
...
src/main/java/com/xiaomai/cases/polar/goods/TestRefundGoods.java
View file @
5e953052
...
...
@@ -84,7 +84,7 @@ public class TestRefundGoods extends XMBaseTest {
//获取B端商品详情
JSONObject
getDetail_goods
=
goodTools
.
getDetail_goods
(
goodsId1
);
String
id
=
getDetail_goods
.
getJSONObject
(
"result"
).
getJSONObject
(
"multiSpecInfo"
).
getJSONArray
(
"specCombinationList"
).
getJSONObject
(
0
).
getString
(
"id"
);
String
price
=
getDetail_goods
.
getJSONObject
(
"result"
).
getJSONObject
(
"multiSpecInfo"
).
getJSONArray
(
"specCombinationList"
).
getJSONObject
(
0
).
getString
(
"price"
);
BigDecimal
price
=
new
BigDecimal
(
getDetail_goods
.
getJSONObject
(
"result"
).
getJSONObject
(
"multiSpecInfo"
).
getJSONArray
(
"specCombinationList"
).
getJSONObject
(
0
).
getString
(
"price"
)
);
int
beforeInventory
=
Integer
.
parseInt
(
getDetail_goods
.
getJSONObject
(
"result"
).
getJSONObject
(
"multiSpecInfo"
).
getJSONArray
(
"specCombinationList"
).
getJSONObject
(
0
).
getString
(
"inventory"
));
try
{
...
...
@@ -102,7 +102,7 @@ public class TestRefundGoods extends XMBaseTest {
//校验一下物品购买是否可以通过,为true才可以
if
(
checkAllowPurchase
==
true
)
{
JSONObject
purchaseGoods
=
goodCTools
.
purchaseGoods
(
"0.00"
,
null
,
memberId
,
""
,
price
,
id
,
price
,
1
,
info
);
JSONObject
purchaseGoods
=
goodCTools
.
purchaseGoods
(
"0.00"
,
null
,
memberId
,
""
,
price
.
toString
()
,
id
,
price
,
1
,
info
);
String
signOrderId1
=
purchaseGoods
.
getJSONObject
(
"result"
).
getString
(
"id"
);
//生成待支付订单后,去B端继续收款
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment