图书列表

作者: yeguozhong yedaxia.github.com

请求URL

/api/book/list GET

请求参数 application/x-www-form-urlencoded

参数名 类型 必须 描述
page int 页数
limit int 每页条数
sort string 排序

返回结果

{
	"body":{
		"total":"int //总记录数",
		"pageCount":"int //页数",
		"currentPage":"int //当前页",
		"pageSize":"int //每页记录数",
		"list":[{
			"bookId":"long //图书id",
			"bookName":"string //图书名称",
			"price":{
				"price":"double //价格",
				"country":"int //国家"
			}
		}],
		"hasMore":"boolean //是否还有更多"
	},
	"code":"int",
	"errMsg":"string",
	"data":{
		"total":"int //总记录数",
		"pageCount":"int //页数",
		"currentPage":"int //当前页",
		"pageSize":"int //每页记录数",
		"list":[{
			"bookId":"long //图书id",
			"bookName":"string //图书名称",
			"price":{
				"price":"double //价格",
				"country":"int //国家"
			}
		}],
		"hasMore":"boolean //是否还有更多"
	},
	"errType":"enum // [SUCCESS,WARN,ERROR]"
}

图书详情

作者: yeguozhong yedaxia.github.com

请求URL

/api/book/book-detail GET

请求参数 application/x-www-form-urlencoded

参数名 类型 必须 描述
id long 图书ID

返回结果

{
	"body":{
		"bookId":"long //图书id",
		"bookName":"string //图书名称",
		"price":{
			"price":"double //价格",
			"country":"int //国家"
		},
		"storeCount":"int //馆藏数量",
		"pictures":"string[] //图片",
		"owner":{
			"userId":"string //用户id",
			"userName":"string //用户名",
			"friend":"SimpleUser{}",
			"friends":[{
				"userId":"string //用户id",
				"userName":"string //用户名",
				"friend":"SimpleUser{}"
			}],
			"readBooks":[{
				"bookId":"long //图书id",
				"bookName":"string //图书名称",
				"price":{
					"price":"double //价格",
					"country":"int //国家"
				}
			}],
			"isFollow":"boolean //是否关注",
			"follower":"UserVO[]"
		}
	},
	"code":"int",
	"errMsg":"string",
	"data":{
		"bookId":"long //图书id",
		"bookName":"string //图书名称",
		"price":{
			"price":"double //价格",
			"country":"int //国家"
		},
		"storeCount":"int //馆藏数量",
		"pictures":"string[] //图片",
		"owner":{
			"userId":"string //用户id",
			"userName":"string //用户名",
			"friend":"SimpleUser{}",
			"friends":[{
				"userId":"string //用户id",
				"userName":"string //用户名",
				"friend":"SimpleUser{}"
			}],
			"readBooks":[{
				"bookId":"long //图书id",
				"bookName":"string //图书名称",
				"price":{
					"price":"double //价格",
					"country":"int //国家"
				}
			}],
			"isFollow":"boolean //是否关注",
			"follower":"UserVO[]"
		}
	},
	"errType":"enum // [SUCCESS,WARN,ERROR]"
}

删除图书

作者: yeguozhong yedaxia.github.com

请求URL

/api/book/del-book GET

请求参数 application/x-www-form-urlencoded

参数名 类型 必须 描述
bookId long 图书ID

返回结果

{
	"body":{
		"bookId":"long //图书id",
		"bookName":"string //图书名称",
		"price":{
			"price":"double //价格",
			"country":"int //国家"
		}
	},
	"code":"int",
	"errMsg":"string",
	"data":{
		"bookId":"long //图书id",
		"bookName":"string //图书名称",
		"price":{
			"price":"double //价格",
			"country":"int //国家"
		}
	},
	"errType":"enum // [SUCCESS,WARN,ERROR]"
}

批量删除图书

作者: yeguozhong yedaxia.github.com

请求URL

/api/book/del-books DELETE

请求参数 application/x-www-form-urlencoded

参数名 类型 必须 描述
bookIds long[]

返回结果

{
	"body":{},
	"code":"int",
	"errMsg":"string",
	"data":{},
	"errType":"enum // [SUCCESS,WARN,ERROR]"
}

购买图书

作者: yeguozhong yedaxia.github.com

请求URL

/api/book/buy-book POST

请求参数 application/x-www-form-urlencoded

参数名 类型 必须 描述
bookId long

返回结果

{
	"headers":{
		"headers":{}
	},
	"body":{
		"bookId":"long",
		"bookName":"string",
		"price":{
			"price":"double",
			"country":"int"
		}
	}
}