# 课程服务接口API

注意事项

  • 所有API接口的域名前缀:http://gateway--cnki--net--https.cnki.mdjsf.utuvpn.utuedu.com:9000/openx/
  • 所有接口未显性指明申请JWT的方式,统一为用户名+密码的方式
  • 所有接口统一认证方式:Header请求头中添加Authorization字段,值为"Bearer " +JWT

# 课程收藏

接口地址:/course/course/collect

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*

接口描述:期刊是否被订阅

请求示例:

[
    {
        "COURSE202306210001": 0
    },
    {
        "COURSE202306210002": 1
    }
]

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema
courseData 需要操作的课程信息集合 body true array Map
示例值:COURSE202306210001 需要操作的课程标识 objectkey true String
示例值:0 0代表取消收藏,1代表收藏 objectkey true Integer

响应状态:

状态码 说明
200 OK
415001 系统服务异常
415011 请求参数错误

响应参数:

参数名称 参数说明 类型 schema
code 接口返回状态码 integer(int32) integer(int32)
content 接口返回数据 object
count 接口返回数据条数,用于分页查询 integer(int32) integer(int32)
message 接口返回信息 string
success 接口返回是否成功 boolean
total 接口返回数据条数,用于分页查询 integer(int32) integer(int32)

响应示例:

{
    "code": 200,
    "message": "",
    "content": true,
    "success": true,
    "count": null,
    "total": null
}

# 获取课程收藏列表

接口地址:/course/course/collects

请求方式:GET

请求数据类型:

响应数据类型:*/*

接口描述:获取课程收藏列表

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema
order 排序:用户排序sort sortDesc,收藏时间buyTime buyTimeDesc query true string
classification 课程分类,英文逗号分隔 query true string
kw query true string
pageIndex 分页页码 query true integer
pageSize 分页条数 query true integer

响应状态:

状态码 说明
200 OK
415001 系统服务异常
415011 请求参数错误

响应参数:

参数名称 参数说明 类型 schema
code 接口返回状态码 integer(int32) integer(int32)
content 接口返回数据 array NaviInfo
  childs 子级导航 array Course
  records
  total
  size
  current
  orders
  optimizeCountSql
  searchCount
  countId
  maxLimit
  pages
count 接口返回数据条数,用于分页查询 integer(int32) integer(int32)
message 接口返回信息 string
success 接口返回是否成功 boolean
total 接口返回数据条数,用于分页查询 integer(int32) integer(int32)

响应示例:

{
    "code": 200,
    "message": "",
    "content": {
        "records": [],
        "total": 0,
        "size": 10,
        "current": 1,
        "orders": [],
        "optimizeCountSql": true,
        "searchCount": true,
        "countId": null,
        "maxLimit": null,
        "pages": 0
    },
    "success": true,
    "count": null,
    "total": null
}

# 获取已购买的课程列表

接口地址:/course/course/boughts

请求方式:GET

请求数据类型:

响应数据类型:*/*

接口描述:获取课程收藏列表

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema
order 排序:用户排序sort sortDesc,收藏时间buyTime buyTimeDesc query true string
classification 课程分类,英文逗号分隔 query true string
kw query true string
pageIndex 分页页码 query true integer
pageSize 分页条数 query true integer

响应状态:

状态码 说明
200 OK
415001 系统服务异常
415011 请求参数错误

响应参数:

参数名称 参数说明 类型 schema
code 接口返回状态码 integer(int32) integer(int32)
content 接口返回数据 array NaviInfo
  childs 子级导航 array Course
  records
  total
  size
  current
  orders
  optimizeCountSql
  searchCount
  countId
  maxLimit
  pages
count 接口返回数据条数,用于分页查询 integer(int32) integer(int32)
message 接口返回信息 string
success 接口返回是否成功 boolean
total 接口返回数据条数,用于分页查询 integer(int32) integer(int32)

响应示例:

{
    "code": 200,
    "message": "",
    "content": {
        "records": [],
        "total": 0,
        "size": 10,
        "current": 1,
        "orders": [],
        "optimizeCountSql": true,
        "searchCount": true,
        "countId": null,
        "maxLimit": null,
        "pages": 0
    },
    "success": true,
    "count": null,
    "total": null
}

# 获取课程分类

接口地址:/course/general/course/classification

请求方式:GET

请求数据类型:

