文档
测试

商品列表

GET
/api/products

请求头

参数名
类型
描述
必填
Authorization
String
token
必填

请求参数

参数名
类型
描述
必填
keyword
模糊查询
必填
limit
页大小,默认为10
必填
page
页码
必填
priceOrder
priceOrder=asc,priceOrder=desc 按价格排序
必填
salesOrder
销量排序
必填
sid
分类id
必填

说明 / 示例

{ "status": 200, "success": true, "msg": "操作成功", "data": [{ "id": 7, "merId": 0, "image": "https://consoleapi.xinxintuan.co/file/pic/20200903171208889668.png", "image_base": "https://consoleapi.xinxintuan.co/file/pic/20200903171208889668.png", "codeBase": null, "userCollect": false, "userLike": false, "sliderImage": "https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg,https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg,https://image.dayouqiantu.cn/5ca081af6183f.jpg", "sliderImageArr": ["https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg", "https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg", "https://image.dayouqiantu.cn/5ca081af6183f.jpg"], "attrInfo": null, "storeName": "专属测试商品", 商品名字 "storeInfo": "", "keyword": "专属测试商品", "cateId": "3", "price": 100.00, 价格 "vipPrice": 0.00, "otPrice": 120.00, 市场价 "postage": 0.00, "unitName": "张", "sort": 0, "sales": 3, 销量 "stock": 7, 库存 "description": "<p><br/></p><p><img src=\"https://consoleapi.xinxintuan.co/file/pic/20200903171807647067.jpg\"/></p>", "isPostage": 0, "cost": 110.00, "isSeckill": 0, "isBargain": null, "isGood": 0, "ficti": 9, "browse": 9, "isShow": 1, "giveIntegral": 10.00, "tempId": 34, "isSub": 0, "specType": 0 }, { "id": 6, "merId": 0, "image": "https://consoleapi.xinxintuan.co/file/pic/20200903171807641535.jpg", "image_base": "https://consoleapi.xinxintuan.co/file/pic/20200903171807641535.jpg", "codeBase": null, "userCollect": false, "userLike": false, "sliderImage": "https://consoleapi.xinxintuan.co/file/pic/20200903171807641535.jpg", "sliderImageArr": ["https://consoleapi.xinxintuan.co/file/pic/20200903171807641535.jpg"], "attrInfo": null, "storeName": "印刷各种印刷", "storeInfo": "印刷各种印刷", "keyword": "印刷各种印刷", "cateId": "3", "price": 11.00, "vipPrice": 0.00, "otPrice": 33.00, "postage": 0.00, "unitName": "张", "sort": 1, "sales": 35, "stock": 9965, "description": "<p>印刷各种印刷</p>", "isPostage": 0, "cost": 22.00, "isSeckill": 0, "isBargain": null, "isGood": 0, "ficti": 1, "browse": 174, "isShow": 1, "giveIntegral": 1.00, "tempId": 34, "isSub": 0, "specType": 0 }, { "id": 2, "merId": 0, "image": "https://consoleapi.xinxintuan.co/file/pic/20200903171807584910.jpg", "image_base": "https://consoleapi.xinxintuan.co/file/pic/20200903171807584910.jpg", "codeBase": null, "userCollect": false, "userLike": false, "sliderImage": "https://consoleapi.xinxintuan.co/file/pic/20200903171807584910.jpg,https://consoleapi.xinxintuan.co/file/pic/20200903171807647067.jpg,https://consoleapi.xinxintuan.co/file/pic/20200903171807641535.jpg", "sliderImageArr": ["https://consoleapi.xinxintuan.co/file/pic/20200903171807584910.jpg", "https://consoleapi.xinxintuan.co/file/pic/20200903171807647067.jpg", "https://consoleapi.xinxintuan.co/file/pic/20200903171807641535.jpg"], "attrInfo": null, "storeName": "X型展架", "storeInfo": "X型展架", "keyword": "X型展架", "cateId": "3", "price": 10.00, "vipPrice": 0.00, "otPrice": 12.00, "postage": 0.00, "unitName": "张", "sort": 0, "sales": 23, "stock": 3307, "description": "<p><br/></p><p><img src=\"https://consoleapi.xinxintuan.co/file/pic/20200903171807641535.jpg\"/></p>", "isPostage": 0, "cost": 11.00, "isSeckill": 0, "isBargain": null, "isGood": 0, "ficti": 69, "browse": 48, "isShow": 1, "giveIntegral": 0.00, "tempId": 34, "isSub": 0, "specType": 1 }, { "id": 8, "merId": 0, "image": "https://image.dayouqiantu.cn/5ca081af6183f.jpg", "image_base": "https://image.dayouqiantu.cn/5ca081af6183f.jpg", "codeBase": null, "userCollect": false, "userLike": false, "sliderImage": "https://image.dayouqiantu.cn/5ca081af6183f.jpg,https://image.dayouqiantu.cn/5ca081af6183f.jpg,https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg", "sliderImageArr": ["https://image.dayouqiantu.cn/5ca081af6183f.jpg", "https://image.dayouqiantu.cn/5ca081af6183f.jpg", "https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg"], "attrInfo": null, "storeName": "多规格商品测试", "storeInfo": "多规格商品测试", "keyword": "多规格商品测试", "cateId": "5", "price": 4.00, "vipPrice": 0.00, "otPrice": 9.00, "postage": 0.00, "unitName": "张", "sort": 0, "sales": 9, "stock": 497, "description": "<p><br/></p><p><img src=\"https://image.dayouqiantu.cn/5ca081af6183f.jpg\"/></p>", "isPostage": 0, "cost": 1.00, "isSeckill": 0, "isBargain": null, "isGood": 0, "ficti": 0, "browse": 33, "isShow": 1, "giveIntegral": 0.00, "tempId": 34, "isSub": 1, "specType": 1 }, { "id": 1, "merId": 0, "image": "https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg", "image_base": "https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg", "codeBase": null, "userCollect": false, "userLike": false, "sliderImage": "https://image.dayouqiantu.cn/5ca081af6183f.jpg,https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg", "sliderImageArr": ["https://image.dayouqiantu.cn/5ca081af6183f.jpg", "https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg"], "attrInfo": null, "storeName": "照片打印", "storeInfo": "照片打印", "keyword": "照片打印", "cateId": "5", "price": 2.00, "vipPrice": 0.00, "otPrice": 1.00, "postage": 0.00, "unitName": "张", "sort": 0, "sales": 9, "stock": 999, "description": "<p><br/></p><p><img src=\"https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg\"/></p>", "isPostage": 0, "cost": 3.00, "isSeckill": 0, "isBargain": null, "isGood": 0, "ficti": 0, "browse": 20, "isShow": 1, "giveIntegral": 0.00, "tempId": 34, "isSub": 0, "specType": 0 }, { "id": 3, "merId": 0, "image": "https://consoleapi.xinxintuan.co/file/pic/20200903171807647067.jpg", "image_base": "https://consoleapi.xinxintuan.co/file/pic/20200903171807647067.jpg", "codeBase": null, "userCollect": false, "userLike": false, "sliderImage": "https://consoleapi.xinxintuan.co/file/pic/20200903171807647067.jpg", "sliderImageArr": ["https://consoleapi.xinxintuan.co/file/pic/20200903171807647067.jpg"], "attrInfo": null, "storeName": "彩色复印-量大有优惠", "storeInfo": "彩色复印", "keyword": "彩色复印", "cateId": "3", "price": 2.00, "vipPrice": 0.00, "otPrice": 1.00, "postage": 0.00, "unitName": "张", "sort": 0, "sales": 9, "stock": 9995, "description": "<p>1111</p>", "isPostage": 0, "cost": 1.00, "isSeckill": 0, "isBargain": null, "isGood": 0, "ficti": 0, "browse": 46, "isShow": 1, "giveIntegral": 0.00, "tempId": 34, "isSub": 0, "specType": 0 }, { "id": 4, "merId": 0, "image": "https://consoleapi.xinxintuan.co/file/pic/20200903171807625149.jpg", "image_base": "https://consoleapi.xinxintuan.co/file/pic/20200903171807625149.jpg", "codeBase": null, "userCollect": false, "userLike": false, "sliderImage": "https://consoleapi.xinxintuan.co/file/pic/20200903171807625149.jpg", "sliderImageArr": ["https://consoleapi.xinxintuan.co/file/pic/20200903171807625149.jpg"], "attrInfo": null, "storeName": "户外写真背胶", "storeInfo": "户外写真背胶", "keyword": "户外写真背胶", "cateId": "3", "price": 2.00, "vipPrice": 0.00, "otPrice": 1.00, "postage": 0.00, "unitName": "米", "sort": 0, "sales": 24, "stock": 87, "description": "<p>户外写真背胶</p>", "isPostage": 0, "cost": 1.00, "isSeckill": 0, "isBargain": null, "isGood": 0, "ficti": 0, "browse": 40, "isShow": 1, "giveIntegral": 0.00, "tempId": 34, "isSub": 0, "specType": 0 }, { "id": 5, "merId": 0, "image": "https://consoleapi.xinxintuan.co/file/pic/20200903171807568739.jpg", "image_base": "https://consoleapi.xinxintuan.co/file/pic/20200903171807568739.jpg", "codeBase": null, "userCollect": false, "userLike": false, "sliderImage": "https://consoleapi.xinxintuan.co/file/pic/20200903171807568739.jpg", "sliderImageArr": ["https://consoleapi.xinxintuan.co/file/pic/20200903171807568739.jpg"], "attrInfo": null, "storeName": "广告版定制", "storeInfo": "广告版定制", "keyword": "广告版定制", "cateId": "3", "price": 2.00, "vipPrice": 0.00, "otPrice": 11.00, "postage": 0.00, "unitName": "米", "sort": 0, "sales": 18, "stock": 0, "description": "<p>广告版定制</p>", "isPostage": 0, "cost": 1.00, "isSeckill": 0, "isBargain": null, "isGood": 0, "ficti": 0, "browse": 40, "isShow": 1, "giveIntegral": 0.00, "tempId": 34, "isSub": 0, "specType": 0 }], "time": "2020-10-05 13:24:33" } CREATE TABLE `yx_store_product` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '商品id', `mer_id` int(10) unsigned DEFAULT '0' COMMENT '商户Id(0为总后台管理员创建,不为0的时候是商户后台创建)', `image` varchar(256) NOT NULL COMMENT '商品图片', `slider_image` varchar(2000) NOT NULL COMMENT '轮播图', `store_name` varchar(128) NOT NULL COMMENT '商品名称', `store_info` varchar(256) NOT NULL COMMENT '商品简介', `keyword` varchar(256) NOT NULL COMMENT '关键字', `bar_code` varchar(15) DEFAULT '' COMMENT '产品条码(一维码)', `cate_id` varchar(64) NOT NULL COMMENT '分类id', `price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品价格', `vip_price` decimal(8,2) unsigned DEFAULT '0.00' COMMENT '会员价格', `ot_price` decimal(8,2) unsigned DEFAULT '0.00' COMMENT '市场价', `postage` decimal(8,2) unsigned DEFAULT '0.00' COMMENT '邮费', `unit_name` varchar(32) DEFAULT NULL COMMENT '单位名', `sort` smallint(11) DEFAULT '0' COMMENT '排序', `sales` mediumint(11) unsigned DEFAULT '0' COMMENT '销量', `stock` mediumint(11) unsigned DEFAULT '0' COMMENT '库存', `is_show` tinyint(1) DEFAULT '1' COMMENT '状态(0:未上架,1:上架)', `is_hot` tinyint(1) DEFAULT '0' COMMENT '是否热卖', `is_benefit` tinyint(1) DEFAULT '0' COMMENT '是否优惠', `is_best` tinyint(1) DEFAULT '0' COMMENT '是否精品', `is_new` tinyint(1) DEFAULT '0' COMMENT '是否新品', `description` text COMMENT '产品描述', `create_time` datetime DEFAULT NULL COMMENT '添加时间', `update_time` datetime DEFAULT NULL, `is_postage` tinyint(1) unsigned DEFAULT '0' COMMENT '是否包邮', `is_del` tinyint(1) unsigned DEFAULT '0' COMMENT '是否删除', `mer_use` tinyint(1) unsigned DEFAULT '0' COMMENT '商户是否代理 0不可代理1可代理', `give_integral` decimal(8,2) unsigned DEFAULT NULL COMMENT '获得积分', `cost` decimal(8,2) unsigned DEFAULT NULL COMMENT '成本价', `is_seckill` tinyint(1) unsigned DEFAULT '0' COMMENT '秒杀状态 0 未开启 1已开启', `is_bargain` tinyint(1) unsigned DEFAULT NULL COMMENT '砍价状态 0未开启 1开启', `is_good` tinyint(1) DEFAULT '0' COMMENT '是否优品推荐', `ficti` mediumint(11) DEFAULT '100' COMMENT '虚拟销量', `browse` int(11) DEFAULT '0' COMMENT '浏览量', `code_path` varchar(64) NOT NULL DEFAULT '' COMMENT '产品二维码地址(用户小程序海报)', `is_sub` tinyint(1) DEFAULT '0' COMMENT '是否单独分佣', `temp_id` int(10) DEFAULT NULL COMMENT '运费模板ID', `spec_type` tinyint(1) DEFAULT '0' COMMENT '规格 0单 1多', PRIMARY KEY (`id`) USING BTREE, KEY `is_hot` (`is_hot`) USING BTREE, KEY `is_benefit` (`is_benefit`) USING BTREE, KEY `is_best` (`is_best`) USING BTREE, KEY `is_new` (`is_new`) USING BTREE, KEY `toggle_on_sale, is_del` (`is_del`) USING BTREE, KEY `price` (`price`) USING BTREE, KEY `is_show` (`is_show`) USING BTREE, KEY `sort` (`sort`) USING BTREE, KEY `sales` (`sales`) USING BTREE, KEY `add_time` (`create_time`) USING BTREE, KEY `is_postage` (`is_postage`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='商品表';