xiangpei
2024-04-29 d83deacfb6d7ca1a4a8e3133c6e79ab818de9d5e
ycl-server/src/main/resources/mapper/zgyw/YwUnitMapper.xml
@@ -99,4 +99,13 @@
            #{id}
        </foreach>
    </delete>
    <select id="getByUserId" resultMap="YwUnitResult">
        SELECT
             tyw.*
        FROM
             t_yw_unit tyw
                 INNER JOIN t_unit_people tup ON tup.unit_id = tyw.id and tyw.deleted = 0
                 INNER JOIN t_yw_people typ ON tup.yw_people_id = typ.id AND typ.user_id = #{userId} AND typ.deleted = 0
    </select>
</mapper>