响应数据类型:*/*

接口描述:获取课程分类

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema

响应状态:

状态码 说明
200 OK
415001 系统服务异常
415011 请求参数错误

响应参数:

参数名称 参数说明 类型 schema
code 接口返回状态码 integer(int32) integer(int32)
content 接口返回数据 array classification
  childs 子级导航 array
  code 课程编码 string
  parentCode 父级课程编码 string
  name 课程名称 string
  sort 排序 integer
count 接口返回数据条数,用于分页查询 integer(int32) integer(int32)
message 接口返回信息 string
success 接口返回是否成功 boolean
total 接口返回数据条数,用于分页查询 integer(int32) integer(int32)

响应示例:

{
    "code": 200,
    "message": "",
    "content": [
        {
            "code": "KYJN01",
            "parentCode": "KYJN",
            "name": "科研方法",
            "sort": 1
        },
        {
            "code": "YXJT01",
            "parentCode": "YXJT",
            "name": "研究生涯第一课公益讲座",
            "sort": 1
        }
    ],
    "success": true,
    "count": null,
    "total": null
}

# 获取课程首页banner列表

接口地址:/course/general/banners

请求方式:GET

请求数据类型:

响应数据类型:*/*

接口描述:获取课程分类

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema

响应状态:

状态码 说明
200 OK
415001 系统服务异常
415011 请求参数错误

响应参数:

参数名称 参数说明 类型 schema
code 接口返回状态码 integer(int32) integer(int32)
content 接口返回数据 array Banner
  childs 子级导航 array
  id id string
  title 标题 string
  url 课程地址 string
  img 图片地址 string
  utime 创建时间节点 string
  sort 排序 integer
count 接口返回数据条数,用于分页查询 integer(int32) integer(int32)
message 接口返回信息 string
success 接口返回是否成功 boolean
total 接口返回数据条数,用于分页查询 integer(int32) integer(int32)

响应示例:

{
    "code": 200,
    "message": "",
    "content": [
        {
            "id": "ae1fe900-1d93-4090-8717-6cca56a7edf1",
            "title": "25考研",
            "url": "http://x--cnki--net--https.cnki.mdjsf.utuvpn.utuedu.com:9000/course/list/SXKZ/SXKZ01",
            "img": "http://apix--cnki--net--https.cnki.mdjsf.utuvpn.utuedu.com:9000/psmcapi/api/v1/filemanage/showpicture?fileCode=67fc6787-873d-41af-9303-492d031577e1.jpg",
            "utime": "2024-04-03 14:33:07",
            "sort": null
        },
        {
            "id": "225d6d28-dae5-4613-940c-4687830d4a30",
            "title": "35讲",
            "url": "http://x--cnki--net--https.cnki.mdjsf.utuvpn.utuedu.com:9000/course/detail/COURSE202312080001",
            "img": "http://apix--cnki--net--https.cnki.mdjsf.utuvpn.utuedu.com:9000/psmcapi/api/v1/filemanage/showpicture?fileCode=2a741c23-1769-49d5-a2fa-5d588b9b11ba.jpg",
            "utime": null,
            "sort": 0
        },
        {
            "id": "e93a1b77-4a8a-40b4-bc3f-2bcc156aadda",
            "title": "从认证到实操",
            "url": "http://x--cnki--net--https.cnki.mdjsf.utuvpn.utuedu.com:9000/course/detail/COURSE202312150002",
            "img": "http://apix--cnki--net--https.cnki.mdjsf.utuvpn.utuedu.com:9000/psmcapi/api/v1/filemanage/showpicture?fileCode=65bb5102-d932-4400-b63c-f000cf4a9ce8.jpg",
            "utime": null,
            "sort": 0
        }
    ],
    "success": true,
    "count": null,
    "total": null
}

# 获取课程下的相关文献

接口地址:/course/course/relation/literature/{courseId}

请求方式:GET

请求数据类型:

