|
@@ -22,7 +22,7 @@
|
|
|
<result column="update_time_" property="updateTime"/>
|
|
|
<result column="music_group_id_" property="musicGroupId"/>
|
|
|
</resultMap>
|
|
|
-
|
|
|
+
|
|
|
<resultMap type="com.ym.mec.biz.dal.dto.CloudTeacherOrderDto" id="CloudTeacherOrderDto">
|
|
|
<id column="id_" property="cloudTeacherOrder.id"/>
|
|
|
<result column="organ_id_" property="cloudTeacherOrder.organId"/>
|
|
@@ -57,15 +57,15 @@
|
|
|
insert into cloud_teacher_order (organ_id_,student_id_, type_, level_, time_, amount_, refund_amount_, status_,
|
|
|
order_id_,start_time_,end_time_,
|
|
|
remark_, create_time_, update_time_)
|
|
|
- values (#{orderId},#{studentId}, #{type},#{level}, #{time}, #{amount}, #{refundAmount},
|
|
|
+ values (#{organId},#{studentId}, #{type},#{level}, #{time}, #{amount}, #{refundAmount},
|
|
|
#{status},#{orderId},#{startTime},#{endTime}, #{remark}, NOW(), NOW())
|
|
|
</insert>
|
|
|
<update id="update" parameterType="com.ym.mec.biz.dal.entity.CloudTeacherOrder">
|
|
|
<!--@mbg.generated-->
|
|
|
update cloud_teacher_order
|
|
|
<set>
|
|
|
- <if test="orderId != null">
|
|
|
- organ_id_ = #{orderId},
|
|
|
+ <if test="organId != null">
|
|
|
+ organ_id_ = #{organId},
|
|
|
</if>
|
|
|
<if test="studentId != null">
|
|
|
student_id_ = #{studentId},
|
|
@@ -117,8 +117,8 @@
|
|
|
|
|
|
<!-- 分页查询 -->
|
|
|
<select id="queryPage" resultMap="CloudTeacherOrderDto" parameterType="map">
|
|
|
- SELECT cto.*,spo.status_ trans_status_,spo.expect_amount_,mrs.name_,mrs.icon_ FROM cloud_teacher_order cto
|
|
|
- left join student_payment_order spo on cto.organ_id_ = spo.id_
|
|
|
+ SELECT cto.*,spo.status_ trans_status_,spo.expect_amount_,mrs.name_,mrs.icon_ FROM cloud_teacher_order cto
|
|
|
+ left join student_payment_order spo on cto.order_id_ = spo.id_
|
|
|
left join member_rank_setting mrs on mrs.id_ = cto.level_
|
|
|
where spo.type_ = 'MEMBER'
|
|
|
<if test="status != null">
|
|
@@ -134,7 +134,7 @@
|
|
|
<!-- 查询当前表的总记录数 -->
|
|
|
<select id="queryCount" resultType="int">
|
|
|
SELECT COUNT(cto.id_)
|
|
|
- FROM cloud_teacher_order cto left join student_payment_order spo on cto.organ_id_ = spo.id_
|
|
|
+ FROM cloud_teacher_order cto LEFT JOIN student_payment_order spo on cto.order_id_ = spo.id_
|
|
|
where spo.type_ = 'MEMBER'
|
|
|
<if test="status != null">
|
|
|
and cto.status_ = #{status}
|
|
@@ -185,11 +185,11 @@
|
|
|
SELECT cto.* FROM cloud_teacher_order cto
|
|
|
WHERE order_id_ = #{orderId}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="queryOrderInfoByOrderId" resultMap="CloudTeacherOrderDto">
|
|
|
- SELECT cto.*,spo.status_ trans_status_,spo.expect_amount_,mrs.name_,mrs.icon_ FROM cloud_teacher_order cto
|
|
|
- left join student_payment_order spo on cto.organ_id_ = spo.id_
|
|
|
- left join member_rank_setting mrs on mrs.id_ = cto.level_
|
|
|
+ SELECT cto.*,spo.status_ trans_status_,spo.expect_amount_,mrs.name_,mrs.icon_ FROM cloud_teacher_order cto
|
|
|
+ left join student_payment_order spo on cto.order_id_ = spo.id_
|
|
|
+ left join member_rank_setting mrs on mrs.id_ = cto.level_
|
|
|
where spo.type_ = 'MEMBER' and order_id_ = #{orderId}
|
|
|
</select>
|
|
|
</mapper>
|