<?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.ruoyi.benyun.mapper.BrandStatisticsMapper">
    <resultMap type="com.ruoyi.benyun.entity.BrandStatistics" id="BrandStatisticsResult">
        <result property="brandId" column="brand_id"/>
        <result property="brandName" column="brand_name"/>
        <result property="coverProvinceCount" column="cover_province_count"/>
        <result property="coverCityCount" column="cover_city_count"/>
        <result property="coverZoneCount" column="cover_zone_count"/>
        <result property="businessCount" column="business_count"/>
        <result property="pauseBusinessCount" column="pause_business_count"/>
        <result property="noBusinessCount" column="no_business_count"/>
        <result property="total" column="total"/>
        <result property="updateTime" column="update_time"/>
    </resultMap>
    <select id="searchByBrandId" resultMap="BrandStatisticsResult">
        select * from bl_brand_statistics where brand_id = #{brandId}
    </select>
    <select id="searchList" resultMap="BrandStatisticsResult">
        select * from bl_brand_statistics order by total desc;
    </select>
</mapper>
