package com.ruoyi.system.mapper.grid;

import com.ruoyi.system.domain.grid.GridCompany;
import com.ruoyi.system.domain.grid.GridCompanyExample;
import com.ruoyi.system.domain.grid.vo.GridCompanySearchParam;
import com.ruoyi.system.domain.grid.vo.SimpleGridCompanyItem;
import org.apache.ibatis.annotations.Param;

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

public interface GridCompanyMapper {
    long countByExample(GridCompanyExample example);

    int deleteByExample(GridCompanyExample example);

    int deleteByPrimaryKey(String id);

    int insert(GridCompany record);

    int insertSelective(GridCompany record);

    List<GridCompany> selectByExample(GridCompanyExample example);

    GridCompany selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") GridCompany record, @Param("example") GridCompanyExample example);

    int updateByExample(@Param("record") GridCompany record, @Param("example") GridCompanyExample example);

    int updateByPrimaryKeySelective(GridCompany record);

    int updateByPrimaryKey(GridCompany record);

    List<Map<String, Object>> countGridCompany(@Param("wgCodeLikes") List<String> wgCode);

    List<Map<String, Object>> countGridCompanyByGrid();

    List<GridCompany> selectByRandom(@Param("companyNum") int companyNum, @Param("chooseCompanyType") String chooseCompanyType);

    Integer countByParam(GridCompanySearchParam param);

    List<GridCompany> listByParam(GridCompanySearchParam param);

    /**
     * 企业点位列表
     * @return
     */
    List<SimpleGridCompanyItem> simplePointList(@Param("wgCode") String wgCode, @Param("name")String name);
}
