|
@@ -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>
|