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
f78bfde5
Commit
f78bfde5
authored
Aug 19, 2024
by
xyy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
28c3e28a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
src/main/java/com/xiaomai/cases/polar/memberCard/TestDiscardManualDeduct.java
+5
-3
No files found.
src/main/java/com/xiaomai/cases/polar/memberCard/TestDiscardManualDeduct.java
View file @
f78bfde5
...
@@ -29,7 +29,7 @@ public class TestDiscardManualDeduct extends XMBaseTest {
...
@@ -29,7 +29,7 @@ public class TestDiscardManualDeduct extends XMBaseTest {
.
setLoginUser
(
LoginAccount
.
GYM_PROD
)
.
setLoginUser
(
LoginAccount
.
GYM_PROD
)
.
setTerminal
(
Terminal
.
B
);
.
setTerminal
(
Terminal
.
B
);
dal
.
setCase_owner
(
"
yj
"
)
dal
.
setCase_owner
(
"
xyy
"
)
.
setCase_name
(
Thread
.
currentThread
().
getStackTrace
()[
1
].
getFileName
().
split
(
"\\."
)[
0
]);
.
setCase_name
(
Thread
.
currentThread
().
getStackTrace
()[
1
].
getFileName
().
split
(
"\\."
)[
0
]);
super
.
beforeTest
();
super
.
beforeTest
();
}
}
...
@@ -48,10 +48,12 @@ public class TestDiscardManualDeduct extends XMBaseTest {
...
@@ -48,10 +48,12 @@ public class TestDiscardManualDeduct extends XMBaseTest {
//先检查列表有没有数据,有数据才会执行下面的点代码(如果是个空机构,肯定不会被执行,想从存量数据中获取,需要自己先造个数据)
//先检查列表有没有数据,有数据才会执行下面的点代码(如果是个空机构,肯定不会被执行,想从存量数据中获取,需要自己先造个数据)
int
listDatas
=
XMJSONPath
.
getJSONArrayByReadPath
(
dataApi
.
getApi_response
(),
"$.result.records"
).
size
();
int
listDatas
=
XMJSONPath
.
getJSONArrayByReadPath
(
dataApi
.
getApi_response
(),
"$.result.records"
).
size
();
if
(
listDatas
>
0
)
{
if
(
listDatas
>
0
)
{
memberCardId
=
XMJSONPath
.
readPath
(
dataApi
.
getApi_response
(),
"$.result.records[0].id"
);
//拿售卖记录第一张【生效中】会员卡的ID;
if
(
cardType
==
"DEPOSIT"
){
if
(
cardType
==
"DEPOSIT"
){
benefitId
=
XMJSONPath
.
readPath
(
dataApi
.
getApi_response
(),
"$.result.records[0].depositBenefit.id"
);
//储值卡权益id;
//取最后一张导入有实充金额的卡,不然会取到0元卡,检验扣款金额时购买金额的次数不准确
memberCardId
=
XMJSONPath
.
readPath
(
dataApi
.
getApi_response
(),
"$.result.records[-1].id"
);
//拿售卖记录最后一张【生效中】会员卡的ID;
benefitId
=
XMJSONPath
.
readPath
(
dataApi
.
getApi_response
(),
"$.result.records[-1].depositBenefit.id"
);
//储值卡权益id;
}
else
{
}
else
{
memberCardId
=
XMJSONPath
.
readPath
(
dataApi
.
getApi_response
(),
"$.result.records[0].id"
);
//拿售卖记录第一张【生效中】会员卡的ID;
benefitId
=
XMJSONPath
.
readPath
(
dataApi
.
getApi_response
(),
"$.result.records[0].courseBenefit.id"
);
//会员卡/体验卡权益id;
benefitId
=
XMJSONPath
.
readPath
(
dataApi
.
getApi_response
(),
"$.result.records[0].courseBenefit.id"
);
//会员卡/体验卡权益id;
}
}
//先查询消耗记录的条数
//先查询消耗记录的条数
...
...
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