通讯录查询修改

master
Xusan 2024-05-15 17:14:51 +08:00
parent 8c96af9db5
commit ac60358c11
3 changed files with 5 additions and 16 deletions

View File

@ -8,7 +8,7 @@
AB.*,F.SORT FSORT AB.*,F.SORT FSORT
FROM FROM
ADDRESS_BOOK AB ADDRESS_BOOK AB
LEFT JOIN FC F ON F.AB_ID = AB.ID LEFT JOIN FC F ON F.AB_ID = AB.ID AND F.USER_ID = #{dto.userId}
LEFT JOIN AB_UD_R R ON R.AD_ID = AB.ID LEFT JOIN AB_UD_R R ON R.AD_ID = AB.ID
WHERE 1=1 WHERE 1=1
<if test="dto.dictId != null and dto.dictId != '' "> <if test="dto.dictId != null and dto.dictId != '' ">
@ -26,9 +26,6 @@
<if test="dto.phone != null and dto.phone != '' "> <if test="dto.phone != null and dto.phone != '' ">
AND AB.PHONE = #{dto.phone} AND AB.PHONE = #{dto.phone}
</if> </if>
<if test="dto.userId != null and dto.userId != ''">
AND F.USER_ID = #{dto.userId}
</if>
ORDER BY AB.SORT ORDER BY AB.SORT
</select> </select>

View File

@ -17,12 +17,8 @@
F.SORT FSORT F.SORT FSORT
FROM FROM
ORGANIZATION O ORGANIZATION O
LEFT JOIN FC F ON F.AB_ID = O.ID LEFT JOIN FC F ON F.AB_ID = O.ID AND F.USER_ID = #{userId}
<where>
<if test="userId != null and userId != ''">
F.USER_ID = #{userId}
</if>
</where>
</select> </select>
</mapper> </mapper>

View File

@ -15,12 +15,8 @@
F.SORT FSORT F.SORT FSORT
FROM FROM
UNIT_DICT UD UNIT_DICT UD
LEFT JOIN FC F ON F.AB_ID = UD.O_ID LEFT JOIN FC F ON F.AB_ID = UD.O_ID AND F.USER_ID = #{userId}
<where>
<if test="userId != null and userId != ''">
F.USER_ID = #{userId}
</if>
</where>
</select> </select>
</mapper> </mapper>