Commit f6f168d9 by fanyuanmeng

修改接口

parent 8f3ce189
......@@ -86,6 +86,8 @@ public class TestCreateLesson extends XMBaseTest {
Assert.assertEquals(jsonBody.getString("result"),id);
getVideoClassData.removeLessonSchedule(id);
}
......
......@@ -4,6 +4,7 @@ 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.json.JSONObject;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
......@@ -53,14 +54,23 @@ public class TestLessonScheduleListPage extends XMBaseTest {
//按条件查询
@Test
public void testLessonScheduleListPageOrder(){
GetVideoClassData getVideoClassData = new GetVideoClassData();
com.alibaba.fastjson.JSONObject jsonObject0 = getVideoClassData.VideoClassData();
String scheduleName = jsonObject0.getJSONObject("result").getJSONArray("records").getJSONObject(0).getString("scheduleName");
String teacherId = jsonObject0.getJSONObject("result").getJSONArray("records").getJSONObject(0).getString("teacherId");
String beginTime = jsonObject0.getJSONObject("result").getJSONArray("records").getJSONObject(0).getString("beginTime");
String endTime = jsonObject0.getJSONObject("result").getJSONArray("records").getJSONObject(0).getString("endTime");
Map bodyMap = new HashMap();
bodyMap.put("current",1);
bodyMap.put("instId",xmAppApi.getLoginInfo().getInstId());
bodyMap.put("size",10);
bodyMap.put("beginTime","1612627200000");
bodyMap.put("endTime","1612713599999");
bodyMap.put("teacherId","1303609085537103873");
bodyMap.put("scheduleName","小王老师视频课接口测试");
bodyMap.put("beginTime",beginTime);
bodyMap.put("endTime",endTime);
bodyMap.put("teacherId",teacherId);
bodyMap.put("scheduleName",scheduleName);
JSONObject jsonObject = new JSONObject(bodyMap);
......
......@@ -136,7 +136,7 @@ public class GetVideoClassData extends XMBaseTest {
}
//添加视频课学员
//添加视频课学员
public String addLessonScheduleStu() throws InterruptedException {
String scheduleId = createVideoClass();
......@@ -169,6 +169,29 @@ public class GetVideoClassData extends XMBaseTest {
return scheduleId;
}
//删除视频课
public void removeLessonSchedule(String scheduleId){
dataApi.setApiModule(ApiModele.CloudClass_Video) // API 所属模块 必传 读取配置文件config.properties配置的api地址
.setApiName("API_removeLessonSchedule") // API 名称 必传
.setLoginUser("fym-b") // http 接口,测试账号 必传
.setTerminal(Terminal.B); // 所属端位(B端,C端,M端等, 必传)
super.beforeDataRequest();
Map bodyMap = new HashMap();
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 jsonBody0 = dataApi.getBodyInJSON();
System.out.println(jsonBody0);
}
......
......@@ -312,22 +312,22 @@
"gary": {
"instId": "1301797436402806785",
"instName": "",
"accountNo": "19941192167",
"certificate": "bb426cdfa72944e46068858aca0509ea",
"aid": "1303609085537103873",
"uid": "1303609085558075394",
"accountNo": "17130047572",
"certificate": "96d0b7696590408b67e74d38b2e082c4",
"aid": "1303157838454161409",
"uid": "895491980614696960",
"userType": "B",
"tid": "1303609085537103873"
"tid": "1303157838454161409"
},
"prod": {
"instId": "1301797436402806785",
"instName": "",
"accountNo": "19941192167",
"certificate": "bb426cdfa72944e46068858aca0509ea",
"aid": "1303609085537103873",
"uid": "1303609085558075394",
"accountNo": "17130047572",
"certificate": "96d0b7696590408b67e74d38b2e082c4",
"aid": "1303157838454161409",
"uid": "895491980614696960",
"userType": "B",
"tid": "1303609085537103873"
"tid": "1303157838454161409"
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment