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