|
@@ -125,6 +125,18 @@
|
|
|
<if test="cardNo!=null">
|
|
|
AND ec.card_no_=#{cardNo}
|
|
|
</if>
|
|
|
+ <if test="orderNo!=null">
|
|
|
+ AND erp.order_no_=#{orderNo}
|
|
|
+ </if>
|
|
|
+ <if test="transStatus!=null">
|
|
|
+ AND erp.trans_status_=#{transStatus,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler}
|
|
|
+ </if>
|
|
|
+ <if test="startTime!=null">
|
|
|
+ AND erp.create_time_ >=#{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime!=null">
|
|
|
+ <![CDATA[AND erp.create_time_ <= #{endTime}]]>
|
|
|
+ </if>
|
|
|
<if test="examName!=null">
|
|
|
AND eb.name_=#{examName}
|
|
|
</if>
|
|
@@ -145,7 +157,7 @@
|
|
|
SELECT erp.*,eb.exam_location_id_list_ FROM exam_registration_payment erp
|
|
|
LEFT JOIN exam_certification ec ON erp.exam_registration_id_ = ec.exam_registration_id_
|
|
|
LEFT JOIN examination_basic eb ON erp.examination_basic_id_ = eb.id_
|
|
|
- <include refid="queryCondition" />
|
|
|
+ <include refid="queryCondition"/>
|
|
|
<include refid="global.limit"/>
|
|
|
</select>
|
|
|
|
|
@@ -154,7 +166,7 @@
|
|
|
SELECT erp.*,eb.exam_location_id_list_,ec.card_no_ FROM exam_registration_payment erp
|
|
|
LEFT JOIN exam_certification ec ON erp.exam_registration_id_ = ec.exam_registration_id_
|
|
|
LEFT JOIN examination_basic eb ON erp.examination_basic_id_ = eb.id_
|
|
|
- <include refid="queryCondition" />
|
|
|
+ <include refid="queryCondition"/>
|
|
|
<include refid="global.limit"/>
|
|
|
</select>
|
|
|
|
|
@@ -163,7 +175,7 @@
|
|
|
SELECT COUNT(*) FROM exam_registration_payment erp
|
|
|
LEFT JOIN exam_certification ec ON erp.exam_registration_id_ = ec.exam_registration_id_
|
|
|
LEFT JOIN examination_basic eb ON erp.examination_basic_id_ = eb.id_
|
|
|
- <include refid="queryCondition" />
|
|
|
+ <include refid="queryCondition"/>
|
|
|
</select>
|
|
|
|
|
|
<!-- 获取项目用户未支付的订单 -->
|
|
@@ -172,19 +184,24 @@
|
|
|
FROM exam_registration_payment
|
|
|
WHERE student_id_ = #{userId}
|
|
|
AND examination_basic_id_ = #{examinationBasicId}
|
|
|
- AND trans_status_ = 'ING' LIMIT 1
|
|
|
+ AND trans_status_ = 'ING'
|
|
|
+ LIMIT 1
|
|
|
</select>
|
|
|
|
|
|
<!-- 根据订单号获取订单 -->
|
|
|
<select id="getByOrderNo" resultMap="ExamRegistrationPayment">
|
|
|
SELECT *
|
|
|
FROM exam_registration_payment
|
|
|
- WHERE order_no_ = #{orderNo} FOR UPDATE
|
|
|
+ WHERE order_no_ = #{orderNo} FOR
|
|
|
+ UPDATE
|
|
|
</select>
|
|
|
|
|
|
<!-- 根据状态获取订单 -->
|
|
|
<select id="getOrdersByStatus" resultMap="ExamRegistrationPayment">
|
|
|
- SELECT * FROM exam_registration_payment WHERE pay_type_ = #{payType} AND trans_status_ = #{status}
|
|
|
+ SELECT *
|
|
|
+ FROM exam_registration_payment
|
|
|
+ WHERE pay_type_ = #{payType}
|
|
|
+ AND trans_status_ = #{status}
|
|
|
</select>
|
|
|
|
|
|
<!-- 获取超时未支付的订单 -->
|
|
@@ -197,9 +214,13 @@
|
|
|
<![CDATA[ AND create_time_ <= ]]> #{beforeTime}
|
|
|
</select>
|
|
|
|
|
|
- <resultMap id="ExamRegistrationPaymentDto" type="com.keao.edu.user.dto.ExamRegistrationPaymentDto" extends="ExamRegistrationPayment">
|
|
|
+ <resultMap id="ExamRegistrationPaymentDto" type="com.keao.edu.user.dto.ExamRegistrationPaymentDto"
|
|
|
+ extends="ExamRegistrationPayment">
|
|
|
<result column="card_no_" property="cardNo"/>
|
|
|
- <association property="examRegistration" select="com.keao.edu.user.dao.ExamRegistrationDao.getExamRegistrationInfo" column="{id=exam_registration_id_}"/>
|
|
|
- <association property="examLocations" select="com.keao.edu.user.dao.ExamLocationDao.getExamLocationByIds" column="{ids=exam_location_id_list_}"/>
|
|
|
+ <association property="examRegistration"
|
|
|
+ select="com.keao.edu.user.dao.ExamRegistrationDao.getExamRegistrationInfo"
|
|
|
+ column="{id=exam_registration_id_}"/>
|
|
|
+ <association property="examLocations" select="com.keao.edu.user.dao.ExamLocationDao.getExamLocationByIds"
|
|
|
+ column="{ids=exam_location_id_list_}"/>
|
|
|
</resultMap>
|
|
|
</mapper>
|