|
@@ -18,6 +18,12 @@
|
|
|
<result column="orig_payment_order_id_" property="origPaymentOrderId"/>
|
|
|
<result column="remark_" property="remark"/>
|
|
|
</resultMap>
|
|
|
+
|
|
|
+ <resultMap type="com.ym.mec.biz.dal.entity.StudentApplyRefunds" extends="StudentApplyRefunds" id="StudentApplyRefundsListDTO">
|
|
|
+ <result column="spo.expect_amount_" property="studentPaymentOrder.expectAmount"/>
|
|
|
+ <result column="spo.actual_amount_" property="studentPaymentOrder.actualAmount"/>
|
|
|
+ <result column="u.username_" property="user.username"/>
|
|
|
+ </resultMap>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
|
<select id="get" resultMap="StudentApplyRefunds">
|
|
@@ -80,13 +86,27 @@
|
|
|
</delete>
|
|
|
|
|
|
<!-- 分页查询 -->
|
|
|
- <select id="queryPage" resultMap="StudentApplyRefunds" parameterType="map">
|
|
|
- SELECT * FROM student_apply_refunds ORDER BY id_
|
|
|
- <include refid="global.limit"/>
|
|
|
+ <select id="queryPage" resultMap="StudentApplyRefundsListDTO" parameterType="map">
|
|
|
+ SELECT sar.*,spo.expect_amount_,spo.actual_amount_,u.username_ FROM student_apply_refunds sar left join student_payment_order spo on sar.orig_payment_order_id_ = spo.id_ left join sys_user u on sar.user_id_ = u.id_
|
|
|
+ where 1=1
|
|
|
+ <if test="startTime != null">
|
|
|
+ and sar.create_time_ >= #{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null">
|
|
|
+ and sar.create_time_ <= #{endTime}
|
|
|
+ </if>
|
|
|
+ ORDER BY sar.id_ <include refid="global.limit"/>
|
|
|
</select>
|
|
|
|
|
|
<!-- 查询当前表的总记录数 -->
|
|
|
<select id="queryCount" resultType="int">
|
|
|
- SELECT COUNT(*) FROM student_apply_refunds
|
|
|
+ SELECT count(1) FROM student_apply_refunds sar left join student_payment_order spo on sar.orig_payment_order_id_ = spo.id_
|
|
|
+ where 1=1
|
|
|
+ <if test="startTime != null">
|
|
|
+ and sar.create_time_ = #{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null">
|
|
|
+ and sar.create_time_ = #{endTime}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
</mapper>
|