|
|
@@ -47,17 +47,19 @@
|
|
|
fs_user u
|
|
|
LEFT JOIN fs_user_company_user fsu ON u.user_id = fsu.user_id
|
|
|
LEFT JOIN company_fs_user cfs on u.user_id=cfs.fs_user_id
|
|
|
- WHERE
|
|
|
- fsu.company_id =#{companyId}
|
|
|
- <if test="phone != null and phone != ''">
|
|
|
- and u.phone = #{phone}
|
|
|
- </if>
|
|
|
- <if test="nickName != null and nickName != ''">
|
|
|
- and u.nick_name like concat('%',#{nickName},'%')
|
|
|
- </if>
|
|
|
- <if test="userId !=null and userId !=''">
|
|
|
- and u.user_id=#{userId}
|
|
|
- </if>
|
|
|
+ <where>
|
|
|
+ (fsu.company_id =#{companyId} or fsu.company_id is null)
|
|
|
+ <if test="phone != null and phone != ''">
|
|
|
+ and u.phone = #{phone}
|
|
|
+ </if>
|
|
|
+ <if test="nickName != null and nickName != ''">
|
|
|
+ and u.nick_name like concat('%',#{nickName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="userId !=null and userId !=''">
|
|
|
+ and u.user_id=#{userId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+
|
|
|
GROUP BY
|
|
|
u.user_id
|
|
|
</select>
|