商品库 curd
<h4>简要描述</h4>
<ul>
<li>获取题目详情</li>
</ul>
<h2>商品列表</h2>
<h5>请求URL</h5>
<ul>
<li><code>{{BASE_URL}}/api/goods/LiveGoods/index</code>
<h5>请求方式</h5></li>
<li>GET</li>
</ul>
<h5>请求参数</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">page</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">int</td>
<td>页码</td>
</tr>
<tr>
<td style="text-align: left;">limit</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">int</td>
<td>每页个数</td>
</tr>
<tr>
<td style="text-align: left;">title</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">string</td>
<td>商品名称搜索</td>
</tr>
</tbody>
</table>
<h5>返回示例</h5>
<pre><code>{
"code": 20000,
"msg": "success",
"time": "2021-12-31 10:03:19",
"data": {
"list": [
{
"id": 2,
"title": "2个金属小抓夹",
"daySevenSales": 145000,
"daySevenViews": 453000,
"daySevenConversionRate": 32,
"visitors": 972000,
"totalSales": 251000,
"livePrice": "9.90",
"retailPrice": "21.00",
"profitMargin": 2,
"demand": 9922,
"favorableRating": 92,
"afterBuyingRate": 15.36,
"stock": 15200,
"brand": "知名大牌",
"status": 1,
"addTime": "2021-12-31 09:31:09",
"updateTime": "2021-12-31 09:35:48"
},
{
"id": 10,
"title": "真喜利克拉戒指",
"daySevenSales": 4100,
"daySevenViews": 3700,
"daySevenConversionRate": 11,
"visitors": 27000,
"totalSales": 5253,
"livePrice": "399.00",
"retailPrice": "0.00",
"profitMargin": 83,
"demand": 208,
"favorableRating": 91.8,
"afterBuyingRate": 6.53,
"stock": 5000,
"brand": "知名大牌",
"status": 1,
"addTime": "2021-12-31 09:50:10",
"updateTime": "2021-12-31 09:50:10"
},
{
"id": 12,
"title": "妍惠一款两戴项链",
"daySevenSales": 21000,
"daySevenViews": 167000,
"daySevenConversionRate": 12,
"visitors": 49000,
"totalSales": 22000,
"livePrice": "19.90",
"retailPrice": "129.00",
"profitMargin": 5,
"demand": 3220,
"favorableRating": 85.6,
"afterBuyingRate": 2.36,
"stock": 21000,
"brand": "驰名品牌",
"status": 1,
"addTime": "2021-12-31 10:00:28",
"updateTime": "2021-12-31 10:00:28"
}
],
"count": 3
}
}</code></pre>
<h2>商品增加/修改</h2>
<h5>请求URL</h5>
<ul>
<li><code>{{BASE_URL}}/api/goods/LiveGoods/add</code></li>
<li><code>{{BASE_URL}}/api/goods/LiveGoods/edit/{id}</code>
<h5>请求方式</h5></li>
<li>POST</li>
</ul>
<h5>请求参数</h5>
<pre><code>{
"title": "真喜利克拉戒指2", #商品名称
"daySevenSales": 4100, #7天商品总销量
"daySevenViews": 3700, #7天商品总浏览量
"daySevenConversionRate": 11.01, #7天商品转化率
"visitors": 27000, #商品总访客数
"totalSales": 5253, #商品总销量
"livePrice": 399.00, #直播间价格
"retailPrice": 499.00, #日常零售价格
"profitMargin": 83, #利润率
"demand": 208, #预计市场需求量
"favorableRating": 91.80, #好评率
"afterBuyingRate": 6.53, #复购率
"stock": 5000, #库存量
"brand": "知名大牌" #品牌知名度
}</code></pre>
<ul>
<li>参数中每个字段都是必填字段, 品牌知名度固定(新生品牌、一般品牌、知名大牌、驰名品牌)</li>
</ul>
<h5>返回示例</h5>
<pre><code>{
"code": 20000,
"msg": "success",
"time": "2021-12-31 10:00:28",
"data": {
"result": {
"title": "妍惠一款两戴项链",
"day_seven_sales": 21000,
"day_seven_views": 167000,
"day_seven_conversion_rate": 12.27,
"visitors": 49000,
"total_sales": 22000,
"live_price": 19.9,
"retail_price": 129,
"profit_margin": 5,
"demand": 3220,
"favorable_rating": 85.6,
"after_buying_rate": 2.36,
"stock": 21000,
"brand": "驰名品牌",
"add_time": "2021-12-31 10:00:28",
"update_time": "2021-12-31 10:00:28",
"id": "12"
}
}
}</code></pre>
<h2>商品删除</h2>
<h5>请求URL</h5>
<ul>
<li><code>{{BASE_URL}}/api/goods/LiveGoods/del/{ids}</code>
<h5>请求方式</h5></li>
<li>GET</li>
</ul>
<h5>请求参数</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">ids</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td>商品id,多个id使用 逗号分隔</td>
</tr>
</tbody>
</table>
<h5>返回示例</h5>
<pre><code>{
"code": 20000,
"msg": "success",
"time": "2021-12-31 10:03:07",
"data": {
"count": 3
}
}</code></pre>