商品名称 查询问题
This commit is contained in:
@@ -95,10 +95,11 @@
|
|||||||
sum(tb_shop_prod_statistic.refund_count) AS refundCount,
|
sum(tb_shop_prod_statistic.refund_count) AS refundCount,
|
||||||
sum(tb_shop_prod_statistic.refund_amount) AS refundAmount
|
sum(tb_shop_prod_statistic.refund_amount) AS refundAmount
|
||||||
FROM
|
FROM
|
||||||
tb_shop_prod_statistic
|
tb_shop_prod_statistic statistic
|
||||||
|
INNER JOIN tb_product prod ON tb_shop_prod_statistic.prod_id = prod.id
|
||||||
WHERE
|
WHERE
|
||||||
tb_shop_prod_statistic.shop_id = #{shopId}
|
statistic.shop_id = #{shopId}
|
||||||
AND tb_shop_prod_statistic.create_day = #{day}
|
AND statistic.create_day = #{day}
|
||||||
<if test="productName != null and productName != ''">
|
<if test="productName != null and productName != ''">
|
||||||
AND prod.name LIKE CONCAT('%',#{productName},'%')
|
AND prod.name LIKE CONCAT('%',#{productName},'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -111,11 +112,12 @@
|
|||||||
sum(tb_shop_prod_statistic.refund_count) AS refundCount,
|
sum(tb_shop_prod_statistic.refund_count) AS refundCount,
|
||||||
sum(tb_shop_prod_statistic.refund_amount) AS refundAmount
|
sum(tb_shop_prod_statistic.refund_amount) AS refundAmount
|
||||||
FROM
|
FROM
|
||||||
tb_shop_prod_statistic
|
tb_shop_prod_statistic statistic
|
||||||
|
INNER JOIN tb_product prod ON statistic.prod_id = prod.id
|
||||||
WHERE
|
WHERE
|
||||||
tb_shop_prod_statistic.shop_id = #{shopId}
|
statistic.shop_id = #{shopId}
|
||||||
AND tb_shop_prod_statistic.create_day >= #{start}
|
AND statistic.create_day >= #{start}
|
||||||
AND tb_shop_prod_statistic.create_day <= #{end}
|
AND statistic.create_day <= #{end}
|
||||||
<if test="productName != null and productName != ''">
|
<if test="productName != null and productName != ''">
|
||||||
AND prod.name LIKE CONCAT('%',#{productName},'%')
|
AND prod.name LIKE CONCAT('%',#{productName},'%')
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
Reference in New Issue
Block a user