响应数据类型:*/*

接口描述:获取课程分类

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema
courseId 课程id query true string

响应状态:

状态码 说明
200 OK
415001 系统服务异常
415011 请求参数错误

响应参数:

参数名称 参数说明 类型 schema
code 接口返回状态码 integer(int32) integer(int32)
content 接口返回数据 array Banner
count 接口返回数据条数,用于分页查询 integer(int32) integer(int32)
message 接口返回信息 string
success 接口返回是否成功 boolean
total 接口返回数据条数,用于分页查询 integer(int32) integer(int32)

响应示例:

{
    "code": 200,
    "message": "",
    "content": [
      {
        "courseId": "string",
        "productId": "string",
        "price": 0,
        "title": "string",
        "coverImg": "string",
        "classification": "string",
        "classificationName": "string",
        "status": 0,
        "expirationType": 0,
        "expirationDate": "2024-04-15T09:15:20.672Z",
        "expirationDay": 0,
        "lecturerId": "string",
        "lecturer": "string",
        "keyword": "string",
        "summary": "string",
        "lightspot": "string",
        "crowd": "string",
        "learnerBase": "string",
        "goal": "string",
        "videoCount": 0,
        "videoDuration": 0,
        "attachmentZip": "string",
        "collection": 0,
        "learnCount": 0,
        "sales": 0,
        "pv": 0,
        "score": 0,
        "publishTime": "2024-04-15T09:15:20.672Z",
        "ctime": "2024-04-15T09:15:20.672Z",
        "utime": "2024-04-15T09:15:20.672Z"
      }
    ],
    "success": true,
    "count": null,
    "total": null
}

# 获取相关课程

接口地址:/course/course/relation/literature/{courseId}

请求方式:GET

请求数据类型:

响应数据类型:*/*

接口描述:获取相关课程

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema
courseId 课程id query true string

响应状态:

状态码 说明
200 OK
415001 系统服务异常
415011 请求参数错误

响应参数:

参数名称 参数说明 类型 schema
code 接口返回状态码 integer(int32) integer(int32)
content 接口返回数据 array Banner
count 接口返回数据条数,用于分页查询 integer(int32) integer(int32)
message 接口返回信息 string
success 接口返回是否成功 boolean
total 接口返回数据条数,用于分页查询 integer(int32) integer(int32)

响应示例:

{
    "code": 200,
    "message": "",
    "content": [
      {
        "courseId": "string",
        "productId": "string",
        "price": 0,
        "title": "string",
        "coverImg": "string",
        "status": 0,
        "classification": "string",
        "classificationName": "string",
        "expirationType": 0,
        "expirationDate": "2024-04-15T09:27:19.420Z",
        "expirationDay": 0,
        "lecturerId": "string",
        "lecturerNames": "string",
        "lecturer": [
          {
            "lecturerId": "string",
            "name": "string",
            "photo": "string",
            "introduction": "string",
            "unit": "string",
            "utime": "2024-04-15T09:27:19.420Z"
          }
        ],
        "summary": "string",
        "videoCount": 0,
        "videoDuration": 0,
        "collection": 0,
        "learnCount": 0,
        "sales": 0,
        "pv": 0,
        "score": 0,
        "publishTime": "2024-04-15T09:27:19.420Z",
        "bought": 0,
        "detailUrl": "string"
      }
    ],
    "success": true,
    "count": null,
    "total": null
}

# 课程热门推荐

接口地址:/course/course/popular

请求方式:GET

请求数据类型:

响应数据类型:*/*

接口描述:获取相关课程

请求参数:无

响应状态:

状态码 说明
200 OK
415001 系统服务异常
415011 请求参数错误

响应参数:

参数名称 参数说明 类型 schema
code 接口返回状态码 integer(int32) integer(int32)
content 接口返回数据 array Banner
count 接口返回数据条数,用于分页查询 integer(int32) integer(int32)
message 接口返回信息 string
success 接口返回是否成功 boolean
total 接口返回数据条数,用于分页查询 integer(int32) integer(int32)

响应示例:

{
	"code": 200,
	"message": "",
	"content": [
		{
			"courseId": "COURSE202311240006",
			"productId": "COURSE_84733f77b36a4edaa75a9ff9c49bbcde",
			"price": 0.0,
			"title": "学术研究的三大意识",
			"coverImg": "http://apix--cnki--net--https.cnki.mdjsf.utuvpn.utuedu.com:9000/psmcapi/api/v1/filemanage/showpicture?fileCode=4FF81A71-EE21-4F7C-92F1-B60805E1947A.PNG",
			"status": 3,
			"classification": "YXJT02",
			"classificationName": "研究生科研信息素养提升公益讲座",
			"expirationType": 0,
			"expirationDate": null,
			"expirationDay": null,
			"lecturerId": "002002000029",
			"lecturerNames": "吴国盛",
			"lecturer": [
				{
					"lecturerId": "002002000029",
					"name": "吴国盛",
					"photo": "http://apix--cnki--net--https.cnki.mdjsf.utuvpn.utuedu.com:9000/psmcapi/api/v1/filemanage/showpicture?fileCode=276b7d6e-368b-4a5e-8098-b692de5d4a57.png",
					"introduction": "清华大学教授,科学史系系主任,科学博物馆馆长。兼任国务院学位委员会科技史学科评议组成员,国际科学史研究院通讯院士。曾任北京大学哲学系教授、中国社会科学院哲学研究所研究员、中国科学技术史学会第七、八届副理事长。北京大学理学学士、哲学硕士,中国社会科学院哲学博士。主要研究方向西方科学思想史、现象学科学哲学与技术哲学、科学传播与科学博物馆学。主要学术著作包括《科学技术史手册》《由史入思》《什么是科学》《希腊空间概念》 等。",
					"unit": "清华大学",
					"utime": null
				}
			],
			"summary": "本课程选自2023年“研究生科研素养提升”系列公益讲座\n本次课程主要包含以下内容:\n1.同行意识\n2.问题意识\n3.文献意识",
			"videoCount": 3,
			"videoDuration": 3020,
			"collection": 17,
			"learnCount": 0,
			"sales": 118,
			"pv": 354,
			"score": 0.0,
			"publishTime": "2023-11-28 10:29:43",
			"bought": null,
			"detailUrl": null
		}
	],
	"success": true,
	"count": null,
	"total": null
}

# 课程分类列表

接口地址:/course/course/lists

请求方式:GET

请求数据类型:

响应数据类型:*/*

