|
@@ -93,19 +93,20 @@
|
|
|
from cm_svip_history cs
|
|
|
LEFT JOIN club cb ON cs.userId = cb.userId
|
|
|
left join user u on cs.userId = u.userID
|
|
|
+ left join cm_svip_package cp on cp.id = cs.packageId
|
|
|
where cs.userId = #{userId}
|
|
|
AND cs.payStatus = '1'
|
|
|
<if test="startPayTime != null and startPayTime != '' and endPayTime != null and endPayTime != ''">
|
|
|
- and (payTime between #{startPayTime} and #{endPayTime})
|
|
|
+ and (cs.payTime between #{startPayTime} and #{endPayTime})
|
|
|
</if>
|
|
|
<if test="startEndTime != null and startEndTime != '' and endEndTime != null and endEndTime != ''">
|
|
|
- and (endTime between #{startEndTime} and #{endEndTime})
|
|
|
+ and (cs.endTime between #{startEndTime} and #{endEndTime})
|
|
|
</if>
|
|
|
<if test="packageId != null">
|
|
|
- and packageId = #{packageId}
|
|
|
+ and cp.duration = #{packageId}
|
|
|
</if>
|
|
|
<if test='status == "1"'>
|
|
|
- and NOW() between cs.beginTime and cs.endTime
|
|
|
+ and (NOW() between cs.beginTime and cs.endTime)
|
|
|
</if>
|
|
|
<if test='status == "2"'>
|
|
|
and NOW() > cs.endTime
|
|
@@ -131,6 +132,7 @@
|
|
|
LEFT JOIN club cb ON cs.userId = cb.userId
|
|
|
LEFT JOIN cm_svip_user cu ON cs.userId = cu.userId
|
|
|
left join user u on cs.userId = u.userID
|
|
|
+ left join cm_svip_package cp on cp.id = cs.packageId
|
|
|
<where>
|
|
|
AND cs.payStatus = '1'
|
|
|
<if test="clubName != null and clubName != ''">
|
|
@@ -143,13 +145,13 @@
|
|
|
and u.bindMobile LIKE concat('%',#{mobile},'%')
|
|
|
</if>
|
|
|
<if test="startPayTime !=null and startPayTime != '' and endPayTime !=null and endPayTime!=''">
|
|
|
- and (payTime between #{startPayTime} and #{endPayTime})
|
|
|
+ and (cs.payTime between #{startPayTime} and #{endPayTime})
|
|
|
</if>
|
|
|
<if test="startEndTime !=null and startEndTime!='' and endEndTime!=null and endEndTime!=''">
|
|
|
and (cu.endTime between #{startEndTime} and #{endEndTime})
|
|
|
</if>
|
|
|
- <if test="packageId !=null and packageId!=''">
|
|
|
- and packageId=#{packageId}
|
|
|
+ <if test="packageId !=null and packageId != ''">
|
|
|
+ and cp.duration = #{packageId}
|
|
|
</if>
|
|
|
<if test='status == "1"'>
|
|
|
and cu.endTime > NOW()
|