Browse Source

statistics add userAttrType

wangming 1 week ago
parent
commit
4ab2bad420
1 changed files with 3 additions and 3 deletions
  1. 3 3
      yami-shop-service/src/main/resources/mapper/SkuMapper.xml

+ 3 - 3
yami-shop-service/src/main/resources/mapper/SkuMapper.xml

@@ -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>