yujian
2019-08-01 5410f502f15dcccd1b5f740d3c294f2c9b750c6d
后台订单bug处理
2个文件已修改
69 ■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/entity/jd/JDGoods.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderMapper.xml 61 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/jd/JDGoods.java
@@ -1,5 +1,6 @@
package com.yeshi.fanli.entity.jd;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
@@ -15,7 +16,12 @@
 * @author Administrator
 *
 */
public class JDGoods {
public class JDGoods implements Serializable{
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    private JDCategoryInfo categoryInfo;// 类目信息
    private Long comments;// 评论数
    private JDCommissionInfo commissionInfo;// 佣金信息
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}]]>