无关风月
2026-01-22 075daef140ea17638529e09ef95b7cb28ed66ae5
ruoyi-system/src/main/resources/mapper/system/DeviceUsageMapper.xml
@@ -16,10 +16,9 @@
        <result column="disabled" property="disabled"/>
    </resultMap>
    <select id="getDeviceUsageList" resultType="java.lang.String">
        select t3.properties
        from device_usage t1
                 left join device t2 on t1.device_id = t2.id
        where t1.project_id = #{id}
        select t2.properties from device_usage t1
        left join device t2 on t1.device_id = t2.id
        where t1.project_id =#{id}
    </select>
    <select id="getDeviceList" resultType="com.ruoyi.system.vo.DeviceListVo">
@@ -220,5 +219,15 @@
        order by t1.create_time desc
    </select>
    <select id="getProjectDeviceCount" resultType="com.ruoyi.system.vo.DeviceCountVo"
            parameterType="java.lang.Integer">
        select t1.type, count(t1.id) as count
        from device t1
            left join device_usage t2
        on t1.id = t2.device_id
        where t2.project_id = #{id} and t2.deleted = 0
        group by t1.type
    </select>
</mapper>