|
@@ -47,18 +47,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectList" parameterType="com.zhongzheng.modules.order.bo.OrderInputQueryBo" resultMap="OrderInputVoResult">
|
|
|
SELECT u.input_order_sn,
|
|
|
- any_value (u.user_num ) user_num,
|
|
|
+ count( DISTINCT u.user_id ) user_num,
|
|
|
count( DISTINCT og.goods_id ) goods_num,
|
|
|
any_value ( cet.education_name ) education_name,
|
|
|
any_value ( cpt.project_name ) project_name,
|
|
|
any_value ( cb.business_name ) business_name,
|
|
|
sum( og.goods_received ) goods_received,
|
|
|
- any_value (u.order_price ) order_price,
|
|
|
- any_value (u.pay_price) pay_price,
|
|
|
+ sum(u.order_price ) order_price,
|
|
|
+ sum(u.pay_price) pay_price,
|
|
|
any_value ( u.create_username ) create_username,
|
|
|
any_value ( u.create_time ) create_time FROM (SELECT
|
|
|
oi.*,
|
|
|
- count( DISTINCT o.user_id ) user_num,
|
|
|
+ o.user_id,
|
|
|
sum( o.order_price ) order_price,
|
|
|
sum( o.pay_price ) pay_price,
|
|
|
o.order_sn
|
|
@@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="endTime != null and endTime != ''">
|
|
|
AND #{endTime} >= oi.create_time
|
|
|
</if>
|
|
|
- GROUP BY oi.id,o.order_sn)u LEFT JOIN order_goods og ON u.order_sn = og.order_sn
|
|
|
+ GROUP BY oi.id,o.order_sn,o.user_id)u LEFT JOIN order_goods og ON u.order_sn = og.order_sn
|
|
|
LEFT JOIN course_education_type cet ON u.education_type_id = cet.id
|
|
|
LEFT JOIN course_project_type cpt ON u.project_id = cpt.id
|
|
|
LEFT JOIN course_business cb ON u.business_id = cb.id
|