|
@@ -87,7 +87,7 @@
|
|
|
per_amount_,
|
|
|
balance_payment_amount_, remit_fee_, trans_no_,
|
|
|
status_, memo_, create_time_, update_time_, payment_channel_, payment_business_channel_,
|
|
|
- payment_account_no_, mer_nos_, order_no_, music_group_id_, class_group_id_,pay_time_)
|
|
|
+ payment_account_no_, mer_nos_, order_no_, music_group_id_, class_group_id_, pay_time_)
|
|
|
VALUES (#{id}, #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
#{userId}, #{organId}, #{routingOrganId},
|
|
|
#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
@@ -96,7 +96,7 @@
|
|
|
#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, #{memo}, now(), now(),
|
|
|
#{paymentChannel}, #{paymentBusinessChannel}, #{paymentAccountNo}, #{merNos}, #{orderNo},
|
|
|
#{musicGroupId},
|
|
|
- #{classGroupId},#{payTime})
|
|
|
+ #{classGroupId}, #{payTime})
|
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -316,8 +316,7 @@
|
|
|
FROM student_payment_order
|
|
|
WHERE music_group_id_ = #{musicGroupId}
|
|
|
AND user_id_ = #{userId}
|
|
|
- AND type_ =
|
|
|
- 'APPLY'
|
|
|
+ AND type_ = 'APPLY'
|
|
|
AND status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
ORDER BY id_ DESC
|
|
|
LIMIT 1
|
|
@@ -454,9 +453,9 @@
|
|
|
<result column="organ_name" property="organName"/>
|
|
|
<result column="username_" property="user.username"/>
|
|
|
<result column="charge_type_" property="chargeType"/>
|
|
|
- <result column="routeMerNo" property="routeMerNo" />
|
|
|
- <result column="routeAmount" property="routeAmount" />
|
|
|
- <result column="routeBalance" property="routeBalance" />
|
|
|
+ <result column="routeMerNo" property="routeMerNo"/>
|
|
|
+ <result column="routeAmount" property="routeAmount"/>
|
|
|
+ <result column="routeBalance" property="routeBalance"/>
|
|
|
<collection property="orderDetailList" ofType="com.ym.mec.biz.dal.entity.StudentPaymentOrderDetail">
|
|
|
<result column="detail_id_" property="id"/>
|
|
|
<result column="detail_type_" property="type"/>
|
|
@@ -588,7 +587,8 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="getOrderMoneyAmount" parameterType="map" resultMap="StudentPaymentOrder">
|
|
|
- SELECT SUM(spo.expect_amount_) expect_amount_,SUM(actual_amount_) actual_amount_,SUM(balance_payment_amount_) balance_payment_amount_ FROM student_payment_order spo
|
|
|
+ SELECT SUM(spo.expect_amount_) expect_amount_,SUM(actual_amount_) actual_amount_,SUM(balance_payment_amount_)
|
|
|
+ balance_payment_amount_ FROM student_payment_order spo
|
|
|
<include refid="queryPaymentOrder"/>
|
|
|
</select>
|
|
|
|
|
@@ -629,23 +629,27 @@
|
|
|
<![CDATA[
|
|
|
SELECT SUM(actual_amount_)
|
|
|
FROM student_payment_order
|
|
|
- WHERE status_ IN ('SUCCESS','ING')
|
|
|
+ WHERE status_ IN ('SUCCESS', 'ING')
|
|
|
AND create_time_ >= #{firstDate}
|
|
|
AND create_time_ <= NOW()
|
|
|
- AND mer_nos_ = #{merNo}
|
|
|
- ]]></select>
|
|
|
+ AND mer_nos_ = #{merNo}
|
|
|
+ ]]></select>
|
|
|
<select id="countGroupOrderWithoutFailed" resultType="int">
|
|
|
SELECT COUNT(*)
|
|
|
FROM student_payment_order spo
|
|
|
- LEFT JOIN class_group_student_mapper cgsm ON spo.music_group_id_=cgsm.music_group_id_ AND spo.user_id_=cgsm.user_id_
|
|
|
+ LEFT JOIN class_group_student_mapper cgsm
|
|
|
+ ON spo.music_group_id_ = cgsm.music_group_id_ AND spo.user_id_ = cgsm.user_id_
|
|
|
WHERE spo.music_group_id_ = #{groupId}
|
|
|
- AND spo.status_ != 'FAILED'
|
|
|
- AND cgsm.status_!= 'QUIT'
|
|
|
- AND spo.group_type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler }
|
|
|
- AND cgsm.group_type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler }
|
|
|
+ AND spo.status_ != 'FAILED'
|
|
|
+ AND cgsm.status_ != 'QUIT'
|
|
|
+ AND spo.group_type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler }
|
|
|
+ AND cgsm.group_type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler }
|
|
|
</select>
|
|
|
<select id="countSporadicOrder" resultType="java.lang.Integer">
|
|
|
- SELECT COUNT(id_) FROM student_payment_order spo WHERE spo.group_type_ = 'SPORADIC' AND spo.music_group_id_ = #{sporadicId}
|
|
|
+ SELECT COUNT(id_)
|
|
|
+ FROM student_payment_order spo
|
|
|
+ WHERE spo.group_type_ = 'SPORADIC'
|
|
|
+ AND spo.music_group_id_ = #{sporadicId}
|
|
|
</select>
|
|
|
|
|
|
<!-- 查找支付成功和支付中订单 -->
|
|
@@ -653,7 +657,8 @@
|
|
|
<![CDATA[
|
|
|
SELECT COUNT(*)
|
|
|
FROM student_payment_order
|
|
|
- WHERE organ_id_ = #{organId} AND status_ IN ('SUCCESS','ING')
|
|
|
+ WHERE organ_id_ = #{organId}
|
|
|
+ AND status_ IN ('SUCCESS', 'ING')
|
|
|
]]>
|
|
|
</select>
|
|
|
</mapper>
|