lyh
2025-02-17 1dcf43467f34eb70002be3c2f3cd7605ceb5dcdd
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/MdcUserProductionMapper.xml
@@ -6,4 +6,48 @@
    <select id="queryProductionIdsByUserId" resultType="java.lang.String">
        SELECT pro_id FROM mdc_user_production WHERE user_id = #{userId}
    </select>
</mapper>
    <select id="getUserPermsByGroupId" resultType="org.jeecg.modules.system.entity.SysUser">
        select u.id
             , u.username
             , u.realname
             , u.avatar
             , u.phone
             , u.email
        from sys_user u
                 inner join
             (select user_id from mdc_user_production where pro_id=#{proId}) p
             on u.id=p.user_id
    </select>
    <select id="getUserNonPermsByGroupId" resultType="org.jeecg.modules.system.entity.SysUser">
        select u.id
             , u.username
             , u.realname
             , u.avatar
             , u.phone
             , u.email
        from sys_user u
        where u.id not in (select user_id from mdc_user_production where pro_id=#{proId})
    </select>
    <select id="getUserNonPermsByDeviceId" resultType="org.jeecg.modules.system.entity.SysUser">
        select u.id
             , u.username
             , u.realname
             , u.avatar
             , u.phone
             , u.email
        from sys_user u
        where u.id not in (select user_id from nc_device_permission where device_id=#{deviceId})
    </select>
    <select id="getUserPermsByDeviceId" resultType="org.jeecg.modules.system.entity.SysUser">
        select u.id
             , u.username
             , u.realname
             , u.avatar
             , u.phone
             , u.email
        from sys_user u
                 inner join
                 (select user_id from nc_device_permission where device_id=#{deviceId}) p
                 on u.id=p.user_id
    </select>
</mapper>