package com.yonge.cooleshow.biz.dal.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yonge.cooleshow.biz.dal.entity.SysArea;
import com.yonge.cooleshow.biz.dal.wrapper.StatGroupWrapper;
import com.yonge.cooleshow.biz.dal.wrapper.SysAreaWrapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * 区域表
 * 2022-11-23 18:28:58
 */
public interface SysAreaMapper extends BaseMapper<SysArea>{

	/**
	 * 分页查询
	 * @param page IPage<SysAreaWrapper.SysArea>
	 * @param param SysAreaWrapper.SysAreaQuery
	 * @return List<SysAreaWrapper.SysArea>
	 */
	List<SysAreaWrapper.SysArea> selectPage(@Param("page") IPage<SysAreaWrapper.SysArea> page, @Param("param") SysAreaWrapper.SysAreaQuery param);

	/**
     * 根据code获取对象
     * @param codeList
     * @return
     */
    List<SysArea> queryByCodes(@Param("codeList") List<Integer> codeList);

    /**
     * 区域数量统计
     * @param areaIds 区域ID
     * @param delFlag 删除标记
     * @return List<StatGroupWrapper>
     */
    List<StatGroupWrapper> selectProvinceAreaNumberStatInfo(@Param("areaIds") List<Integer> areaIds, @Param("delFlag") Integer delFlag);

    /**
    * @description: 获取code和name映射
     * @param codeList
    * @return java.util.List<java.util.Map<java.lang.Integer,java.lang.String>>
    * @author zx
    * @date 2023/1/4 13:46
    */
    List<Map> getNameMap(@Param("codeList") Collection codeList);
}
