<?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.bonus.zlpt.bigscreen.mapper.MaLeaseInfoMapper">


    <select id="selectTypeList" resultType="com.bonus.zlpt.bigscreen.domain.vo.MaLeaseInfoVo">
        SELECT '出租' AS type, SUM(cz_num) AS count FROM ma_lease_info WHERE cz_num > 0
        UNION ALL
        SELECT '求租' AS type, SUM(qz_num) AS count FROM ma_lease_info WHERE qz_num > 0
    </select>
</mapper>