Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xm-autotest-live
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-autotest-live
Commits
843621df
Commit
843621df
authored
Feb 20, 2021
by
fanyuanmeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create:新增接口
parent
6845488c
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
471 additions
and
2 deletions
+471
-2
src/main/java/com/live/cases/seriesCourse/TestCreateSeries.java
+88
-0
src/main/java/com/live/cases/seriesCourse/TestSeriesPage.java
+84
-0
src/main/java/com/live/cases/videoClass/TestAddLessonScheduleStu.java
+64
-0
src/main/java/com/live/cases/videoClass/TestGetLessonScheduleStuPage.java
+58
-0
src/main/java/com/live/cases/videoClass/TestRemoveLessonSchedule.java
+64
-0
src/main/java/com/live/enums/ApiModele.java
+1
-0
src/main/java/com/live/xmutils/GetSeriesCourseData.java
+55
-0
src/main/java/com/live/xmutils/GetVideoClassData.java
+38
-2
src/main/resources/apicase/series-course-b.json
+18
-0
src/main/resources/config.properties
+1
-0
No files found.
src/main/java/com/live/cases/seriesCourse/TestCreateSeries.java
0 → 100644
View file @
843621df
package
com
.
live
.
cases
.
seriesCourse
;
import
com.alibaba.fastjson.JSONObject
;
import
com.live.client.XMAppApi
;
import
com.live.enums.ApiModele
;
import
com.live.enums.RequestType
;
import
com.live.enums.Terminal
;
import
com.live.utils.RandomStringUtil
;
import
com.live.utils.XMBaseTest
;
import
com.live.xmutils.GetSeriesCourseData
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author fym
* @date 2021/2/19 4:20 下午
*/
public
class
TestCreateSeries
extends
XMBaseTest
{
@BeforeMethod
public
void
beforeTest
()
{
xmAppApi
.
setApiModule
(
ApiModele
.
CloudClass_Series
)
// API 所属模块 必传 读取配置文件config.properties配置的api地址
.
setApiName
(
"API_createSeries"
)
// API 名称 必传
.
setLoginUser
(
"fym-b"
)
// http 接口,测试账号 必传
.
setTerminal
(
Terminal
.
B
);
// 所属端位(B端,C端,M端等, 必传)
dal
.
setCase_owner
(
"樊圆梦"
);
super
.
beforeTest
();
}
@Test
public
void
testCreateSeries
(){
String
seriesName
=
RandomStringUtil
.
randomNumber
(
25
,
"seriescourse_"
);
Map
mediaMap
=
new
HashMap
();
mediaMap
.
put
(
"mediaType"
,
"TEXT"
);
mediaMap
.
put
(
"mediaContent"
,
"这是系列课简介"
);
mediaMap
.
put
(
"key"
,
"sCJFBRyjFTzxcXCR"
);
mediaMap
.
put
(
"mediaContentLength"
,
7
);
List
scheduleMedia
=
new
ArrayList
();
scheduleMedia
.
add
(
mediaMap
);
List
enableJoinStuIds
=
new
ArrayList
();
List
joinStudentIds
=
new
ArrayList
();
Map
bodyMap
=
new
HashMap
();
bodyMap
.
put
(
"seriesName"
,
seriesName
);
bodyMap
.
put
(
"instId"
,
xmAppApi
.
getLoginInfo
().
getInstId
());
bodyMap
.
put
(
"teacherId"
,
xmAppApi
.
getLoginInfo
().
getTid
());
bodyMap
.
put
(
"coverId"
,
"1362677307414863873"
);
bodyMap
.
put
(
"joinType"
,
"ALL"
);
bodyMap
.
put
(
"smsCheck"
,
"VALID"
);
bodyMap
.
put
(
"showType"
,
"LOCK"
);
bodyMap
.
put
(
"scheduleMedia"
,
scheduleMedia
);
bodyMap
.
put
(
"joinStudentIds"
,
joinStudentIds
);
bodyMap
.
put
(
"enableJoinStuIds"
,
enableJoinStuIds
);
JSONObject
jsonObject
=
new
JSONObject
(
bodyMap
);
String
bodyData
=
jsonObject
.
toString
();
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
bodyData
,
headers
);
System
.
out
.
println
(
xmAppApi
);
com
.
alibaba
.
fastjson
.
JSONObject
jsonBody
=
xmAppApi
.
getBodyInJSON
();
GetSeriesCourseData
getSeriesCourseData
=
new
GetSeriesCourseData
();
JSONObject
jsonObject1
=
getSeriesCourseData
.
getSeriesPage
();
// System.out.println("jsonObject1"+jsonBody1);
String
id
=
jsonObject1
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
).
getJSONObject
(
0
).
getString
(
"id"
);
Assert
.
assertEquals
(
id
,
jsonBody
.
getString
(
"result"
));
}
}
src/main/java/com/live/cases/seriesCourse/TestSeriesPage.java
0 → 100644
View file @
843621df
package
com
.
live
.
cases
.
seriesCourse
;
import
com.alibaba.fastjson.JSONObject
;
import
com.live.enums.ApiModele
;
import
com.live.enums.RequestType
;
import
com.live.enums.Terminal
;
import
com.live.utils.RandomStringUtil
;
import
com.live.utils.XMBaseTest
;
import
com.live.xmutils.GetSeriesCourseData
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author fym
* @date 2021/2/19 4:20 下午
*/
public
class
TestSeriesPage
extends
XMBaseTest
{
@BeforeMethod
public
void
beforeTest
()
{
xmAppApi
.
setApiModule
(
ApiModele
.
CloudClass_Series
)
// API 所属模块 必传 读取配置文件config.properties配置的api地址
.
setApiName
(
"API_seriesPage"
)
// API 名称 必传
.
setLoginUser
(
"fym-b"
)
// http 接口,测试账号 必传
.
setTerminal
(
Terminal
.
B
);
// 所属端位(B端,C端,M端等, 必传)
dal
.
setCase_owner
(
"樊圆梦"
);
super
.
beforeTest
();
}
@Test
public
void
testSeriesPage
(){
Map
bodyMap
=
new
HashMap
();
bodyMap
.
put
(
"teacherId"
,
""
);
bodyMap
.
put
(
"current"
,
1
);
bodyMap
.
put
(
"instId"
,
xmAppApi
.
getLoginInfo
().
getInstId
());
bodyMap
.
put
(
"size"
,
10
);
bodyMap
.
put
(
"createTimeBegin"
,
""
);
bodyMap
.
put
(
"createTimeEnd"
,
""
);
bodyMap
.
put
(
"seriesName"
,
""
);
System
.
out
.
println
(
"bodyMap = "
+
bodyMap
);
JSONObject
jsonObject
=
new
JSONObject
(
bodyMap
);
String
bodyData
=
jsonObject
.
toString
();
System
.
out
.
println
(
"bodyData = "
+
bodyData
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
bodyData
,
headers
);
System
.
out
.
println
(
xmAppApi
);
JSONObject
seriesPage
=
xmAppApi
.
getBodyInJSON
();
System
.
out
.
println
(
"seriesPage ="
+
seriesPage
);
Assert
.
assertEquals
(
"true"
,
seriesPage
.
getString
(
"success"
));
Assert
.
assertEquals
(
"200"
,
seriesPage
.
getString
(
"code"
));
Assert
.
assertEquals
(
"操作成功!"
,
seriesPage
.
getString
(
"message"
));
// JSONObject jsonObject = new JSONObject();
// jsonObject.put("teacherId","");
// jsonObject.put("current",1);
// jsonObject.put("instId",xmAppApi.getLoginInfo().getInstId());
// jsonObject.put("size",10);
// jsonObject.put("createTimeBegin","");
// jsonObject.put("createTimeEnd","");
// jsonObject.put("seriesName","");
//
//
// xmAppApi.doRequest(RequestType.JSON, params, jsonObject.toJSONString(), headers);
// System.out.println(xmAppApi);
// JSONObject jsonBody = xmAppApi.getBodyInJSON();
// System.out.println("jsonBody ="+jsonBody );
}
}
src/main/java/com/live/cases/videoClass/TestAddLessonScheduleStu.java
0 → 100644
View file @
843621df
package
com
.
live
.
cases
.
videoClass
;
import
com.alibaba.fastjson.JSONObject
;
import
com.live.enums.ApiModele
;
import
com.live.enums.RequestType
;
import
com.live.enums.Terminal
;
import
com.live.utils.XMBaseTest
;
import
com.live.xmutils.GetVideoClassData
;
import
net.minidev.json.JSONUtil
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author fym
* @date 2021/2/19 1:52 下午
*/
public
class
TestAddLessonScheduleStu
extends
XMBaseTest
{
@BeforeMethod
public
void
beforeTest
()
{
xmAppApi
.
setApiModule
(
ApiModele
.
CloudClass_Video
)
// API 所属模块 必传 读取配置文件config.properties配置的api地址
.
setApiName
(
"API_addLessonScheduleStu"
)
// API 名称 必传
.
setLoginUser
(
"fym-b"
)
// http 接口,测试账号 必传
.
setTerminal
(
Terminal
.
B
);
// 所属端位(B端,C端,M端等, 必传)
dal
.
setCase_owner
(
"樊圆梦"
);
super
.
beforeTest
();
}
@Test
public
void
AddLessonScheduleSt
()
throws
InterruptedException
{
GetVideoClassData
getVideoClassData
=
new
GetVideoClassData
();
String
scheduleId
=
getVideoClassData
.
createVideoClass
();
List
studentIds
=
new
ArrayList
();
studentIds
.
add
(
"1308376918943268866"
);
Map
bodyMap
=
new
HashMap
();
bodyMap
.
put
(
"instId"
,
xmAppApi
.
getLoginInfo
().
getInstId
());
bodyMap
.
put
(
"scheduleId"
,
scheduleId
);
bodyMap
.
put
(
"studentIds"
,
studentIds
);
org
.
json
.
JSONObject
jsonObject
=
new
org
.
json
.
JSONObject
(
bodyMap
);
String
bodyData
=
jsonObject
.
toString
();
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
bodyData
,
headers
);
System
.
out
.
println
(
xmAppApi
);
JSONObject
jsonBody0
=
xmAppApi
.
getBodyInJSON
();
System
.
out
.
println
(
jsonBody0
);
Assert
.
assertEquals
(
"1"
,
getVideoClassData
.
VideoClassData
().
getJSONObject
(
"result"
).
getJSONArray
(
"records"
).
getJSONObject
(
0
).
getString
(
"stuNum"
));
}
}
src/main/java/com/live/cases/videoClass/TestGetLessonScheduleStuPage.java
0 → 100644
View file @
843621df
package
com
.
live
.
cases
.
videoClass
;
import
com.alibaba.fastjson.JSONObject
;
import
com.live.enums.ApiModele
;
import
com.live.enums.RequestType
;
import
com.live.enums.Terminal
;
import
com.live.utils.XMBaseTest
;
import
com.live.xmutils.GetVideoClassData
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author fym
* @date 2021/2/19 10:49 上午
*/
public
class
TestGetLessonScheduleStuPage
extends
XMBaseTest
{
@BeforeMethod
public
void
beforeTest
()
{
xmAppApi
.
setApiModule
(
ApiModele
.
CloudClass_Video
)
// API 所属模块 必传 读取配置文件config.properties配置的api地址
.
setApiName
(
"API_getLessonScheduleStuPage"
)
// API 名称 必传
.
setLoginUser
(
"fym-b"
)
// http 接口,测试账号 必传
.
setTerminal
(
Terminal
.
B
);
// 所属端位(B端,C端,M端等, 必传)
dal
.
setCase_owner
(
"樊圆梦"
);
super
.
beforeTest
();
}
@Test
public
void
testGetLessonScheduleStuPage
()
throws
InterruptedException
{
GetVideoClassData
getVideoClassData
=
new
GetVideoClassData
();
String
scheduleId
=
getVideoClassData
.
createVideoClass
();
Map
bodyMap
=
new
HashMap
();
bodyMap
.
put
(
"current"
,
1
);
bodyMap
.
put
(
"size"
,
10
);
bodyMap
.
put
(
"scheduleId"
,
scheduleId
);
org
.
json
.
JSONObject
jsonObject
=
new
org
.
json
.
JSONObject
(
bodyMap
);
String
bodyData
=
jsonObject
.
toString
();
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
bodyData
,
headers
);
System
.
out
.
println
(
xmAppApi
);
com
.
alibaba
.
fastjson
.
JSONObject
jsonBody0
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
"0"
,
jsonBody0
.
getJSONObject
(
"result"
).
getString
(
"total"
));
}
}
src/main/java/com/live/cases/videoClass/TestRemoveLessonSchedule.java
0 → 100644
View file @
843621df
package
com
.
live
.
cases
.
videoClass
;
import
com.alibaba.fastjson.JSONObject
;
import
com.live.enums.ApiModele
;
import
com.live.enums.RequestType
;
import
com.live.enums.Terminal
;
import
com.live.utils.XMBaseTest
;
import
com.live.xmutils.GetVideoClassData
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author fym
* @date 2021/2/19 11:34 上午
*/
public
class
TestRemoveLessonSchedule
extends
XMBaseTest
{
@BeforeMethod
public
void
beforeTest
()
{
xmAppApi
.
setApiModule
(
ApiModele
.
CloudClass_Video
)
// API 所属模块 必传 读取配置文件config.properties配置的api地址
.
setApiName
(
"API_removeLessonSchedule"
)
// API 名称 必传
.
setLoginUser
(
"fym-b"
)
// http 接口,测试账号 必传
.
setTerminal
(
Terminal
.
B
);
// 所属端位(B端,C端,M端等, 必传)
dal
.
setCase_owner
(
"樊圆梦"
);
super
.
beforeTest
();
}
@Test
public
void
testRemoveLessonSchedule
(){
GetVideoClassData
getVideoClassData
=
new
GetVideoClassData
();
JSONObject
jsonBody
=
getVideoClassData
.
VideoClassData
();
String
scheduleId
=
jsonBody
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
).
getJSONObject
(
0
).
getString
(
"id"
);
String
strTotal
=
jsonBody
.
getJSONObject
(
"result"
).
getString
(
"total"
);
int
total
=
Integer
.
parseInt
(
strTotal
);
Map
bodyMap
=
new
HashMap
();
bodyMap
.
put
(
"scheduleId"
,
scheduleId
);
org
.
json
.
JSONObject
jsonObject
=
new
org
.
json
.
JSONObject
(
bodyMap
);
String
bodyData
=
jsonObject
.
toString
();
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
bodyData
,
headers
);
System
.
out
.
println
(
xmAppApi
);
com
.
alibaba
.
fastjson
.
JSONObject
jsonBody0
=
xmAppApi
.
getBodyInJSON
();
JSONObject
jsonBody1
=
getVideoClassData
.
VideoClassData
();
String
strTotal0
=
jsonBody1
.
getJSONObject
(
"result"
).
getString
(
"total"
);
int
total0
=
Integer
.
parseInt
(
strTotal0
);
Assert
.
assertEquals
(
total
,
total0
+
1
);
}
}
src/main/java/com/live/enums/ApiModele.java
View file @
843621df
...
@@ -14,6 +14,7 @@ public class ApiModele {
...
@@ -14,6 +14,7 @@ public class ApiModele {
//云课堂B端接口模块
//云课堂B端接口模块
public
static
String
CloudClass_Video
=
"cloudclass_video_b"
;
public
static
String
CloudClass_Video
=
"cloudclass_video_b"
;
public
static
String
CloudClass_File
=
"cloudclass_file_b"
;
public
static
String
CloudClass_File
=
"cloudclass_file_b"
;
public
static
String
CloudClass_Series
=
"cloudclass_series_b"
;
//云课堂C端接口模块C
//云课堂C端接口模块C
public
static
String
CloudClass_VideoC
=
"cloudclass_video_c"
;
public
static
String
CloudClass_VideoC
=
"cloudclass_video_c"
;
...
...
src/main/java/com/live/xmutils/GetSeriesCourseData.java
0 → 100644
View file @
843621df
package
com
.
live
.
xmutils
;
import
com.alibaba.fastjson.JSONObject
;
import
com.live.enums.ApiModele
;
import
com.live.enums.RequestType
;
import
com.live.enums.Terminal
;
import
com.live.utils.XMBaseTest
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author fym
* @date 2021/2/19 5:15 下午
*/
public
class
GetSeriesCourseData
extends
XMBaseTest
{
public
JSONObject
getSeriesPage
(){
dataApi
.
setApiModule
(
ApiModele
.
CloudClass_Series
)
// API 所属模块 必传 读取配置文件config.properties配置的api地址
.
setApiName
(
"API_seriesPage"
)
// API 名称 必传
.
setLoginUser
(
"fym-b"
)
// http 接口,测试账号 必传
.
setTerminal
(
Terminal
.
B
);
// 所属端位(B端,C端,M端等, 必传)
super
.
beforeDataRequest
();
Map
bodyMap
=
new
HashMap
();
bodyMap
.
put
(
"teacherId"
,
""
);
bodyMap
.
put
(
"current"
,
1
);
bodyMap
.
put
(
"instId"
,
dataApi
.
getLoginInfo
().
getInstId
());
bodyMap
.
put
(
"size"
,
10
);
bodyMap
.
put
(
"createTimeBegin"
,
""
);
bodyMap
.
put
(
"createTimeEnd"
,
""
);
bodyMap
.
put
(
"seriesName"
,
""
);
System
.
out
.
println
(
"bodyMap = "
+
bodyMap
);
JSONObject
jsonObject
=
new
JSONObject
(
bodyMap
);
String
bodyData
=
jsonObject
.
toString
();
System
.
out
.
println
(
"bodyData = "
+
bodyData
);
dataApi
.
doRequest
(
RequestType
.
JSON
,
params
,
bodyData
,
headers
);
System
.
out
.
println
(
dataApi
);
JSONObject
seriesPage
=
dataApi
.
getBodyInJSON
();
return
seriesPage
;
}
}
src/main/java/com/live/xmutils/GetVideoClassData.java
View file @
843621df
...
@@ -12,6 +12,7 @@ import java.util.ArrayList;
...
@@ -12,6 +12,7 @@ import java.util.ArrayList;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.concurrent.TimeUnit
;
/**
/**
* @author fym
* @author fym
...
@@ -28,6 +29,7 @@ public class GetVideoClassData extends XMBaseTest {
...
@@ -28,6 +29,7 @@ public class GetVideoClassData extends XMBaseTest {
.
setTerminal
(
Terminal
.
B
);
// 所属端位(B端,C端,M端等, 必传)
.
setTerminal
(
Terminal
.
B
);
// 所属端位(B端,C端,M端等, 必传)
super
.
beforeDataRequest
();
super
.
beforeDataRequest
();
System
.
out
.
println
(
"查询列表========"
+
dataApi
);
Map
bodyMap
=
new
HashMap
();
Map
bodyMap
=
new
HashMap
();
bodyMap
.
put
(
"current"
,
1
);
bodyMap
.
put
(
"current"
,
1
);
...
@@ -46,7 +48,7 @@ public class GetVideoClassData extends XMBaseTest {
...
@@ -46,7 +48,7 @@ public class GetVideoClassData extends XMBaseTest {
}
}
//创建视频课(任何人)
//创建视频课(任何人)
public
String
createVideoClass
(){
public
String
createVideoClass
()
throws
InterruptedException
{
dataApi
.
setApiModule
(
ApiModele
.
CloudClass_B
)
// API 所属模块 必传 读取配置文件config.properties配置的api地址
dataApi
.
setApiModule
(
ApiModele
.
CloudClass_B
)
// API 所属模块 必传 读取配置文件config.properties配置的api地址
.
setApiName
(
"API_createLesson"
)
// API 名称 必传
.
setApiName
(
"API_createLesson"
)
// API 名称 必传
...
@@ -98,6 +100,7 @@ public class GetVideoClassData extends XMBaseTest {
...
@@ -98,6 +100,7 @@ public class GetVideoClassData extends XMBaseTest {
System
.
out
.
println
(
dataApi
);
System
.
out
.
println
(
dataApi
);
com
.
alibaba
.
fastjson
.
JSONObject
jsonBody
=
dataApi
.
getBodyInJSON
();
com
.
alibaba
.
fastjson
.
JSONObject
jsonBody
=
dataApi
.
getBodyInJSON
();
TimeUnit
.
SECONDS
.
sleep
(
3
);
String
scheduleId
=
jsonBody
.
getString
(
"result"
);
String
scheduleId
=
jsonBody
.
getString
(
"result"
);
return
scheduleId
;
return
scheduleId
;
...
@@ -105,7 +108,7 @@ public class GetVideoClassData extends XMBaseTest {
...
@@ -105,7 +108,7 @@ public class GetVideoClassData extends XMBaseTest {
}
}
//查询课次详情
//查询课次详情
public
JSONObject
classDetail
(){
public
JSONObject
classDetail
()
throws
InterruptedException
{
dataApi
.
setApiModule
(
ApiModele
.
CloudClass_Video
)
// API 所属模块 必传 读取配置文件config.properties配置的api地址
dataApi
.
setApiModule
(
ApiModele
.
CloudClass_Video
)
// API 所属模块 必传 读取配置文件config.properties配置的api地址
.
setApiName
(
"API_getLessonScheduleDetail"
)
// API 名称 必传
.
setApiName
(
"API_getLessonScheduleDetail"
)
// API 名称 必传
...
@@ -131,6 +134,39 @@ public class GetVideoClassData extends XMBaseTest {
...
@@ -131,6 +134,39 @@ public class GetVideoClassData extends XMBaseTest {
}
}
//查询视频课学员列表
public
JSONObject
getLessonStudentsPage
(){
dataApi
.
setApiModule
(
ApiModele
.
CloudClass_Video
)
// API 所属模块 必传 读取配置文件config.properties配置的api地址
.
setApiName
(
"API_getLessonScheduleStuPage"
)
// API 名称 必传
.
setLoginUser
(
"fym-b"
)
// http 接口,测试账号 必传
.
setTerminal
(
Terminal
.
B
);
// 所属端位(B端,C端,M端等, 必传)
super
.
beforeDataRequest
();
System
.
out
.
println
(
"this方法======="
+
dataApi
);
String
scheduleId
=
VideoClassData
().
getJSONObject
(
"result"
).
getJSONArray
(
"records"
).
getJSONObject
(
0
).
getString
(
"id"
);
Map
bodyMap
=
new
HashMap
();
bodyMap
.
put
(
"current"
,
1
);
bodyMap
.
put
(
"size"
,
10
);
bodyMap
.
put
(
"scheduleId"
,
scheduleId
);
org
.
json
.
JSONObject
jsonObject
=
new
org
.
json
.
JSONObject
(
bodyMap
);
String
bodyData
=
jsonObject
.
toString
();
dataApi
.
doRequest
(
RequestType
.
JSON
,
params
,
bodyData
,
headers
);
System
.
out
.
println
(
dataApi
);
JSONObject
jsonBodyStudentPage
=
dataApi
.
getBodyInJSON
();
return
jsonBodyStudentPage
;
}
...
...
src/main/resources/apicase/series-course-b.json
0 → 100644
View file @
843621df
{
"API_createSeries"
:
{
"apiPath"
:
"/apollo/public/apollo/createSeries"
,
"apiContentType"
:
"application/json;charset=utf-8"
,
"apiName"
:
"新增系列课"
,
"desc"
:
"新增系列课"
},
"API_seriesPage"
:
{
"apiPath"
:
"/apollo/public/apollo/seriesPage"
,
"apiContentType"
:
"application/json;charset=utf-8"
,
"apiName"
:
"系列课列表"
,
"desc"
:
"系列课列表"
}
}
\ No newline at end of file
src/main/resources/config.properties
View file @
843621df
...
@@ -22,6 +22,7 @@ cloudclass_file_b = /src/main/resources/apicase/api-file-b.json
...
@@ -22,6 +22,7 @@ cloudclass_file_b = /src/main/resources/apicase/api-file-b.json
cloudclass_file_c
=
/src/main/resources/apicase/api-file-c.json
cloudclass_file_c
=
/src/main/resources/apicase/api-file-c.json
cloudclass_customerLive_api
=
/src/main/resources/apicase/customerLive.json
cloudclass_customerLive_api
=
/src/main/resources/apicase/customerLive.json
cloudclass_apollo_api
=
/src/main/resources/apicase/apollo.json
cloudclass_apollo_api
=
/src/main/resources/apicase/apollo.json
cloudclass_series_b
=
/src/main/resources/apicase/series-course-b.json
...
...
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