|
@@ -428,4 +428,48 @@
|
|
|
<include refid="queryPaymentOrder"/>
|
|
|
ORDER BY spo.id_ ASC
|
|
|
</select>
|
|
|
+ <resultMap id="SporadicChargeInfoDtoMap" type="com.ym.mec.biz.dal.dto.SporadicChargeInfoDto">
|
|
|
+ <result property="organName" column="organ_name_"/>
|
|
|
+ <result property="title" column="title_"/>
|
|
|
+ <result property="type" column="type_"/>
|
|
|
+ <result property="amount" column="amount_"/>
|
|
|
+ <result property="createTime" column="create_time_"/>
|
|
|
+ <result property="payTime" column="pay_time_"/>
|
|
|
+ <result property="username" column="username_"/>
|
|
|
+ <result property="payStatus" column="pay_status_"/>
|
|
|
+ </resultMap>
|
|
|
+ <select id="sporadicQueryPage" resultMap="SporadicChargeInfoDtoMap">
|
|
|
+ SELECT o.name_ organ_name_,sci.title_,sci.charge_type_ type_,
|
|
|
+ spo.actual_amount_ amount_,spo.create_time_,spo.pay_time_,su.username_,spo.status_ pay_status_
|
|
|
+ FROM student_payment_order spo
|
|
|
+ LEFT JOIN sys_user su ON spo.user_id_ = su.id_
|
|
|
+ LEFT JOIN organization o ON o.id_ = spo.organ_id_
|
|
|
+ LEFT JOIN sporadic_charge_info sci ON sci.id_ = spo.music_group_id_
|
|
|
+ WHERE spo.type_ = 'SPORADIC'
|
|
|
+ <include refid="sporadicQueryPageSql"/>
|
|
|
+ ORDER BY spo.id_ DESC
|
|
|
+ <include refid="global.limit"/>
|
|
|
+ </select>
|
|
|
+ <select id="countSporadicPage" resultType="java.lang.Integer">
|
|
|
+ SELECT COUNT(spo.id_)
|
|
|
+ FROM student_payment_order spo
|
|
|
+ LEFT JOIN sys_user su ON spo.user_id_ = su.id_
|
|
|
+ LEFT JOIN sporadic_charge_info sci ON sci.id_ = spo.music_group_id_
|
|
|
+ WHERE spo.type_ = 'SPORADIC'
|
|
|
+ <include refid="sporadicQueryPageSql"/>
|
|
|
+ </select>
|
|
|
+ <sql id="sporadicQueryPageSql">
|
|
|
+ <if test="organId != null">
|
|
|
+ AND FIND_IN_SET(spo.organ_id_,#{organId})
|
|
|
+ </if>
|
|
|
+ <if test="search != null">
|
|
|
+ AND (sci.title_ LIKE CONCAT('%',#{search},'%') OR su.username_ LIKE CONCAT('%',#{search},'%'))
|
|
|
+ </if>
|
|
|
+ <if test="chargeType != null">
|
|
|
+ AND sci.charge_type_ = #{chargeType}
|
|
|
+ </if>
|
|
|
+ <if test="payStatus != null">
|
|
|
+ AND spo.status_ = #{payStatus}
|
|
|
+ </if>
|
|
|
+ </sql>
|
|
|
</mapper>
|