From 85b08b045c79180a81abd43be0ac7fd2ae50cd46 Mon Sep 17 00:00:00 2001
From: yujian <yujian>
Date: 星期二, 08 一月 2019 16:41:14 +0800
Subject: [PATCH] 后台数据统计+ 订单接口统计类型调整

---
 fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderMapper.xml |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderMapper.xml
index c3c3438..073be7f 100644
--- a/fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderMapper.xml
+++ b/fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderMapper.xml
@@ -89,8 +89,8 @@
 			jdbcType="TIMESTAMP" />
 
 		<result column="totalCount" property="totalCount" jdbcType="INTEGER" />
-		<result column="totalSettlement" property="totalSettlement"
-			jdbcType="DECIMAL" />
+		<result column="totalSettlement" property="totalSettlement" jdbcType="DECIMAL" />
+		<result column="totalPayment" property="totalPayment" jdbcType="DECIMAL" />
 
 		<association property="userInfo" column="co_uid"
 			resultMap="com.yeshi.fanli.dao.mybatis.UserInfoMapper.BaseResultMap">
@@ -298,8 +298,9 @@
 			yeshi_ec_hongbao_order tr ON tr.`ho_order_id` = tc.`co_id`
 			LEFT JOIN
 			yeshi_ec_hongbao_v2 th ON (tr.`ho_hongbao_id` = th.`hb_id` OR
-			th.`hb_pid` = tr.`ho_hongbao_id` )
-			WHERE th.`hb_uid` = #{uid} 	AND th.hb_state = 3 AND (tc.co_state = 1 or tc.co_state = 2)
+				th.`hb_pid` = tr.`ho_hongbao_id` )
+			WHERE th.`hb_uid` = #{uid} 	
+				AND (th.hb_state = 1 OR th.hb_state = 2 OR th.hb_state = 3)
 			<if test="type != null and type == 1"> <!-- 鑷喘璁㈠崟 -->
 				AND (th.hb_type =1 or th.hb_type =2)
 			</if>
@@ -400,9 +401,8 @@
 
 	<select id="listByOrderNoAndType" resultMap="ResultMap"
 		parameterType="java.util.List">
-		SELECT COALESCE(SUM(tc.`co_settlement`),0)AS
-		totalSettlement,COALESCE(SUM(tc.`co_count`),0)AS
-		totalCount,tc.`co_source_type`,tc.`co_order_no`,tg.*
+		SELECT COALESCE(SUM(tc.`co_payment`),0)AS totalPayment,COALESCE(SUM(tc.`co_settlement`),0)AS totalSettlement,
+			COALESCE(SUM(tc.`co_count`),0)AS totalCount,tc.`co_source_type`,tc.`co_order_no`,tg.*
 		FROM
 		yeshi_ec_common_order_goods tg
 		LEFT JOIN yeshi_ec_common_order tc ON

--
Gitblit v1.8.0