Quellcode durchsuchen

订单字典开发统计

zhangxin vor 1 Woche
Ursprung
Commit
efd2743db1
1 geänderte Dateien mit 4 neuen und 0 gelöschten Zeilen
  1. 4 0
      yami-shop-service/src/main/resources/mapper/OrderMapper.xml

+ 4 - 0
yami-shop-service/src/main/resources/mapper/OrderMapper.xml

@@ -550,6 +550,7 @@
         SELECT count(1) FROM tz_order a
         LEFT JOIN tz_user_addr_order b on a.addr_order_id=b.addr_order_id
         LEFT JOIN tz_shop_detail c on a.shop_id=c.shop_id
+        left join  tz_user d on a.user_id = d.user_id
         <where>
             <if test="orderParam.orderNumber != null and orderParam.orderNumber != ''">
                 and a.order_number = #{orderParam.orderNumber}
@@ -563,6 +564,9 @@
             <if test="orderParam.dvyType != null and orderParam.dvyType != ''">
                 and a.dvy_type = #{orderParam.dvyType}
             </if>
+            <if test="orderParam.userAttrType != null and orderParam.userAttrType != '' and orderParam.userAttrType != 0">
+                AND d.user_attr_type = #{orderParam.userAttrType}
+            </if>
             <if test="orderParam.shopId != null">
                 and a.shop_id = #{orderParam.shopId}
             </if>