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
a409faa0
Commit
a409faa0
authored
Sep 24, 2024
by
yangjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券+用于营销字段的参数
parent
8d60e6f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
src/main/java/com/xiaomai/cases/polar/coupon/CouponTools.java
+23
-0
No files found.
src/main/java/com/xiaomai/cases/polar/coupon/CouponTools.java
View file @
a409faa0
...
...
@@ -71,6 +71,8 @@ public class CouponTools extends BaseTestImpl {
body
.
put
(
"receiveCondition"
,
receiveCondition
);
body
.
put
(
"name"
,
couponName
);
body
.
put
(
"allScope"
,
allScope
);
body
.
put
(
"useForActivity"
,
false
);
//不用于营销互动
if
(
allScope
.
equals
(
false
))
{
//适用范围不是选全部时
List
<
String
>
scope
=
new
ArrayList
<>();
scope
.
add
(
"TRAINING_CAMP"
);
...
...
@@ -248,6 +250,26 @@ public class CouponTools extends BaseTestImpl {
}
/**
* 定向给会员发放优惠券
* @param memberId 会员卡id
* @param couponId 优惠券id
*/
public
void
batchSendCoupon
(
String
memberId
,
String
couponId
){
setUP
(
"API_batchSendCoupon"
);
JSONObject
body
=
new
JSONObject
();
List
<
String
>
receiverIds
=
new
ArrayList
<>();
receiverIds
.
add
(
memberId
);
body
.
put
(
"operatorId"
,
dataApi
.
getLoginInfo
().
getAdminId
());
body
.
put
(
"studioId"
,
dataApi
.
getLoginInfo
().
getStudioId
());
body
.
put
(
"brandId"
,
dataApi
.
getLoginInfo
().
getBrandId
());
body
.
put
(
"receiverIds"
,
receiverIds
);
body
.
put
(
"couponId"
,
couponId
);
dataApi
.
doRequest
(
RequestType
.
JSON
,
dataparams
,
body
.
toString
(),
dataheadrs
);
Assert
.
assertTrue
(
Boolean
.
valueOf
(
XMJSONPath
.
readPath
(
dataApi
.
getApi_response
(),
"$.success"
))==
true
,
"调用接口返回结果:"
+
XMJSONPath
.
readPath
(
dataApi
.
getApi_response
(),
"$.message"
));
}
}
\ No newline at end of file
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