|
@@ -118,7 +118,7 @@
|
|
|
where id_ = #{id} AND version_ = #{version} and tenant_id_ = #{tenantId}
|
|
|
</update>
|
|
|
|
|
|
- <select id="findByPlatformOrderId" resultMap="CloudTeacherOrderDto" parameterType="map">
|
|
|
+ <select id="findByPlatformOrderId" resultMap="CloudTeacherOrder">
|
|
|
select * from cloud_teacher_order where platform_order_id_ = #{platformOrderId}
|
|
|
</select>
|
|
|
|
|
@@ -126,11 +126,11 @@
|
|
|
update cloud_teacher_order set status_ = 2,
|
|
|
`start_time_` = CURRENT_DATE(),
|
|
|
`end_time_` = case
|
|
|
- when type_ = 1 then date_add(CURRENT_DATE(), interval (`time_`) day)
|
|
|
- when type_ = 2 then date_add(CURRENT_DATE(), interval (`time_`) month)
|
|
|
- when type_ = 3 then date_add(CURRENT_DATE(), interval (`time_` * 3) month)
|
|
|
- when type_ = 4 then date_add(CURRENT_DATE(), interval (`time_` * 6) month)
|
|
|
- when type_ = 5 then date_add(CURRENT_DATE(), interval (`time_` * 12) month)
|
|
|
+ when type_ = 1 then concat(date_add(CURRENT_DATE(), interval `time_` day) , ' 00:00:00')
|
|
|
+ when type_ = 2 then concat(date_add(CURRENT_DATE(), interval `time_` month) , ' 00:00:00')
|
|
|
+ when type_ = 3 then concat(date_add(CURRENT_DATE(), interval `time_` * 3 month) , ' 00:00:00')
|
|
|
+ when type_ = 4 then concat(date_add(CURRENT_DATE(), interval `time_` * 6 month) , ' 00:00:00')
|
|
|
+ when type_ = 5 then concat(date_add(CURRENT_DATE(), interval `time_` year) , ' 00:00:00')
|
|
|
end
|
|
|
where platform_order_id_ = #{platformOrderId}
|
|
|
</update>
|
|
@@ -375,7 +375,9 @@
|
|
|
LEFT JOIN student_registration sr ON cto.student_id_ = sr.user_id_
|
|
|
<where>
|
|
|
cto.status_ = 2 AND tor.order_no_ is not null AND tor.order_type_ = 'CLOUD_TEACHER'
|
|
|
- AND sr.music_group_id_ = #{musicGroupId}
|
|
|
+ <if test="musicGroupId != null and musicGroupId != ''">
|
|
|
+ AND sr.music_group_id_ = #{musicGroupId}
|
|
|
+ </if>
|
|
|
<if test="queryCondition != null and queryCondition != ''">
|
|
|
AND (u.username_ LIKE CONCAT('%', #{queryCondition}, '%') or u.phone_ = #{queryCondition} or u.id_ = #{queryCondition})
|
|
|
</if>
|
|
@@ -418,7 +420,9 @@
|
|
|
LEFT JOIN student_registration sr ON cto.student_id_ = sr.user_id_
|
|
|
<where>
|
|
|
cto.status_ = 2 AND tor.order_no_ is not null AND tor.order_type_ = 'CLOUD_TEACHER'
|
|
|
- AND sr.music_group_id_ = #{musicGroupId}
|
|
|
+ <if test="musicGroupId != null and musicGroupId != ''">
|
|
|
+ AND sr.music_group_id_ = #{musicGroupId}
|
|
|
+ </if>
|
|
|
<if test="queryCondition != null and queryCondition != ''">
|
|
|
AND (u.username_ LIKE CONCAT('%', #{queryCondition}, '%') or u.phone_ = #{queryCondition} or u.id_ = #{queryCondition})
|
|
|
</if>
|