package com.xtd.project.hkmanager.mapper;

import com.xtd.common.base.BaseMapper;
import com.xtd.project.hkmanager.entity.Region;
import com.xtd.project.hkmanager.entity.RegionForm;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RegionMapper extends BaseMapper<Region,String> {

    /**
     * 查询id
     * @return
     */
    public List<String> findIds();

    /**
     * 批量添加
     * @param list
     * @return
     */
    public int batchSave(@Param("list") List<Region> list);

    /**
     * 查询列表
     * @param region
     * @return
     */
    public List<Region> selectList(RegionForm region);

    /**
     * 删除
     * @param guid
     * @return
     */
    public int delete(@Param("guid") String guid);

    /**
     * 查询区域树
     * @param form
     * @return
     */
    public List<RegionForm> selectTree(RegionForm form);

    /**
     * 区域是否存在
     * @param region
     * @return
     */
    public int isExistRegion(Region region);
}