Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
test-platform
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
马博
test-platform
Commits
5218cb3d
Commit
5218cb3d
authored
Nov 12, 2018
by
钱雯君
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
cb1c41af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
5 deletions
+52
-5
PkActivityService.java
src/test/java/http/service/Manager/PkActivityService.java
+47
-0
TypeChangeUtil.java
src/test/java/utils/TypeChangeUtil.java
+5
-5
No files found.
src/test/java/http/service/Manager/PkActivityService.java
View file @
5218cb3d
...
...
@@ -161,6 +161,53 @@ public class PkActivityService {
}
public
Response
betActGroup
(
String
betName
)
throws
Exception
{
String
url
=
"http://"
+
ManagerHost
+
"/newmanager/betActGroup"
;
Map
<
String
,
Object
>
para
=
new
HashMap
<>();
para
.
put
(
"title"
,
betName
);
JSONObject
jsonParam
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
para
));
Response
betGroupResponse
=
given
().
contentType
(
"application/json;charset=UTF-8"
).
cookies
(
authorization
.
ssoLogin
()).
body
(
jsonParam
).
post
(
url
);
betGroupResponse
.
prettyPrint
();
try
{
Assert
.
assertEquals
(
betGroupResponse
.
jsonPath
().
getString
(
"success"
),
"true"
);
}
catch
(
Exception
e
){
throw
new
Exception
(
"创建pk活动组接口失败,返回信息:"
+
betGroupResponse
.
asString
());
}
catch
(
Error
er
){
throw
new
Exception
(
"创建pk活动组接口失败,返回信息:"
+
betGroupResponse
.
asString
());
}
return
betGroupResponse
;
}
public
Response
appGroupRelation
(
String
adPositions
,
String
adSwitch
,
String
appIds
,
String
groupId
)
throws
Exception
{
String
url
=
"http://"
+
ManagerHost
+
"/newmanager/appGroupRelation"
;
Map
<
String
,
Object
>
para
=
new
HashMap
<>();
para
.
put
(
"adPositions"
,
adPositions
);
para
.
put
(
"adSwitch"
,
adSwitch
);
para
.
put
(
"appIds"
,
appIds
);
para
.
put
(
"groupId"
,
groupId
);
JSONObject
jsonParam
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
para
));
Response
betGroupRelationResponse
=
given
().
contentType
(
"application/json;charset=UTF-8"
).
cookies
(
authorization
.
ssoLogin
()).
body
(
jsonParam
).
post
(
url
);
betGroupRelationResponse
.
prettyPrint
();
try
{
Assert
.
assertEquals
(
betGroupRelationResponse
.
jsonPath
().
getString
(
"success"
),
"true"
);
}
catch
(
Exception
e
){
throw
new
Exception
(
"创建pk活动组关系接口失败,返回信息:"
+
betGroupRelationResponse
.
asString
());
}
catch
(
Error
er
){
throw
new
Exception
(
"创建pk活动组关系接口失败,返回信息:"
+
betGroupRelationResponse
.
asString
());
}
return
betGroupRelationResponse
;
}
// public static void main(String[] args) throws Exception{
// String endTime = "2021-12-31 23:55:00";
// PkActivityService pkActivityService = new PkActivityService();
...
...
src/test/java/utils/TypeChangeUtil.java
View file @
5218cb3d
...
...
@@ -54,15 +54,15 @@ public class TypeChangeUtil {
public
static
void
main
(
String
[]
args
)
{
CreditTool
tool
=
new
CreditTool
(
"jlg88lyxz7siqtmr"
,
"1x0eap95f4xfi77uaptrnwh9ewzvlm"
);
String
url
=
"http://activity.m.duiba
test
.com.cn/autoLogin/autologin?"
;
String
url
=
"http://activity.m.duiba.com.cn/autoLogin/autologin?"
;
Map
<
String
,
String
>
params
=
new
HashMap
<>();
params
.
put
(
"uid"
,
"
8
"
);
//中文
params
.
put
(
"times"
,
"
1
"
);
params
.
put
(
"uid"
,
"
1
"
);
//中文
params
.
put
(
"times"
,
"
6
"
);
params
.
put
(
"validType"
,
"0"
);
params
.
put
(
"bizid"
,
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
));
//params.put("credits","0");
params
.
put
(
"redirect"
,
"http://activity.m.duiba
test.com.cn/hdtool/index?id=20719
"
);
params
.
put
(
"actid"
,
"
20719
"
);
params
.
put
(
"redirect"
,
"http://activity.m.duiba
.com.cn/hdtool/index?id=3212716
"
);
params
.
put
(
"actid"
,
"
3212716
"
);
params
.
put
(
"addType"
,
"0"
);
params
.
put
(
"timestamp"
,
System
.
currentTimeMillis
()+
""
);
String
autologinUrl
=
tool
.
buildUrlWithSign
(
url
,
params
);
...
...
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