1234567891011121314 |
- <?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.care.bigscreen.mapper.StOrganizationMapper">
- <select id="selectStOrganizationList" resultType="com.care.bigscreen.entity.StOrganization">
- SELECT
- t.id orgId,
- (select count(1) from care_station a where a.org_id = t.id) stationAmount,
- (select count(1) from care_sys_user a where a.org_id = t.id and a.role = 'seat') seatsAmount,
- (select convert(sum(call_duration)/60,decimal(20,2)) from cc_traffic_billed b where b.org_id = t.id) seatsCallMinAmount
- FROM care_organization t
- </select>
- </mapper>
|