|
|
@@ -1951,6 +1951,58 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectFsUserVOListByProjectNew" resultType="com.fs.his.vo.FsUserVO">
|
|
|
+ SELECT
|
|
|
+ u.user_id, u.nick_name, u.avatar, u.phone, u.integral, u.now_money,
|
|
|
+ ucu.project_id,ucu.company_user_id as companyUserId,ucu.create_time as bindTime,ucu.status,
|
|
|
+ company.company_name,
|
|
|
+ cu.nick_name companyUserNickName
|
|
|
+ FROM
|
|
|
+ fs_user_company_user ucu
|
|
|
+ left join
|
|
|
+ fs_user u on ucu.user_id = u.user_id
|
|
|
+ left join
|
|
|
+ company on company.company_id = ucu.company_id
|
|
|
+ left join
|
|
|
+ company_user cu on cu.user_id = ucu.company_user_id
|
|
|
+ <where>
|
|
|
+ 1 = 1 and u.nick_name is not null
|
|
|
+ and u.is_del = 0
|
|
|
+ <if test = "maps.nickname != null and maps.nickname !='' " >
|
|
|
+ AND u.nick_name LIKE CONCAT("%",#{maps.nickname},"%")
|
|
|
+ </if >
|
|
|
+ <if test = "maps.userId != null and maps.userId !='' " >
|
|
|
+ AND u.user_id = #{maps.userId}
|
|
|
+ </if >
|
|
|
+ <if test = "maps.phone != null and maps.phone !='' " >
|
|
|
+ AND u.phone LIKE CONCAT("%",#{maps.phone},"%")
|
|
|
+ </if >
|
|
|
+ <if test = "maps.startCreateTime != null and maps.endCreateTime != null" >
|
|
|
+ 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 ucu.status = #{maps.status}
|
|
|
+ </if >
|
|
|
+ <if test = "maps.companyId != null and maps.companyId != '' " >
|
|
|
+ AND ucu.company_id = #{maps.companyId}
|
|
|
+ </if >
|
|
|
+ <if test = "maps.companyUserId != null" >
|
|
|
+ AND ucu.company_user_id = #{maps.companyUserId}
|
|
|
+ </if >
|
|
|
+ <if test = "maps.projectId != null" >
|
|
|
+ AND ucu.project_id = #{maps.projectId}
|
|
|
+ </if >
|
|
|
+ </where>
|
|
|
+ ORDER BY
|
|
|
+ user_id DESC
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
<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,
|
|
|
@@ -2319,4 +2371,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
</mapper>
|