多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[TOC] ## 商品信息 ~~~[api] post:/goods/info *int:id=默认值1#商品id <<< success { "code": 0, "info": "成功", "data":{ "id": 1, "title": "test2", "sn": "112345", "price": "1.00", "state": 1, "goods_brand_id": 1, "goods_brand_title": "test" } } <<< error ~~~ ## 商品列表 ~~~[api] post:/goods/getlist int:goods_brand_id=1#品牌id int:goods_type_id=1#分类id *int:page=1#页码 *int:limit=10#每页显示个数 string:key=id#排序字段名 string:order=normal#排序方式 <<< success { "code": 0, "info": "成功", "data":[ { "id": 4, "title": "我是测试的重名的", "sn": "", "price": "99.00", "state": 1, "goods_brand_id": 2, "goods_brand_title": "test" }, { "id": 3, "title": "我是测试的重名的", "sn": "", "price": "99.00", "state": 1, "goods_brand_id": 1, "goods_brand_title": "test" } ] } <<< error ~~~ ## 商品列表---不需要品牌ID ~~~[api] post:/goods/getlistall *int:page=1#页码 *int:limit=10#每页显示个数 <<< success { "code": 0, "info": "成功", "data":[ { "id": 4, "title": "我是测试的重名的", "sn": "", "price": "99.00", "state": 1, "goods_brand_id": 2, "goods_brand_title": "test" } ] } <<< error ~~~ ## 添加商品 ~~~[api] post:/goods/add *string:title=test#商品名称 *int:goods_brand_id=1#商品品牌id *int:goods_type_id=1#商品分类id *int:price=1.11#商品零食价 int:sn=690000000#条形码 <<< success { "code": 0, "info": "成功", "data":{ "title": "test2", "price": "1", "goods_brand_id": "1", "sn": "112345", "id": "1" } } <<< error ~~~ ## 编辑品牌 ~~~[api] post:/goods/edit *int:id=1000#商品Id *string:title=张三#商品名称 *int:goods_brand_id=1#商品品牌id *int:goods_type_id=1#商品分类id *int:price=1.11#商品零食价 int:sn=690000000#条形码 *int:state=1#状态 0-停业,1-营业 <<< success { "code": 0, "info": "成功", "data":{ "title": "test", "id": "1", "state": "0", "goods_brand_id": "2", "price": "20" } } <<< error ~~~ ## 生成商品sn ~~~[api] post:/goods/getsn <<< success { "code": 0, "info": "成功", "data": "2228467132170" } <<< error ~~~ ## 删除商品 ~~~[api] post:/goods/del *int:id=1000#商品Id <<< success { "code": 0, "info": "成功", "data": 1 } <<< error { "code": 14002, "info": "该商品下有销售记录,不能删除", "data": null } ~~~ ## 商品列表2 ~~~[api] post:/goods/getsearchlist *int:page=1#页码 *int:limit=10#每页显示个数 string:search= 搜索关键字#关键字 <<< success { "code": 0, "info": "成功", "data":[ { "id": 3, "title": "111请求", "sn": "2228770995988", "price": "2.01", "state": 1, "goods_brand_id": 5, "brand_title": "联想", "type_title": "手机" }, {"id": 1, "title": "11", "sn": "2225650482668", "price": "1.00",…} ] } <<< error ~~~ ## Excel导入商品 ~~~[api] post:/goods/importExcel *string:excel=文件# 上传的excel文件 <<< success data 有值说明有未上传成功的 data 为空说明全部上传成功 data 数组的key为Excel表格的横号 remark 为上传失败说明 { "code": 0, "info": "成功", "data":[ "2": { "A":"化妆品" "B":"佰草集" "C":"深润活颜洁面乳", "D":"6901294702509" "E":"120" "F":"1", "remark":"导入失败【sn已存在】" }, ] } <<< error ~~~