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
a7708ad5
Commit
a7708ad5
authored
Jun 18, 2025
by
yangfangfang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决报错
parent
6b3e6cd4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
src/main/java/com/xiaomai/cases/polar/goods/TestGoodsOrderByDeposit.java
+2
-2
src/main/java/com/xiaomai/cases/polar/goods/TestRefundGoods.java
+5
-2
No files found.
src/main/java/com/xiaomai/cases/polar/goods/TestGoodsOrderByDeposit.java
View file @
a7708ad5
...
@@ -140,7 +140,7 @@ public class TestGoodsOrderByDeposit extends XMBaseTest {
...
@@ -140,7 +140,7 @@ public class TestGoodsOrderByDeposit extends XMBaseTest {
Assert
.
assertEquals
(
signInventory
,
beforeInventory
-
1
,
"使用储值卡全额抵扣购买物品成功后,物品库存数应减少1个"
);
Assert
.
assertEquals
(
signInventory
,
beforeInventory
-
1
,
"使用储值卡全额抵扣购买物品成功后,物品库存数应减少1个"
);
try
{
try
{
Thread
.
sleep
(
8
000
);
Thread
.
sleep
(
15
000
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
...
@@ -289,7 +289,7 @@ public class TestGoodsOrderByDeposit extends XMBaseTest {
...
@@ -289,7 +289,7 @@ public class TestGoodsOrderByDeposit extends XMBaseTest {
Assert
.
assertEquals
(
disSignInventory
,
disRefundInventory
+
1
,
"B端作废购买订单后,物品库存数应增加1个"
);
Assert
.
assertEquals
(
disSignInventory
,
disRefundInventory
+
1
,
"B端作废购买订单后,物品库存数应增加1个"
);
try
{
try
{
Thread
.
sleep
(
1
0
000
);
Thread
.
sleep
(
1
5
000
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
...
...
src/main/java/com/xiaomai/cases/polar/goods/TestRefundGoods.java
View file @
a7708ad5
...
@@ -185,8 +185,11 @@ public class TestRefundGoods extends XMBaseTest {
...
@@ -185,8 +185,11 @@ public class TestRefundGoods extends XMBaseTest {
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
System
.
out
.
println
(
TimeUtils
.
getTodayTime
());
System
.
out
.
println
(
TimeUtils
.
getTodayEndTime
());
//校验3:数据中心-财务中心-营收明细-物品的确认收入应减少
//校验3:数据中心-财务中心-营收明细-物品的确认收入应减少
JSONObject
refundAfterGetCostData_type
=
financeDataTools
.
getCostData_type
(
"DAY"
,
"GOODS"
,
TimeUtils
.
getTodayTime
(),
TimeUtils
.
getTodayEndTime
());
JSONObject
refundAfterGetCostData_type
=
financeDataTools
.
getCostData_type
(
"DAY"
,
"GOODS"
,
TimeUtils
.
getTodayTime
(),
TimeUtils
.
getTodayEndTime
());
BigDecimal
refundAfterConfirmedAmount
=
new
BigDecimal
(
refundAfterGetCostData_type
.
getJSONObject
(
"result"
).
getString
(
"confirmedAmount"
));
//确认收入
BigDecimal
refundAfterConfirmedAmount
=
new
BigDecimal
(
refundAfterGetCostData_type
.
getJSONObject
(
"result"
).
getString
(
"confirmedAmount"
));
//确认收入
Assert
.
assertEquals
(
refundAfterConfirmedAmount
,
refundBeforeConfirmedAmount
.
subtract
(
refundAmount
.
setScale
(
2
,
RoundingMode
.
HALF_UP
)),
"退货退款成功后,数据中心-财务中心-营收明细-物品的确认收入应减少对应的金额"
);
Assert
.
assertEquals
(
refundAfterConfirmedAmount
,
refundBeforeConfirmedAmount
.
subtract
(
refundAmount
.
setScale
(
2
,
RoundingMode
.
HALF_UP
)),
"退货退款成功后,数据中心-财务中心-营收明细-物品的确认收入应减少对应的金额"
);
...
@@ -212,7 +215,7 @@ public class TestRefundGoods extends XMBaseTest {
...
@@ -212,7 +215,7 @@ public class TestRefundGoods extends XMBaseTest {
Assert
.
assertEquals
(
discardRefundAfterInventory
,
refundAfterInventory
-
1
,
"作废退货退款订单成功后,库存数应-1"
);
Assert
.
assertEquals
(
discardRefundAfterInventory
,
refundAfterInventory
-
1
,
"作废退货退款订单成功后,库存数应-1"
);
try
{
try
{
Thread
.
sleep
(
1
0
000
);
Thread
.
sleep
(
1
5
000
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
...
...
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