jiangqs
2023-09-04 c97706c3cc213b7db3d381e8a0435ff0ef9a04d6
ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
@@ -1318,8 +1318,8 @@
        SELECT
        COUNT(DISTINCT toc.user_id) orderPerson,
        COUNT(DISTINCT CASE WHEN tog.goods_type = 1 THEN toc.user_id ELSE NULL END) cyclePerson,
        COUNT(DISTINCT CASE WHEN tog.goods_type = 2 THEN toc.user_id ELSE NULL END) experiencePerson,
        COUNT(DISTINCT CASE WHEN tog.goods_type = 3 THEN toc.user_id ELSE NULL END) servicePerson
        COUNT(DISTINCT CASE WHEN tog.goods_type = 3 THEN toc.user_id ELSE NULL END) experiencePerson,
        COUNT(DISTINCT CASE WHEN tog.goods_type = 2 THEN toc.user_id ELSE NULL END) servicePerson
        FROM t_order toc
        INNER JOIN t_order_goods tog ON tog.order_id = toc.order_id
        WHERE toc.del_flag = 0 AND toc.order_from = 2 AND toc.order_status = 3 AND toc.new_member_flag = 1
@@ -1775,7 +1775,7 @@
    <select id="countUserActivityByActivity" resultType="java.lang.Integer">
        SELECT COUNT(order_id)
        FROM t_order
        WHERE del_flag = 0 AND order_from =2 AND user_id = #{userId} AND activity_id = #{activityId} AND order_status &gt; 0
        WHERE del_flag = 0 AND order_from =2 AND user_id = #{userId} AND activity_id = #{activityId} AND order_status &gt; 1
    </select>
    <select id="getStaffActivityOrderTotal" resultType="com.ruoyi.order.domain.vo.StaffActivityOrderTotalVo">