接口描述:获取课程分类列表

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema
order 排序: 综合/发布时间 default defaultDesc,最新latest latestDesc,价格price pirceDesc,收藏collection collectionDesc ,浏览量pv pvDesc query true string
classification 课程分类,英文逗号分隔 query true string
kw query true string
pageIndex 分页页码 query true integer
pageSize 分页条数 query true integer
price 全部:;免费:0;付费:1; query true string

响应状态:

状态码 说明
200 OK
415001 系统服务异常
415011 请求参数错误

响应参数:

参数名称 参数说明 类型 schema
code 接口返回状态码 integer(int32) integer(int32)
content 接口返回数据
count 接口返回数据条数,用于分页查询 integer(int32) integer(int32)
message 接口返回信息 string
success 接口返回是否成功 boolean
total 接口返回数据条数,用于分页查询 integer(int32) integer(int32)

响应示例:

{
    "code": 200,
    "message": "",
    "content": {
        "records": [
            {
                "courseId": "COURSE202404120002",
                "productId": "COURSE_8d12e3f4af754ee0a1340bc87e5de774",
                "price": 0.00,
                "title": "四级核心词汇",
                "coverImg": "http://apix--cnki--net--https.cnki.mdjsf.utuvpn.utuedu.com:9000/psmcapi/api/v1/filemanage/showpicture?fileCode=045db0cb-9150-4324-aa91-768a00856545.jpg",
                "status": 3,
                "classification": "SXKZ02",
                "classificationName": "英语四六级",
                "expirationType": 1,
                "expirationDate": "2024-12-31 23:59:59",
                "expirationDay": null,
                "lecturerId": "004003000003",
                "lecturerNames": "小兜老师",
                "lecturer": null,
                "summary": "本课程主要针对四级核心词汇进行详细讲解;\n结合形式多样的词汇记忆秘籍,\n对常考短语、固定搭配、近义词进行剖析;\n并结合历年真题,情景重现,让大家得到实战训练!\n自编讲义,无须准备,看课件屏幕即可。",
                "videoCount": 26,
                "videoDuration": 33709,
                "collection": 0,
                "learnCount": 0,
                "sales": 0,
                "pv": 1,
                "score": 0.0,
                "publishTime": "2024-04-15 15:44:37",
                "bought": 0,
                "detailUrl": null
            }
        ],
        "total": 157,
        "size": 10,
        "current": 1,
        "orders": [],
        "optimizeCountSql": true,
        "searchCount": true,
        "countId": null,
        "maxLimit": null,
        "pages": 16
    },
    "success": true,
    "count": null,
    "total": null
}

# 获取最新课程列表

接口地址:/course/course/latest

请求方式:GET

请求数据类型:

