一、注册
二、登录
三、首页活动页面数据展示(查询所有)
四、分类页活动展示(类别查询)
五、搜索栏活动查询(模糊查询)
六、用户发布信息展示
目录
一、注册
接口名称: | 用户注册 |
接口功能描述: | 用户注册 |
接口请求URL地址: | http://47.98.204.244:8080/bywork/rest/register |
请求方式Get/Post: | Post |
接口参数列表: | { "username":"郑0702", "password":123321, "tetlphone":16389480437, "role":"管理员" } |
接口返回数据结构说明: | { "code": 200, "message": "注册成功", "success": true, "data": { "id": 149, "username": "zdt0911", "password": "123321", "telephone": null, "role": "普通用户", "registertime": 1631324730000 } } |
PostMan测试截图: | ![]() |
二、登录
接口名称: | 用户登录 |
接口功能描述: | 用户登录 |
接口请求URL地址: | http://47.98.204.244:8080/bywork/rest/login |
请求方式Get/Post: | Post |
接口参数列表: | { "username":"zdt0911", "password":123321 } |
接口返回数据结构说明: | { "code": 200, "message": "登录成功", "success": true, "data": { "id": 151, "username": "zdt0911", "password": "123321", "telephone": null, "role": "普通用户", "registertime": 1631324898000, "roles": null } } |
PostMan测试截图: | ![]() |
三、首页活动页面数据展示(查询所有)
接口名称: | 活动查询 |
接口功能描述: | 可展示当前所有活动 |
接口请求URL地址: | http://47.98.204.244:8080/bywork/rest/products |
请求方式Get/Post: | Get |
接口参数列表: | 无 |
接口返回数据结构说明: | { "code": 200, "message": "查询到所有活动", "success": true, "data": [ { "productname": "排球比赛", "category": "体育类", "number": "12", "image": null, "barcode": "李四", "description": "9月2号下午15:00--18:00体育馆", "protime": 1630512000000, "status": "1", "id": 1 },} |
PostMan测试截图: | ![]() |
四、分类页活动展示(类别查询)
接口名称: | 类别查询 |
接口功能描述: | 根据活动的类别查询并展示活动(一级分类) |
接口请求URL地址: | http://47.98.204.244:8080/bywork/rest/poductcategory |
请求方式Get/Post: | Get |
接口参数列表: | 无 |
接口返回数据结构说明: | { "code": 200, "message": "查询到所有活动", "success": true, "data": [ { "id": 0, "productname": null, "category": "体育类", "price": 0, "image": null, "barcode": null, "qrcode": null, "description": null, "protime": null }, } |
PostMan测试截图: | ![]() |
接口名称: | 根据活动类别查询产品 |
接口功能描述: | 根据活动类别查询产品(二级分类) |
接口请求URL地址: | http://47.98.204.244:8080/bywork/rest/Poductcategory2? |
请求方式Get/Post: | Get |
接口参数列表: | category=体育类 |
接口返回数据结构说明: | { "code": 200, "message": "查询到所有活动", "success": true, "data": [ { "productname": "排球比赛", "category": "体育类", "number": "12", "image": null, "barcode": "李四", "description": "9月2号下午15:00--18:00体育馆", "protime": 1630512000000, "status": "1", "id": 1 }, } |
PostMan测试截图: | ![]() |
五、搜索栏活动查询(模糊查询)
接口名称: | 根据产品名称查询产品 |
接口功能描述: | 模糊查询,根据产品名称查询产品 |
接口请求URL地址: | http://47.98.204.244:8080/bywork/rest/selectProductByname? |
请求方式Get/Post: | Get |
接口参数列表: | productname=比赛 |
接口返回数据结构说明: | { "code": 200, "message": "查询到所有活动", "success": true, "data": [ { "productname": "排球比赛", "category": "体育类", "number": "12", "image": null, "barcode": "李四", "description": "9月2号下午15:00--18:00体育馆", "protime": 1630512000000, "status": "1", "id": 1 },} |
PostMan测试截图: | ![]() |
六、用户发布信息展示
接口名称: | 消息查询 |
接口功能描述: | 可展示当前所有用户所发布的消息 |
接口请求URL地址: | http://47.98.204.244:8080/bywork/rest/news |
请求方式Get/Post: | Get |
接口参数列表: | 无 |
接口返回数据结构说明: | { "code": 200, "message": "查询到信息", "success": true, "data": [ { "id": 2, "user": "李四", "content": "1891年12月21日,由美国马萨诸塞州斯普林菲尔德基督教青年会训练学校体育教师詹姆士·奈史密斯发明 [2] 。1896年,篮球运动传入中国天津。1904年,圣路易斯奥运会上第1次进行了篮球表演赛。", "image": null } ] } |
PostMan测试截图: | ![]() |