package cn.qinys.platform.upms.api.mapper;

import cn.qinys.platform.entity.upms.CommonGeoCount;
import cn.qinys.platform.upms.api.resp.GaoDeKeyPageResp;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;


/**
 * 高德逆地理解析key使用量统计(CommonGeoCount)表数据库访问层
 *
 * @author tanlie
 * @since 2024-06-13 15:48:14
 */
@Repository
@Mapper
public interface CommonGeoCountMapper extends BaseMapper<CommonGeoCount> {

    /**
     * 高德key 使用量
     *
     * @param page
     * @param wrapper
     * @return
     */
    @Select("SELECT c.*, k.remark FROM common_geo_count c LEFT JOIN common_geo_key k ON c.geo_key = k.geo_key ${ew.customSqlSegment}")
    Page<GaoDeKeyPageResp> selectCountPage(Page<CommonGeoCount> page, @Param(Constants.WRAPPER) Wrapper<CommonGeoCount> wrapper);


}

