Git Product home page Git Product logo

xiaoyuanxianyu's Introduction

二手交易平台

SpringBoot+Spring-Data-JPA

#API描述

简要描述:

  • 返回首页需要的数据 热门和最新商品

请求URL:

  • https://2.fanfpy.top/xianyu/api/goods/new/{num}
热门商品同例
  • https://2.fanfpy.top/xianyu/api/goods/hot/{num}

请求方式:

  • GET
参数名 必选 类型 说明
num Integer 列表数量

返回示例

{
	"code":0,
	"msg":"成功",
	"data":[
		{
			"goodsId": 1,
			"userId": 1,
			"userName":"fanfpy",
			"userImg":"https:xxx.com/xxx.jpg",
			"goodsTitlie":"小米mix2s",
			"price" : 2999.0,
			"date" "2018-05-03 22:39:26"
			"status":0,
			"pageView":2,
			"describle": "描述:一面科技一面艺术",
			"goodsImg":[
				"img":"https:xxx.com/xxx.jpg",
				"img":"https:xxx.com/xxx.jpg",
				"img":"https:xxx.com/xxx.jpg",
			]
		},
		{
			"goodsId": 2,
			"userId": 1,
			"userName":"fanfpy",
			"userImg":"https:xxx.com/xxx.jpg",
			"goodsTitlie":"vivoX20",
			"price" : 3999.0,
			"date" "2018-05-03 14:22:16"
			"status":0,
			"pageView":2,
			"describle": "两千万柔光双摄,照亮你的美",
			"goodsImg":[
				"img":"https:xxx.com/xxx.jpg",
				"img":"https:xxx.com/xxx.jpg",
				"img":"https:xxx.com/xxx.jpg",
			]
		}
	]
}

简要描述:

  • 商品详细页

请求url

  • https://2.fanfpy.top/xianyu/api/goods/id/{id}

请求类型

  • GET

返回示例

{
	"code":0,
	"msg":"成功",
	"data":{
		 "goodsId": 1,
            "userId": 1,
            "userName":"fanfpy",
            "userImg":"https:xxx.com/xxx.jpg",
            "goodsTitlie":"小米mix2s",
            "price" : 2999.0,
            "date" "2018-05-03 22:39:26"
            "status":0,
			"pageView":2,
            "describle": "描述:一面科技一面艺术",
            "goodsImg":[
                "img":"https:xxx.com/xxx.jpg",
                "img":"https:xxx.com/xxx.jpg",
                "img":"https:xxx.com/xxx.jpg",
            ]
	}
}

通过分类id返回商品列表

请求URL:

  • http://2.fanfpy.top/xianyu/api/goods/class/{classId}

请求方式:

  • GET

参数:

参数名 必选 类型 说明
classId Integer 分类id

返回示例

{
	"code" :0,
	"msg":"成功",
	"data":[
		{
			"goodsId": 2,
			"userId": 1,
			"userName":"fanfpy",
			"userImg":"https:xxx.com/xxx.jpg",
			"goodsTitlie":"vivoX20",
			"price" : 3999.0,
			"date" "2018-05-03 14:22:16"
			"status":0,
			"pageView":2,
			"describle": "两千万柔光双摄,照亮你的美",
			"goodsImg":[
				"img":"https:xxx.com/xxx.jpg",
				"img":"https:xxx.com/xxx.jpg",
				"img":"https:xxx.com/xxx.jpg",
			]
		},
		{
			"goodsId": 2,
			"userId": 1,
			"userName":"fanfpy",
			"userImg":"https:xxx.com/xxx.jpg",
			"goodsTitlie":"vivoX20",
			"price" : 3999.0,
			"date" "2018-05-03 14:22:16"
			"status":0,
			"pageView":2,
			"describle": "两千万柔光双摄,照亮你的美",
			"goodsImg":[
				"img":"https:xxx.com/xxx.jpg",
				"img":"https:xxx.com/xxx.jpg",
				"img":"https:xxx.com/xxx.jpg",
			]
		}
	]
}
}

添加商品

参数名 必选 类型 说明
userId Integer 用户id
classification Integer 分类id
commentNum Integer 评论数 默认为空
describle String 商品描述
name String 价格
status Integer 商品状态0为上架 1为下架
pageView Integer 查看数 默认为0

添加图片

参数名 必选 类型 说明
goodsId Integer 商品id
file file 上传的图片

xiaoyuanxianyu's People

Contributors

fanfpy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.