响应数据类型:*/*

接口描述:获取最新课程列表

请求参数:无

响应状态:

状态码 说明
200 OK
415001 系统服务异常
415011 请求参数错误

响应参数:

参数名称 参数说明 类型 schema
code 接口返回状态码 integer(int32) integer(int32)
content 接口返回数据
count 接口返回数据条数,用于分页查询 integer(int32) integer(int32)
message 接口返回信息 string
success 接口返回是否成功 boolean
total 接口返回数据条数,用于分页查询 integer(int32) integer(int32)

响应示例:

{
    "code": 200,
    "message": "",
    "content": {
        "records": [
            {
                "courseId": "COURSE202404120002",
                "productId": "COURSE_8d12e3f4af754ee0a1340bc87e5de774",
                "price": 0.00,
                "title": "四级核心词汇",
                "coverImg": "http://apix--cnki--net--https.cnki.mdjsf.utuvpn.utuedu.com:9000/psmcapi/api/v1/filemanage/showpicture?fileCode=045db0cb-9150-4324-aa91-768a00856545.jpg",
                "status": 3,
                "classification": "SXKZ02",
                "classificationName": "英语四六级",
                "expirationType": 1,
                "expirationDate": "2024-12-31 23:59:59",
                "expirationDay": null,
                "lecturerId": "004003000003",
                "lecturerNames": "小兜老师",
                "lecturer": null,
                "summary": "本课程主要针对四级核心词汇进行详细讲解;\n结合形式多样的词汇记忆秘籍,\n对常考短语、固定搭配、近义词进行剖析;\n并结合历年真题,情景重现,让大家得到实战训练!\n自编讲义,无须准备,看课件屏幕即可。",
                "videoCount": 26,
                "videoDuration": 33709,
                "collection": 0,
                "learnCount": 0,
                "sales": 0,
                "pv": 1,
                "score": 0.0,
                "publishTime": "2024-04-15 15:44:37",
                "bought": 0,
                "detailUrl": null
            }
        ],
        "total": 157,
        "size": 10,
        "current": 1,
        "orders": [],
        "optimizeCountSql": true,
        "searchCount": true,
        "countId": null,
        "maxLimit": null,
        "pages": 16
    },
    "success": true,
    "count": null,
    "total": null
}

# 获取免费课程列表

接口地址:/course/course/free

请求方式:GET

请求数据类型:

响应数据类型:*/*

接口描述:获取免费课程列表

请求参数:无

响应状态:

状态码 说明
200 OK
415001 系统服务异常
415011 请求参数错误

响应参数:

参数名称 参数说明 类型 schema
code 接口返回状态码 integer(int32) integer(int32)
content 接口返回数据
count 接口返回数据条数,用于分页查询 integer(int32) integer(int32)
message 接口返回信息 string
success 接口返回是否成功 boolean
total 接口返回数据条数,用于分页查询 integer(int32) integer(int32)

响应示例:

{
    "code": 200,
    "message": "",
    "content": {
        "records": [
            {
                "courseId": "COURSE202404120002",
                "productId": "COURSE_8d12e3f4af754ee0a1340bc87e5de774",
                "price": 0.00,
                "title": "四级核心词汇",
                "coverImg": "http://apix--cnki--net--https.cnki.mdjsf.utuvpn.utuedu.com:9000/psmcapi/api/v1/filemanage/showpicture?fileCode=045db0cb-9150-4324-aa91-768a00856545.jpg",
                "status": 3,
                "classification": "SXKZ02",
                "classificationName": "英语四六级",
                "expirationType": 1,
                "expirationDate": "2024-12-31 23:59:59",
                "expirationDay": null,
                "lecturerId": "004003000003",
                "lecturerNames": "小兜老师",
                "lecturer": null,
                "summary": "本课程主要针对四级核心词汇进行详细讲解;\n结合形式多样的词汇记忆秘籍,\n对常考短语、固定搭配、近义词进行剖析;\n并结合历年真题,情景重现,让大家得到实战训练!\n自编讲义,无须准备,看课件屏幕即可。",
                "videoCount": 26,
                "videoDuration": 33709,
                "collection": 0,
                "learnCount": 0,
                "sales": 0,
                "pv": 1,
                "score": 0.0,
                "publishTime": "2024-04-15 15:44:37",
                "bought": 0,
                "detailUrl": null
            }
        ],
        "total": 157,
        "size": 10,
        "current": 1,
        "orders": [],
        "optimizeCountSql": true,
        "searchCount": true,
        "countId": null,
        "maxLimit": null,
        "pages": 16
    },
    "success": true,
    "count": null,
    "total": null
}