diff --git a/src/main/resources/mapper/AddressBookMapper.xml b/src/main/resources/mapper/AddressBookMapper.xml index d7b192a..807d556 100644 --- a/src/main/resources/mapper/AddressBookMapper.xml +++ b/src/main/resources/mapper/AddressBookMapper.xml @@ -8,7 +8,7 @@ AB.*,F.SORT FSORT FROM 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 WHERE 1=1 @@ -26,9 +26,6 @@ AND AB.PHONE = #{dto.phone} - - AND F.USER_ID = #{dto.userId} - ORDER BY AB.SORT diff --git a/src/main/resources/mapper/OrganizationMapper.xml b/src/main/resources/mapper/OrganizationMapper.xml index d7aff94..f98c597 100644 --- a/src/main/resources/mapper/OrganizationMapper.xml +++ b/src/main/resources/mapper/OrganizationMapper.xml @@ -17,12 +17,8 @@ F.SORT FSORT FROM ORGANIZATION O - LEFT JOIN FC F ON F.AB_ID = O.ID - - - F.USER_ID = #{userId} - - + LEFT JOIN FC F ON F.AB_ID = O.ID AND F.USER_ID = #{userId} + \ No newline at end of file diff --git a/src/main/resources/mapper/UnitDictMapper.xml b/src/main/resources/mapper/UnitDictMapper.xml index e98ec78..463a0be 100644 --- a/src/main/resources/mapper/UnitDictMapper.xml +++ b/src/main/resources/mapper/UnitDictMapper.xml @@ -15,12 +15,8 @@ F.SORT FSORT FROM UNIT_DICT UD - LEFT JOIN FC F ON F.AB_ID = UD.O_ID - - - F.USER_ID = #{userId} - - + LEFT JOIN FC F ON F.AB_ID = UD.O_ID AND F.USER_ID = #{userId} + \ No newline at end of file