|
|
@@ -284,6 +284,9 @@
|
|
|
<foreach collection="po.channelIds" item="id" open="(" separator="," close=")">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
+ <if test="po.userAttrType != null and po.userAttrType != 0">
|
|
|
+ AND e.user_attr_type=#{po.userAttrType}
|
|
|
+ </if>
|
|
|
<if test="po.skuId != null or (po.skuName != null and po.skuName != '') or (po.spec != null and po.spec != '')">
|
|
|
and a.order_number in(SELECT a.order_number FROM tz_order_item a LEFT JOIN tz_sku b on a.sku_id=b.sku_id
|
|
|
<where>
|
|
|
@@ -298,9 +301,6 @@
|
|
|
<if test="po.spec != null and po.spec != ''">
|
|
|
AND b.spec like concat('%',#{po.spec} ,'%')
|
|
|
</if>
|
|
|
- <if test="po.userAttrType != null and po.userAttrType != 0">
|
|
|
- AND e.user_attr_type=#{po.userAttrType}
|
|
|
- </if>
|
|
|
</where>
|
|
|
)
|
|
|
</if>
|
|
|
@@ -309,7 +309,7 @@
|
|
|
(SELECT IFNULL(SUM( total_offset_points ),0) FROM (SELECT
|
|
|
CASE
|
|
|
WHEN refund_type=1 THEN total_offset_points
|
|
|
- ELSE total_offset_points+ (freight_amount * 100)
|
|
|
+ ELSE total_offset_points
|
|
|
END AS total_offset_points
|
|
|
FROM tz_order_refund a
|
|
|
LEFT JOIN tz_user e on a.user_id=e.user_id
|