zhubaomin
2025-04-11 a1744d0bf7f0ad8ac861d672cffd7c710dac4e7e
pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml
@@ -379,4 +379,22 @@
        FROM  ba_user
        WHERE disabled = 0 AND deleted = 0
    </select>
    <!--获取巡检员列表-->
    <select id="getInspectors" resultType="com.dy.pipIrrGlobal.voBa.VoRoleSimple">
        SELECT
            us.id AS inspectorId,
            us.name AS inspector
        FROM ba_user us
            INNER JOIN ba_user_role ur ON ur.userId = us.id
            INNER JOIN ba_role rol ON rol.id = ur.roleId
        <where>
            AND us.disabled = 0
            AND us.deleted = 0
            AND rol.`name` = '巡检员'
            <if test = "inspector != null and inspector !=''">
                AND us.name LIKE CONCAT('%',#{inspector},'%')
            </if>
        </where>
    </select>
</mapper>