|
@@ -188,15 +188,15 @@
|
|
|
fs_user `user` join (
|
|
|
select user_id from fs_user
|
|
|
<where>
|
|
|
- <if test="companyId != null">
|
|
|
- company_id = #{companyId}
|
|
|
+ <if test="companyId != null and companyId != ''">
|
|
|
+ AND company_id = #{companyId}
|
|
|
</if>
|
|
|
- <if test="companyUserId != null">
|
|
|
- company_user_id = #{companyUserId}
|
|
|
+ <if test="companyUserId != null and companyUserId != ''">
|
|
|
+ AND company_user_id = #{companyUserId}
|
|
|
+ </if>
|
|
|
+ <if test="phone != null and phone != ''">
|
|
|
+ AND phone = #{phone}
|
|
|
</if>
|
|
|
- <if test="phone != null">
|
|
|
- phone = #{phone}
|
|
|
- </if>
|
|
|
</where>
|
|
|
order by user_id desc
|
|
|
limit ${(pageNum-1)*pageSize},${pageSize}
|
|
@@ -206,14 +206,14 @@
|
|
|
SELECT COUNT(user_id)
|
|
|
FROM fs_user
|
|
|
<where>
|
|
|
- <if test="companyId != null">
|
|
|
- company_id = #{companyId}
|
|
|
+ <if test="companyId != null and companyId != ''">
|
|
|
+ AND company_id = #{companyId}
|
|
|
</if>
|
|
|
- <if test="companyUserId != null">
|
|
|
- company_user_id = #{companyUserId}
|
|
|
+ <if test="companyUserId != null and companyUserId != ''">
|
|
|
+ AND company_user_id = #{companyUserId}
|
|
|
</if>
|
|
|
- <if test="phone != null">
|
|
|
- phone = #{phone}
|
|
|
+ <if test="phone != null and phone != ''">
|
|
|
+ AND phone = #{phone}
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|