| | |
| | | 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 |
| | |
| | | <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 > 0 |
| | | WHERE del_flag = 0 AND order_from =2 AND user_id = #{userId} AND activity_id = #{activityId} AND order_status > 1 |
| | | </select> |
| | | |
| | | <select id="getStaffActivityOrderTotal" resultType="com.ruoyi.order.domain.vo.StaffActivityOrderTotalVo"> |