|
@@ -1619,11 +1619,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="selectFsUserVOListByProject" resultType="com.fs.his.vo.FsUserVO">
|
|
|
SELECT distinct
|
|
|
b.total_amount,b.last_buy_time,p.pay_money as number,p.payment_id,p.pay_time,
|
|
|
- u.*,
|
|
|
+ u.user_id, u.nick_name, u.avatar, u.phone, u.integral, u.now_money,
|
|
|
fcc.watch_course_count, fcc.part_course_count, company_user.nick_name AS companyUserNickName, fcc.last_watch_date
|
|
|
,company.company_name,
|
|
|
ucu.project_id,
|
|
|
- ucu.id as companyUserId
|
|
|
+ ucu.id as companyUserId,
|
|
|
+ ucu.create_time as bindTime,
|
|
|
+ ucu.status
|
|
|
FROM
|
|
|
fs_user u
|
|
|
LEFT JOIN (
|
|
@@ -1648,7 +1650,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
fs_user_course_count
|
|
|
GROUP BY fs_user_course_count.user_id
|
|
|
) fcc ON fcc.user_id = u.user_id
|
|
|
- left join fs_user_company_user ucu on ucu.user_id = u.user_id
|
|
|
+ inner join fs_user_company_user ucu on ucu.user_id = u.user_id
|
|
|
LEFT JOIN company_user ON company_user.user_id = ucu.company_user_id
|
|
|
LEFT JOIN company on company.company_id = company_user.company_id
|
|
|
<where>
|
|
@@ -1663,15 +1665,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
AND u.phone LIKE CONCAT("%",#{maps.phone},"%")
|
|
|
</if >
|
|
|
<if test = "maps.startCreateTime != null and maps.endCreateTime != null" >
|
|
|
- AND (DATE_FORMAT( u.create_time, "%Y-%m-%d" ) >= DATE_FORMAT(#{maps.startCreateTime}, "%Y-%m-%d")
|
|
|
- and DATE_FORMAT( u.create_time, "%Y-%m-%d" ) <= DATE_FORMAT(#{maps.endCreateTime}, "%Y-%m-%d")
|
|
|
+ AND (DATE_FORMAT( ucu.create_time, "%Y-%m-%d" ) >= DATE_FORMAT(#{maps.startCreateTime}, "%Y-%m-%d")
|
|
|
+ and DATE_FORMAT( ucu.create_time, "%Y-%m-%d" ) <= DATE_FORMAT(#{maps.endCreateTime}, "%Y-%m-%d")
|
|
|
)
|
|
|
</if >
|
|
|
<if test = "maps.registerCode != null and maps.registerCode !='' " >
|
|
|
AND u.register_code = #{maps.registerCode}
|
|
|
</if >
|
|
|
<if test = "maps.status != null" >
|
|
|
- AND u.STATUS = #{maps.status}
|
|
|
+ AND ucu.status = #{maps.status}
|
|
|
</if >
|
|
|
<if test = "maps.companyId != null and maps.companyId != '' " >
|
|
|
AND company.company_id = #{maps.companyId}
|