提交 3389af47 authored 作者: 吴德鹏's avatar 吴德鹏

分类商品数量统计

上级 5240269f
......@@ -56,6 +56,16 @@ public class TbCfDescripitonEntity implements Serializable {
*/
private String twoType;
private Integer count;
public Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
public String getType() {
return type;
}
......
......@@ -34,6 +34,16 @@ public class TbCfGoodstypeEntity implements Serializable {
*/
private String goodstypeImage;
private Integer count;
public Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
/**
* 设置:商品分类Id
*/
......
......@@ -25,6 +25,16 @@ public class GoodsTypeToGoodsTwo implements Serializable {
private String goodstwotypeUrl;
private Integer count;
public Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
public String getGoodstwotypeUrl() {
return goodstwotypeUrl;
}
......
......@@ -58,9 +58,11 @@
d.postage,
d.more_postage,
o.goodstype_title type,
t.goodstwotype_title twoType
t.goodstwotype_title twoType,
t.count count
from tb_cf_descripiton d left join tb_cf_goodstype o on d.goodstype_id=o.goodstype_id left join
tb_cf_goodstwotype t on d.goodstwotype_id=t.goodstwotype_id
left join (select count(*) count,c.item_descrition_id from tb_cf_station_item c GROUP BY item_descrition_id ) t on d.descripition_id=t.item_descrition_id
WHERE 1=1
<if test="name != null and name.trim() != ''">
AND descripition_name LIKE concat('%',#{name},'%')
......
......@@ -63,9 +63,12 @@
tw.`goodstwotype_title`,
tw.`goodstwotype_url`,
ds.`goodstype_id`,
ds.`goodstype_title`
FROM tb_cf_goodstwotype tw
ds.`goodstype_title`,
t.count count
FROM
tb_cf_goodstwotype tw
INNER JOIN tb_cf_goodstype ds ON ds.goodstype_id = tw.goodstype_id
INNER JOIN ( SELECT count( * ) count, c.item_categorytwo FROM tb_cf_station_item c GROUP BY item_categorytwo ) t ON tw.goodstwotype_id = t.item_categorytwo
WHERE 1=1
<if test="name != null and name.trim() != ''">
AND goodstwotype_title LIKE concat('%',#{name},'%')
......
......@@ -34,13 +34,12 @@
</select>
<select id="queryList" resultType="com.platform.entity.TbCfGoodstypeEntity">
select
`goodstype_id`,
`goodstype_title`,
`goodstype_sort`,
`goodstype_url`,
`goodstype_image`
from tb_cf_goodstype
SELECT
*
FROM
tb_cf_goodstype g
INNER JOIN ( SELECT count( * ) count, c.item_category FROM tb_cf_station_item c GROUP BY item_category ) t
ON g.goodstype_id = t.item_category
WHERE 1=1
<if test="name != null and name.trim() != ''">
AND goodstype_title LIKE concat('%',#{name},'%')
......
......@@ -9,7 +9,8 @@ $(function () {
{label: '商品一级分类', name: 'type', index: 'type', width: 80},
{label: '商品二级分类', name: 'twoType', index: 'twoType', width: 80},
{label: '单件邮费', name: 'postage', index: 'postage', width: 80},
{label: '续件邮费', name: 'morePostage', index: 'more_postage', width: 80}]
{label: '续件邮费', name: 'morePostage', index: 'more_postage', width: 80},
{label: '商品数量', name: 'count', index: 'count', width: 80}]
});
});
......
......@@ -5,7 +5,8 @@ $(function () {
{label: 'ID', name: 'goodstwotypeId', index: 'goodstwotype_id', key: true},
{label: '商品一级分类', name: 'goodstypeTitle', index: 'goodstype_title', width: 80},
{label: '商品二级分类', name: 'goodstwotypeTitle', index: 'goodstwotype_title', width: 80},
{label: '二级分类图片', name: 'goodstwotypeUrl', index: 'goodstwotype_url', width: 80, formatter: imageFormat}],
{label: '二级分类图片', name: 'goodstwotypeUrl', index: 'goodstwotype_url', width: 80, formatter: imageFormat},
{label: '商品数量', name: 'count', index: 'count', width: 80}],
shrinkToFit: true,
datatype: "json",
rowNum: 15,
......
......@@ -5,7 +5,9 @@ $(function () {
{label: 'ID', name: 'goodstypeId', index: 'goodstype_id', key: true,hidden: true},
{label: '商品一级分类', name: 'goodstypeTitle', index: 'goodstype_title', width: 80},
{label: '排序编号', name: 'goodstypeSort', index: 'goodstype_sort', width: 80},
{label: '一级分类图片', name: 'goodstypeImage', index: 'goodstype_image', width: 80, formatter: imageFormat}],
{label: '一级分类图片', name: 'goodstypeImage', index: 'goodstype_image', width: 80, formatter: imageFormat},
{label: '商品数量', name: 'count', index: 'count', width: 80}
],
shrinkToFit: true,
datatype : "json",
rowNum:15,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论