@host = 192.168.110.131:8085/nrhe


###
# 用户管理


### 
# 登录
POST http://{{host}}/user/login/password HTTP/1.1
Content-Type: application/json
Authorization: Bearer xxx

{
    "loginName": "zhangsan",
    "password": "123456",
    "role": "student"
}

### 
# 创建用户
POST http://{{host}}/admin/user/create HTTP/1.1
Content-Type: application/json
Authorization: Bearer xxx

{
    "nid": "昵称",
    "loginName": "xxx",
    "password": "xxx",
    "avatar": "xxx.png",
    "roles": ["admin/student"]
}

### 
# 用户详情,自己
GET http://{{host}}/user/profile HTTP/1.1
Content-Type: application/json
Authorization: Bearer xxx


### 
# 删除用户
POST http://{{host}}/admin/user/delete/:id HTTP/1.1
Content-Type: application/json
Authorization: Bearer xxx


### 
# 批量删除用户
POST http://{{host}}/admin/user/delete/batch HTTP/1.1
Content-Type: application/json
Authorization: Bearer xxx

{
    "ids": ["xxx","xxx"]
}


### 
# 用户列表
GET http://{{host}}/admin/user/list?page=1&size=10&query={} HTTP/1.1
Content-Type: application/json
Authorization: Bearer xxx

### 
# 编辑用户
POST http://{{host}}/admin/user/update HTTP/1.1
Content-Type: application/json
Authorization: Bearer xxx

{
    "_id": "xxx",
    "nid": "昵称",
    "loginName": "xxx",
    "password": "xxx",
    "avatar": "xxx.png",
    "roles": ["admin/student"]
}


### 
# 导出用户
GET http://{{host}}/admin/user/export HTTP/1.1
Content-Type: application/json
Authorization: Bearer xxx


### 
# 导入用户
# 上传文件名为file
POST http://{{host}}/admin/user/import HTTP/1.1
Content-Type: application/json
Authorization: Bearer xxx


### 
# 下载模板
GET http://{{host}}/admin/user/tmplate HTTP/1.1
Content-Type: application/json
Authorization: Bearer xxx


###
# 创建考核记录
POST http://{{host}}/exam/history/create HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzI1OTAwMDgsImlkIjoiNjczYmZjY2E3MjQyNWIxOGQxMmMyMzk0Iiwib3JpZ19pYXQiOjE3MzE5ODUyMDh9.PkGZwgFVONilDTPQ6f_Gc5t6NlbdC1DGiaScQtU_-2A


{
	"produceName": "英语词汇测试",
	"examRecord": [
		{
			"title": "单词拼写：Apple",
			"result": "正确",
			"isCorrect": true
		},
		{
			"title": "单词拼写：Banana",
			"result": "错误",
			"isCorrect": false
		},
		{
			"title": "单词拼写：Cat",
			"result": "正确",
			"isCorrect": true
		},
		{
			"title": "单词拼写：Dog",
			"result": "正确",
			"isCorrect": true
		},
		{
			"title": "单词拼写：Elephant",
			"result": "错误",
			"isCorrect": false
		}
	],
	"totalScore": 85,
	"correct": 13,
	"mistake": 2
}

###
# 查询考核历史,如果query中没有userId则查询当前登录用户的
GET http://{{host}}/exam/history/list?page=1&size=10&query={"userId": "xxx"} HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjI4MjU4OTIsImlkIjoiNjQyYTUyNGY1ZjUwYmM5MDNmOTg2Mzk0Iiwia2V5IjoiYm94Y29zdCIsIm5hbWUiOiLlrZnog5wiLCJvcmlnX2lhdCI6MTcyMjIyMTA5MiwicGFyZW50IjoiNjQyYTUyNGY1ZjUwYmM5MDNmOTg2Mzk0IiwicGhvbmUiOiIxMzQwODU0NzgyMyIsInJvbGUiOiIiLCJzdGF0ZSI6MSwidXNlclR5cGUiOjJ9.Cz7qI3-Vah0io5ZLIFDyVOf8qsqdmbT8WHdprrjbdXw

