feat(mall): 商品统计增加规格信息
- 在 AdminGoodsStatisticsVo 中添加 skuName 字段
- 在商品统计表格中增加规格列
- 修改 SQL 查询,按 sku_id 分组并排序
| | |
| | | @Data |
| | | @ApiModel(value = "AdminGoodsStatisticsVo", description = "信息返回类") |
| | | public class AdminGoodsStatisticsVo { |
| | | private String skuName; |
| | | private String goodsName; |
| | | private Integer goodsCnt; |
| | | } |
| | |
| | | <select id="getGoodsStatisticsInPage" resultType="cc.mrbird.febs.mall.vo.AdminGoodsStatisticsVo"> |
| | | select |
| | | goods_name goodsName, |
| | | sku_name skuName, |
| | | SUM(cnt) goodsCnt |
| | | from mall_order_item |
| | | <where> |
| | |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | GROUP BY goods_id |
| | | ORDER BY goods_id desc |
| | | GROUP BY sku_id |
| | | ORDER BY sku_id desc |
| | | </select> |
| | | |
| | | <select id="selectAmountOrTeamAmount" resultType="java.math.BigDecimal"> |
| | |
| | | toolbar: '#tableToolBarOrderSatistics', |
| | | cols: [[ |
| | | {field: 'goodsName', title: '商品名称', minWidth: 130}, |
| | | {field: 'skuName', title: '规格', minWidth: 130}, |
| | | {field: 'goodsCnt', title: '总数', minWidth: 130} |
| | | ]] |
| | | }); |