文章目录
前言
每个对象(收藏、评论······),除了下面说明的属性,还有两个属性:gmtCreated
(创建时间),gmtModified
(修改时间)。这两个属性后端会自动处理,前端不用管理,只需要记得返回的对象里有这两个属性可以用就好
收藏
(收藏类的属性有 userName
(用户名) 和 museumName
(博物馆名))
添加收藏
API: http://1.15.175.104:8080/collect/add
参数: userName
, museumName
返回数据: true/false
删除收藏
API: http://1.15.175.104:8080/collect/delete
参数: userName
, museumName
返回数据: true/false
查找所有收藏(这个api没什么意义)
API: http://1.15.175.104:8080/collect/findAll
参数: 无
返回数据: 所有收藏对象的列表
查找用户收藏
API: http://1.15.175.104:8080/collect/findByUserName
参数: userName
返回数据: 用户的收藏对象列表(museumName
和imgUrl
)
评论
(评论类的属性有 id
, museumName
(博物馆名),userName
(用户名) 和)content
(内容)
增加评论
API: http://1.15.175.104:8080/comment/add
参数: museumName
, userName
, content
,| (id
后端自动生成)
返回数据: true/false
删除评论
API: http://1.15.175.104:8080/comment/delete
参数: id
返回数据: true/false
修改评论
API: http://1.15.175.104:8080/comment/update
参数: museumName
, userName
, content
,id
(id
不能改)
返回数据: true/false
查找图书馆的所有评论
API: http://1.15.175.104:8080/comment/findByMuseumName
参数: 无
返回数据: 评论对象列表
足迹
(收藏类的属性有 userName
(用户名) 和 museumName
(博物馆名))
增加足迹
API: http://1.15.175.104:8080/footprint/add
参数: userName
, museumName
返回数据: true/false
删除足迹
API: http://1.15.175.104:8080/footprint/delete
参数: userName
, museumName
返回数据: true/false
查找用户足迹
API: http://1.15.175.104:8080/footprint/findByUserName
参数: userName
返回数据: 用户的足迹对象列表
博物馆
(博物馆类的属性有museumName
,museumDescription
(博物馆简介))
增加博物馆
API: http://1.15.175.104:8080/museum/add
参数: museumName museumDescription
返回数据: true/false
删除博物馆
API: http://1.15.175.104:8080/museum/delete
参数: museumName
返回数据: true/false
修改博物馆
API: http://1.15.175.104:8080/museum/update
参数: museumName museumDescription
返回数据: true/false
查找所有博物馆名
API: http://1.15.175.104:8080/museum/findAllmuseumNames
参数: 无
返回数据: 博物馆名列表
根据博物馆名查找博物馆
API: http://1.15.175.104:8080/museum/findByMuseumName
参数: museumName
返回数据: 博物馆对象
查找所有博物馆
API: http://1.15.175.104:8080/museum/findAll
参数: 无
返回数据: 博物馆对象列表
用户
(用户类的属性有userName
,userPwd
,nickName
,avatarUrl
)
增加用户
API: http://1.15.175.104:8080/user/add
参数:userName
,userPwd
,nickName
,avatarUrl
返回数据: true/false
删除用户
API: http://1.15.175.104:8080/user/delete
参数: userName
返回数据: true/false
修改用户
API: http://1.15.175.104:8080/user/update
参数:userName
,userPwd
,nickName
,avatarUrl
(userName
用户名暂时不能修改)
返回数据: true/false
根据用户名查找用户
API: http://1.15.175.104:8080/user/findByUserName
参数: userName
返回数据: 用户对象
心得
提交心得(后台自动增加或修改)
API: http://1.15.175.104:8080/feeling/submit
参数:
userName
museumName
content
openOrNot
(1为公开)
gmtCreated
(该参数非必须,但如果是修改就得加上)
返回数据: true/false
根据用户名查找心得
API: http://1.15.175.104:8080/feeling/findByUserName
参数: userName
返回数据: 心得对象列表
根据用户名和博物馆名查找心得
API: http://1.15.175.104:8080/feeling/findByUserNameAndMuseumName
参数:
userName
museumName
返回数据: 心得对象列表
根据用户名和博物馆名和创建时间查找心得
API: http://1.15.175.104:8080/feeling/findByUserNameAndMuseumNameAndTime
参数:
userName
museumName
gmtCreated
返回数据: 心得对象