|
@@ -80,9 +80,9 @@
|
|
|
select
|
|
|
cs.userId,
|
|
|
cs.packageId,
|
|
|
- cb.name as clubName,
|
|
|
- cb.linkMan1 as linkMan,
|
|
|
- cb.contractMobile1 as mobile,
|
|
|
+ u.name as clubName,
|
|
|
+ u.userName as linkMan,
|
|
|
+ u.bindMobile as mobile,
|
|
|
cs.beginTime,
|
|
|
cs.price,
|
|
|
cs.payWay,
|
|
@@ -92,6 +92,7 @@
|
|
|
cs.endTime
|
|
|
from cm_svip_history cs
|
|
|
LEFT JOIN club cb ON cs.userId = cb.userId
|
|
|
+ left join user u on cs.userId = u.userID
|
|
|
where cs.userId = #{userId}
|
|
|
<if test="startPayTime != null and startPayTime != '' and endPayTime != null and endPayTime != ''">
|
|
|
and (payTime between #{startPayTime} and #{endPayTime})
|
|
@@ -127,15 +128,16 @@
|
|
|
FROM cm_svip_history cs
|
|
|
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
|
|
|
<where>
|
|
|
<if test="clubName != null and clubName != ''">
|
|
|
- and cb.name like concat('%',#{clubName},'%')
|
|
|
+ and u.name like concat('%',#{clubName},'%')
|
|
|
</if>
|
|
|
<if test="linkMan != null and linkMan != ''">
|
|
|
- and cb.linkMan1 like concat('%',#{linkMan},'%') or linkMan2 like concat('%',#{linkMan},'%')
|
|
|
+ and u.username like concat('%',#{linkMan},'%')
|
|
|
</if>
|
|
|
<if test="mobile != null and mobile != ''">
|
|
|
- and cb.contractMobile1=#{mobile}
|
|
|
+ and u.bindMobile LIKE concat('%',#{mobile},'%')
|
|
|
</if>
|
|
|
<if test="startPayTime !=null and startPayTime != '' and endPayTime !=null and endPayTime!=''">
|
|
|
and (payTime between #{startPayTime} and #{endPayTime})
|