|  | @@ -29,16 +29,17 @@
 | 
	
		
			
				|  |  |          <result column="user_id_" property="userId"/>
 | 
	
		
			
				|  |  |          <result column="payment_channel_" property="paymentChannel"/>
 | 
	
		
			
				|  |  |          <result column="mer_no_" property="merNo"/>
 | 
	
		
			
				|  |  | +        <result column="status_" property="status"/>
 | 
	
		
			
				|  |  |          <result column="sell_time_" property="sellTime"/>
 | 
	
		
			
				|  |  |          <result column="create_ime_" property="createIme"/>
 | 
	
		
			
				|  |  |          <result column="update_time_" property="updateTime"/>
 | 
	
		
			
				|  |  | +        <result column="receive_status_" property="receiveStatus"/>
 | 
	
		
			
				|  |  |      </resultMap>
 | 
	
		
			
				|  |  |      <sql id="Base_Column_List">
 | 
	
		
			
				|  |  |          <!--@mbg.generated-->
 | 
	
		
			
				|  |  |          id_, edu_teacher_id_,organ_id_, cooperation_organ_id_, trans_no_,order_id_, order_no_, expect_amount_,
 | 
	
		
			
				|  |  | -        actual_amount_,
 | 
	
		
			
				|  |  | -        balance_amount_, sell_cost_, sell_cost2_, type_, goods_id_,goods_name_, num_, user_id_, payment_channel_,
 | 
	
		
			
				|  |  | -        mer_no_, sell_time_, create_ime_, update_time_
 | 
	
		
			
				|  |  | +        actual_amount_,balance_amount_, sell_cost_, sell_cost2_, type_, goods_id_,goods_name_, num_, user_id_,
 | 
	
		
			
				|  |  | +        payment_channel_,mer_no_,batch_no_,stock_type_,account_type_,status_, sell_time_, create_ime_, update_time_
 | 
	
		
			
				|  |  |      </sql>
 | 
	
		
			
				|  |  |      <select id="get" parameterType="java.lang.Integer" resultMap="SellOrder">
 | 
	
		
			
				|  |  |          <!--@mbg.generated-->
 | 
	
	
		
			
				|  | @@ -129,6 +130,9 @@
 | 
	
		
			
				|  |  |              <if test="accountType != null">
 | 
	
		
			
				|  |  |                  account_type_ = #{accountType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
 | 
	
		
			
				|  |  |              </if>
 | 
	
		
			
				|  |  | +            <if test="status != null">
 | 
	
		
			
				|  |  | +                status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  |              <if test="sellTime != null">
 | 
	
		
			
				|  |  |                  sell_time_ = #{sellTime},
 | 
	
		
			
				|  |  |              </if>
 | 
	
	
		
			
				|  | @@ -159,12 +163,13 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <!-- 分页查询 -->
 | 
	
		
			
				|  |  |      <select id="queryPage" resultMap="SellOrder" parameterType="map">
 | 
	
		
			
				|  |  | -        SELECT so.*,su.username_ user_name_,su.phone_,o.name_ organ_name_,co.name_ school_name_,t.real_name_ eduTeacher
 | 
	
		
			
				|  |  | +        SELECT so.*,su.username_ user_name_,su.phone_,o.name_ organ_name_,co.name_ school_name_,t.real_name_ eduTeacher,spo.receive_status_
 | 
	
		
			
				|  |  |          FROM sell_order so
 | 
	
		
			
				|  |  |          LEFT JOIN sys_user su ON so.user_id_ = su.id_
 | 
	
		
			
				|  |  |          LEFT JOIN organization o ON o.id_ = so.organ_id_
 | 
	
		
			
				|  |  |          LEFT JOIN cooperation_organ co ON co.id_= so.cooperation_organ_id_
 | 
	
		
			
				|  |  |          LEFT JOIN sys_user t ON t.id_ = so.edu_teacher_id_
 | 
	
		
			
				|  |  | +        LEFT JOIN student_payment_order spo ON so.order_id_ = spo.id_
 | 
	
		
			
				|  |  |          <include refid="queryPageSql"/>
 | 
	
		
			
				|  |  |          ORDER BY so.create_ime_ DESC
 | 
	
		
			
				|  |  |          <include refid="global.limit"/>
 | 
	
	
		
			
				|  | @@ -173,6 +178,7 @@
 | 
	
		
			
				|  |  |      <!-- 查询当前表的总记录数 -->
 | 
	
		
			
				|  |  |      <select id="queryCount" resultType="int">
 | 
	
		
			
				|  |  |          SELECT COUNT(*) FROM sell_order so
 | 
	
		
			
				|  |  | +        LEFT JOIN student_payment_order spo ON so.order_id_ = spo.id_
 | 
	
		
			
				|  |  |          <include refid="queryPageSql"/>
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -190,8 +196,14 @@
 | 
	
		
			
				|  |  |              <if test="cooperationOrganId != null">
 | 
	
		
			
				|  |  |                  AND so.cooperation_organ_id_ = #{cooperationOrganId}
 | 
	
		
			
				|  |  |              </if>
 | 
	
		
			
				|  |  | +            <if test="status != null">
 | 
	
		
			
				|  |  | +                AND so.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  |              <if test="type != null">
 | 
	
		
			
				|  |  | -                AND so.type_ = #{type}
 | 
	
		
			
				|  |  | +                AND so.type_ = #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="receiveStatus != null and receiveStatus != ''">
 | 
	
		
			
				|  |  | +                AND spo.receive_status_ = #{receiveStatus}
 | 
	
		
			
				|  |  |              </if>
 | 
	
		
			
				|  |  |              <if test="startTime != null">
 | 
	
		
			
				|  |  |                  AND so.sell_time_ >= #{startTime}
 |