|
@@ -22,6 +22,7 @@
|
|
|
<result column="create_time_" property="createTime"/>
|
|
|
<result column="update_time_" property="updateTime"/>
|
|
|
<result column="tenant_id_" property="tenantId"/>
|
|
|
+ <result column="organ_id_" property="organId"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -47,8 +48,8 @@
|
|
|
</selectKey>
|
|
|
-->
|
|
|
INSERT INTO exam_registration_payment
|
|
|
- (id_,exam_registration_id_,student_id_,examination_basic_id_,order_no_,trans_no_,mer_no_,trans_amount_,trans_status_,trans_successed_time_,create_time_,update_time_,tenant_id_)
|
|
|
- VALUES(#{id},#{examRegistrationId},#{studentId},#{examinationBasicId},#{orderNo},#{transNo},#{merNo},#{transAmount},#{transStatus},#{transSuccessedTime},NOW(),NOW(),#{tenantId})
|
|
|
+ (id_,exam_registration_id_,student_id_,examination_basic_id_,order_no_,trans_no_,mer_no_,trans_amount_,trans_status_,trans_successed_time_,create_time_,update_time_,tenant_id_,organ_id_)
|
|
|
+ VALUES(#{id},#{examRegistrationId},#{studentId},#{examinationBasicId},#{orderNo},#{transNo},#{merNo},#{transAmount},#{transStatus},#{transSuccessedTime},NOW(),NOW(),#{tenantId},#{organId})
|
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -106,16 +107,43 @@
|
|
|
WHERE id_ = #{id}
|
|
|
</delete>
|
|
|
|
|
|
+
|
|
|
+ <sql id="queryCondition">
|
|
|
+ <where>
|
|
|
+ <if test="studentId!=null">
|
|
|
+ AND erp.student_id_=#{studentId}
|
|
|
+ </if>
|
|
|
+ <if test="examinationBasicId!=null">
|
|
|
+ AND erp.examination_basic_id_=#{examinationBasicId}
|
|
|
+ </if>
|
|
|
+ <if test="examRegistrationId!=null">
|
|
|
+ AND erp.exam_registration_id_=#{examRegistrationId}
|
|
|
+ </if>
|
|
|
+ <if test="organIds!=null">
|
|
|
+ AND erp.organ_id_ IN
|
|
|
+ <foreach collection="organIds" item="organId" separator="," open="(" close=")">
|
|
|
+ #{organId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="search!=null">
|
|
|
+ AND (ec.card_no_ LIKE CONCAT('%', #{serch}, '%'))
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+
|
|
|
<!-- 分页查询 -->
|
|
|
- <select id="queryPage" resultMap="ExamRegistrationPayment" parameterType="map">
|
|
|
- SELECT * FROM exam_registration_payment ORDER BY id_
|
|
|
+ <select id="queryPage" resultMap="pageList" parameterType="map">
|
|
|
+ SELECT erp.* FROM exam_registration_payment erp
|
|
|
+ LEFT JOIN exam_certification ec ON erp.exam_registration_id_ = ec.exam_registration_id_
|
|
|
+ <include refid="queryCondition" />
|
|
|
<include refid="global.limit"/>
|
|
|
</select>
|
|
|
|
|
|
<!-- 查询当前表的总记录数 -->
|
|
|
<select id="queryCount" resultType="int">
|
|
|
- SELECT COUNT(*)
|
|
|
- FROM exam_registration_payment
|
|
|
+ SELECT COUNT(*) FROM exam_registration_payment erp
|
|
|
+ LEFT JOIN exam_certification ec ON erp.exam_registration_id_ = ec.exam_registration_id_
|
|
|
+ <include refid="queryCondition" />
|
|
|
</select>
|
|
|
|
|
|
<!-- 获取项目用户未支付的订单 -->
|
|
@@ -157,10 +185,4 @@
|
|
|
<resultMap id="pageList" type="com.keao.edu.user.entity.ExamRegistrationPayment" extends="ExamRegistrationPayment">
|
|
|
<association property="examRegistration" select="com.keao.edu.user.dao.ExamRegistrationDao.getExamRegistrationInfo" column="{id=exam_registration_id_}"/>
|
|
|
</resultMap>
|
|
|
- <!-- 获取订单列表 -->
|
|
|
- <select id="getOrderPageList" resultMap="pageList">
|
|
|
- SELECT erp.* FROM exam_registration_payment erp
|
|
|
- LEFT JOIN sys_user su on erp.student_id_ = su.id_
|
|
|
- LEFT JOIN subject s on erp.id_ = s.id_
|
|
|
- </select>
|
|
|
</mapper>
|