[关闭]
@15311494814 2016-06-20T07:20:51.000000Z 字数 3578 阅读 460

才艺技能表Controller

controller: - SkillController

1, 增加才艺技能资料

功能 : 添加才艺技能资料
路径 : POST rest/skill
body :

  1. {
  2. "artistid":"qw213213ewqeq",
  3. "type":"video",
  4. "name":"这是才艺技能的名称",
  5. "coverfileid":"asdas21312qw",
  6. "fileids":"qwe23wqeqe,qweqwe23,wqewqewq23",
  7. "orderby":"1"
  8. }

正确返回

  1. {
  2. "statusCode" : "000000",
  3. "result":
  4. {
  5. "uuid":"132wq132wq13weqwe23e",
  6. "key":"1",
  7. "artistid":"qw213213ewqeq",
  8. "type":"video",
  9. "name":"这是才艺技能的名称",
  10. "coverfileid":"artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg",
  11. "fileids":"artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg,
  12. artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg,
  13. artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg",
  14. "orderby":"1"
  15. }
  16. "error":""
  17. }

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 :

  1. {
  2. "name":"这是才艺技能的名称",
  3. "coverfileid":"asdas21312qw",
  4. "fileids":"qwe23wqeqe,qweqwe23,wqewqewq23",
  5. "orderby":"1"
  6. }

正确返回

  1. {
  2. "statusCode" : "000000",
  3. "result":
  4. {
  5. "uuid":"132wq132wq13weqwe23e",
  6. "key":"1",
  7. "artistid":"qw213213ewqeq",
  8. "type":"video",
  9. "name":"这是才艺技能的名称",
  10. "coverfileid":"artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg",
  11. "fileids":"artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg,
  12. artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg,
  13. artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg",
  14. "orderby":"1"
  15. }
  16. "error":""
  17. }

jsonMap | 传递参数json用来保存页面添加数据

数据参数 必须 说明
id 才艺技能ID
同@1
正确返回值 说明
同@2

3,删除才艺资料

功能 : 删除才艺数据
路径 : DELETE rest/skill?id=才艺技能ID
正确返回

  1. {
  2. "statusCode":"000000"
  3. "result":"ok",
  4. "error":""
  5. }
数据参数 必须 说明
id 才艺技能ID
正确返回值 说明
statusCode 状态码,正常为 000000
result ok
error ""

4,根据才艺技能id获取单条数据

功能通过id查询该用户所有信息,没有则返回空字符串
路径 : GET | rest/skill?id=才艺技能ID
正确返回

  1. {
  2. "statusCode" : "000000",
  3. "result":
  4. {
  5. "uuid":"132wq132wq13weqwe23e",
  6. "key":"1",
  7. "artistid":"qw213213ewqeq",
  8. "type":"video",
  9. "name":"这是才艺技能的名称",
  10. "coverfileid":"artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg",
  11. "fileids":"artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg,
  12. artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg,
  13. artist/2016/06/16/image/qweq31q32qe231s31qwe2_20160616142432.jpg",
  14. "orderby":"1"
  15. }
  16. "error":""
  17. }
参数 必填 说明
id 才艺技能ID
正确返回值 说明
同@2

5,根据艺人id获取所有才艺的数据(不分页)

功能查询所有用户所有信息,没有则返回空字符串
路径 : GET | rest/skills?artistid=艺人ID
正确返回

  1. { "statusCode":"000000",
  2. "result":{
  3. "data":{
  4. {
  5. "uuid":"132wq132wq13weqwe23e",
  6. "key":"1",
  7. "artistid":"qw213213ewqeq",
  8. "type":"video",
  9. "name":"这是才艺技能的名称",
  10. "coverfileid":"artist/2016/06/16/image/qwe231s31qwe2_20160616142432.jpg",
  11. "fileids":"artist/2016/06/16/image/q2qe231s31qwe2_20160616142432.jpg,
  12. artist/2016/06/16/image/32qe231s31qwe2_20160616142432.jpg,
  13. artist/2016/06/16/image/qweq31231s31qwe2_20160616142432.jpg",
  14. "orderby":"1"
  15. },{ 同上
  16. }
  17. }
  18. },
  19. "error":""}
@2数据参数 必须 说明
artistid 艺人ID
正确返回值 说明
同@2

6,根据艺人id获取所有才艺的数据(分页)

功能分页查询所有用户所有信息,没有则返回空字符串
路径 : GET | rest/skills/limit?artistid=艺人ID&startIndex=1&pageSize=10
正确返回

  1. {"statusCode":"000000",
  2. "result":{
  3. "datas":[
  4. {
  5. "uuid":"132wq132wq13weqwe23e",
  6. "key":"1",
  7. "artistid":"qw213213ewqeq",
  8. "type":"video",
  9. "name":"这是才艺技能的名称",
  10. "coverfileid":"artist/2016/06/16/image/qwe231s31qwe2_20160616142432.jpg",
  11. "fileids":"artist/2016/06/16/image/q2qe231s31qwe2_20160616142432.jpg,
  12. artist/2016/06/16/image/32qe231s31qwe2_20160616142432.jpg,
  13. artist/2016/06/16/image/qweq31231s31qwe2_20160616142432.jpg",
  14. "orderby":"1"
  15. },{同上
  16. }],
  17. "startIndex":0,
  18. "pageSize":10,
  19. "total":9},
  20. "error":""
  21. }
参数 必填 说明
artistid 艺人ID
startIndex 开始下标
pageSize 每页展示
正确返回值 说明
同@2
startIndex 开始下标
pageSize 每页展示
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注