yujian
2019-01-08 a79be5c75d4409bd14a36b648c1a398b409cad65
fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderMapper.xml
@@ -90,8 +90,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">
@@ -307,8 +307,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>
@@ -409,9 +410,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.*,tc.co_id
      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