From 292937c16f7ad0021b8cd2dfb8fcc0cdf26f59de Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期四, 01 八月 2019 15:15:21 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div --- fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderMapper.xml | 61 ++++++++++++++++++++++++++---- 1 files changed, 53 insertions(+), 8 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 864000c..bc363c5 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 @@ -99,6 +99,7 @@ <result column="hb_id" property="hongbaoId" jdbcType="BIGINT" /> <result column="co_trade_id" property="tradeId" jdbcType="VARCHAR" /> + <association property="userInfo" column="co_uid" resultMap="com.yeshi.fanli.dao.mybatis.UserInfoMapper.BaseResultMap" /> @@ -106,6 +107,52 @@ resultMap="com.yeshi.fanli.dao.mybatis.order.CommonOrderGoodsMapper.BaseResultMap" /> </resultMap> + + + <resultMap id="ThreeResultMap" type="com.yeshi.fanli.vo.order.CommonOrderVO"> + <id column="co_id" property="id" jdbcType="BIGINT" /> + <result column="co_order_no" property="orderNo" jdbcType="VARCHAR" /> + <result column="co_source_type" property="sourceType" jdbcType="INTEGER" /> + <result column="co_source_position" property="sourcePosition" + jdbcType="VARCHAR" /> + <result column="co_count" property="count" jdbcType="INTEGER" /> + <result column="co_state" property="state" jdbcType="INTEGER" /> + <result column="co_state_whole_order" property="stateWholeOrder" + jdbcType="INTEGER" /> + <result column="co_estimate" property="estimate" jdbcType="DECIMAL" /> + <result column="co_eIncome" property="eIncome" jdbcType="DECIMAL" /> + <result column="co_payment" property="payment" jdbcType="DECIMAL" /> + <result column="co_settlement" property="settlement" jdbcType="DECIMAL" /> + <result column="co_third_create_time" property="thirdCreateTime" + jdbcType="TIMESTAMP" /> + <result column="co_settle_time" property="settleTime" jdbcType="TIMESTAMP" /> + <result column="co_order_by" property="orderBy" jdbcType="INTEGER" /> + <result column="co_create_time" property="createTime" jdbcType="TIMESTAMP" /> + <result column="co_update_time" property="updateTime" jdbcType="TIMESTAMP" /> + <result column="totalMoney" property="hongBao" jdbcType="DECIMAL" /> + <result column="couponMoney" property="couponMoney" jdbcType="DECIMAL" /> + <result column="hongBaoState" property="hongBaoState" jdbcType="INTEGER" /> + <result column="hongBaoType" property="hongBaoType" jdbcType="INTEGER" /> + <result column="accountTime" property="accountTime" jdbcType="TIMESTAMP" /> + <result column="preAccountTime" property="preAccountTime" + jdbcType="TIMESTAMP" /> + <result column="totalCount" property="totalCount" jdbcType="INTEGER" /> + <result column="totalSettlement" property="totalSettlement" + jdbcType="DECIMAL" /> + <result column="totalPayment" property="totalPayment" jdbcType="DECIMAL" /> + <result column="userId" property="userId" jdbcType="VARCHAR" /> + <result column="userName" property="userName" jdbcType="VARCHAR" /> + <result column="userPortrait" property="userPortrait" jdbcType="VARCHAR" /> + <result column="hb_id" property="hongbaoId" jdbcType="BIGINT" /> + <result column="co_trade_id" property="tradeId" jdbcType="VARCHAR" /> + + <association property="userInfo" column="co_uid" + select="com.yeshi.fanli.dao.mybatis.UserInfoMapper.selectByPKey"/> + + <association property="commonOrderGoods" column="co_order_goods_id" + select="com.yeshi.fanli.dao.mybatis.order.CommonOrderGoodsMapper.selectByPrimaryKey"/> + </resultMap> + <sql id="Base_Column_List">co_id,co_uid,co_order_no,co_source_type,co_source_position,co_order_goods_id,co_count,co_state,co_state_whole_order,co_estimate,co_eIncome,co_payment,co_settlement,co_third_create_time,co_settle_time,co_order_by,co_create_time,co_update_time,co_trade_id </sql> <select id="selectByPrimaryKey" resultMap="BaseResultMap" @@ -688,21 +735,20 @@ #{orderNo} AND co.co_state<![CDATA[<>]]> 4 AND v2.hb_uid = #{uid} ORDER BY co.`co_state` DESC LIMIT 1 </select> - <select id="listQuery" resultMap="ResultMap"> + <select id="listQuery" resultMap="ThreeResultMap"> SELECT A.*,u.id AS userId,u.`nick_name` AS userName,u.`portrait` AS userPortrait FROM (SELECT hb.hb_id,hb.hb_uid,hb.`hb_money` AS totalMoney, hb.hb_state AS hongBaoState, hb.`hb_type` AS hongBaoType, hb.`hb_get_time` AS accountTime, hb.`hb_pre_get_time` AS - preAccountTime, co.*,cog.* FROM yeshi_ec_hongbao_order ho LEFT JOIN + preAccountTime, co.* FROM yeshi_ec_hongbao_order ho LEFT JOIN (SELECT * FROM yeshi_ec_hongbao_v2 v2 WHERE 1=1 <include refid="SELECT_PARAM_HONGBAO_TYPE" /> <!-- 绾㈠寘绫诲瀷 --> <include refid="SELECT_HONGBAO_STATE" /> <!-- 绾㈠寘鐘舵�� --> )hb ON IF(hb.hb_pid IS NULL,hb.hb_id,hb.hb_pid)=ho.`ho_hongbao_id` - LEFT JOIN yeshi_ec_common_order co ON co.`co_id`=ho.`ho_order_id` LEFT - JOIN yeshi_ec_common_order_goods cog ON cog.`cog_id`= - co.`co_order_goods_id` WHERE hb.hb_id IS NOT NULL + LEFT JOIN yeshi_ec_common_order co ON co.`co_id`=ho.`ho_order_id` + WHERE hb.hb_id IS NOT NULL <include refid="SELECT_PARAM_ORDER_STATE" /> <!-- 璁㈠崟鐘舵�� --> <if test="startTime != null and startTime != '' ">AND <![CDATA[co.co_third_create_time >= #{startTime}]]> @@ -726,9 +772,8 @@ <include refid="SELECT_HONGBAO_STATE" /> <!-- 绾㈠寘鐘舵�� --> )hb ON IF(hb.hb_pid IS NULL,hb.hb_id,hb.hb_pid)=ho.`ho_hongbao_id` - LEFT JOIN yeshi_ec_common_order co ON co.`co_id`=ho.`ho_order_id` LEFT - JOIN yeshi_ec_common_order_goods cog ON cog.`cog_id`= - co.`co_order_goods_id` WHERE hb.hb_id IS NOT NULL + LEFT JOIN yeshi_ec_common_order co ON co.`co_id`=ho.`ho_order_id` + WHERE hb.hb_id IS NOT NULL <include refid="SELECT_PARAM_ORDER_STATE" /> <!-- 璁㈠崟鐘舵�� --> <if test="startTime != null and startTime != '' ">AND <![CDATA[co.co_third_create_time >= #{startTime}]]> -- Gitblit v1.8.0