12345678910111213141516 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.xy.mapper.DeviceStatusMapper">
- <!-- 统计状态数量 -->
- <select id="statusCount" resultType="com.xy.mapper.entity.DeviceStatusCount">
- select
- (select count(*) busy_state from device_info where busy_state = 1) busyState,
- (select count(*) net_state from device_status where net_state = 0) netState,
- (select count(*) device_state from device_status where device_state = 1) deviceState,
- (select count(*) active_state from device_info where active_state = 1) activeState,
- (select count(*) temp_state from device_status where temp_state = 1) tempState
- from dual
- </select>
- </mapper>
|