才艺技能表Controller
controller: - SkillController
1, 增加才艺技能资料
功能 : 添加才艺技能资料
路径 : POST rest/skill
body :
{
"artistid":"qw213213ewqeq",
"type":"video",
"name":"这是才艺技能的名称",
"coverfileid":"asdas21312qw",
"fileids":"qwe23wqeqe,qweqwe23,wqewqewq23",
"orderby":"1"
}
正确返回:
{
"statusCode" : "000000",
"result":
{
"uuid":"132wq132wq13weqwe23e",
"key":"1",
"artistid":"qw213213ewqeq",
"type":"video",
"name":"这是才艺技能的名称",
"coverfileid":"artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg",
"fileids":"artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg,
artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg,
artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg",
"orderby":"1"
}
"error":""
}
jsonMap | 传递参数json用来保存页面数据
@1数据参数 |
必须 |
说明 |
artistid |
是 |
艺人ID |
type |
是 |
类型 (video:视频,album:相册,vioce:音频) |
name |
是 |
名称 |
coverfileid |
否 |
封面 文件ID |
fileids |
否 |
多文件ID |
orderby |
否 |
排序 |
@2正确返回值 |
说明 |
statusCode |
状态码,正常为 000000 |
result |
|
uuid |
才艺技能id |
key |
索引 |
artistid |
艺人ID |
type |
类型 (video:视频,album:相册,vioce:音频) |
name |
名称 |
coverfileid |
封面 文件的相对路径 |
fileids |
多文件ID (文件相对路径,逗号隔开) |
orderby |
排序 |
error |
"" |
### 2, 修改才艺资料
功能 : 修改才艺数据
路径 : PUT rest/skill?id=才艺技能ID
body :
{
"name":"这是才艺技能的名称",
"coverfileid":"asdas21312qw",
"fileids":"qwe23wqeqe,qweqwe23,wqewqewq23",
"orderby":"1"
}
正确返回:
{
"statusCode" : "000000",
"result":
{
"uuid":"132wq132wq13weqwe23e",
"key":"1",
"artistid":"qw213213ewqeq",
"type":"video",
"name":"这是才艺技能的名称",
"coverfileid":"artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg",
"fileids":"artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg,
artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg,
artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg",
"orderby":"1"
}
"error":""
}
jsonMap | 传递参数json用来保存页面添加数据
数据参数 |
必须 |
说明 |
id |
是 |
才艺技能ID |
同@1 |
|
|
3,删除才艺资料
功能 : 删除才艺数据
路径 : DELETE rest/skill?id=才艺技能ID
正确返回:
{
"statusCode":"000000"
"result":"ok",
"error":""
}
正确返回值 |
说明 |
statusCode |
状态码,正常为 000000 |
result |
ok |
error |
"" |
4,根据才艺技能id获取单条数据
功能 : 通过id查询该用户所有信息,没有则返回空字符串
路径 : GET | rest/skill?id=才艺技能ID
正确返回:
{
"statusCode" : "000000",
"result":
{
"uuid":"132wq132wq13weqwe23e",
"key":"1",
"artistid":"qw213213ewqeq",
"type":"video",
"name":"这是才艺技能的名称",
"coverfileid":"artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg",
"fileids":"artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg,
artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg,
artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg",
"orderby":"1"
}
"error":""
}
5,根据艺人id获取所有才艺的数据(不分页)
功能 : 查询所有用户所有信息,没有则返回空字符串
路径 : GET | rest/skills?artistid=艺人ID
正确返回:
{ "statusCode":"000000",
"result":{
"data":{
{
"uuid":"132wq132wq13weqwe23e",
"key":"1",
"artistid":"qw213213ewqeq",
"type":"video",
"name":"这是才艺技能的名称",
"coverfileid":"artist/2016/06/16/image/qwe231s31qwe2_20160616142432.jpg",
"fileids":"artist/2016/06/16/image/q2qe231s31qwe2_20160616142432.jpg,
artist/2016/06/16/image/32qe231s31qwe2_20160616142432.jpg,
artist/2016/06/16/image/qweq31231s31qwe2_20160616142432.jpg",
"orderby":"1"
},{ 同上
}
}
},
"error":""}
@2数据参数 |
必须 |
说明 |
artistid |
是 |
艺人ID |
6,根据艺人id获取所有才艺的数据(分页)
功能 : 分页查询所有用户所有信息,没有则返回空字符串
路径 : GET | rest/skills/limit?artistid=艺人ID&startIndex=1&pageSize=10
正确返回:
{"statusCode":"000000",
"result":{
"datas":[
{
"uuid":"132wq132wq13weqwe23e",
"key":"1",
"artistid":"qw213213ewqeq",
"type":"video",
"name":"这是才艺技能的名称",
"coverfileid":"artist/2016/06/16/image/qwe231s31qwe2_20160616142432.jpg",
"fileids":"artist/2016/06/16/image/q2qe231s31qwe2_20160616142432.jpg,
artist/2016/06/16/image/32qe231s31qwe2_20160616142432.jpg,
artist/2016/06/16/image/qweq31231s31qwe2_20160616142432.jpg",
"orderby":"1"
},{同上
}],
"startIndex":0,
"pageSize":10,
"total":9},
"error":""
}
参数 |
必填 |
说明 |
artistid |
是 |
艺人ID |
startIndex |
否 |
开始下标 |
pageSize |
否 |
每页展示 |
正确返回值 |
说明 |
同@2 |
|
startIndex |
开始下标 |
pageSize |
每页展示 |