package com.fs.store.mapper;

import java.util.List;

import com.fs.his.vo.CitysAreaVO;
import com.fs.store.domain.FsCity;
import org.apache.ibatis.annotations.Select;

/**
 * 城市Mapper接口
 *
 * @author fs
 * @date 2022-03-15
 */
public interface FsCityMapper
{
    /**
     * 查询城市
     *
     * @param id 城市ID
     * @return 城市
     */
    public FsCity selectFsCityById(Long id);

    /**
     * 查询城市列表
     *
     * @param fsCity 城市
     * @return 城市集合
     */
    public List<FsCity> selectFsCityList(FsCity fsCity);

    /**
     * 新增城市
     *
     * @param fsCity 城市
     * @return 结果
     */
    public int insertFsCity(FsCity fsCity);

    /**
     * 修改城市
     *
     * @param fsCity 城市
     * @return 结果
     */
    public int updateFsCity(FsCity fsCity);

    /**
     * 删除城市
     *
     * @param id 城市ID
     * @return 结果
     */
    public int deleteFsCityById(Long id);

    /**
     * 批量删除城市
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteFsCityByIds(Long[] ids);
    @Select("select * from fs_city where is_show=1")
    List<FsCity> selectFsCitys();

    @Select("SELECT city_id,name as city_name FROM fs_city where parent_id=0 ")
    List<CitysAreaVO> getCitysArea();
}
