package com.fs.store.service.impl;

import java.util.Collections;
import java.util.List;

import com.fs.his.vo.CitysAreaVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import com.fs.store.mapper.FsCityMapper;
import com.fs.store.domain.FsCity;
import com.fs.store.service.IFsCityService;

/**
 * 城市Service业务层处理
 *
 * @author fs
 * @date 2022-03-15
 */
@Service
public class FsCityServiceImpl implements IFsCityService
{
    @Autowired
    private FsCityMapper fsCityMapper;

    /**
     * 查询城市
     *
     * @param id 城市ID
     * @return 城市
     */
    @Override
    public FsCity selectFsCityById(Long id)
    {
        return fsCityMapper.selectFsCityById(id);
    }

    /**
     * 查询城市列表
     *
     * @param fsCity 城市
     * @return 城市
     */
    @Override
    public List<FsCity> selectFsCityList(FsCity fsCity)
    {
        return fsCityMapper.selectFsCityList(fsCity);
    }

    /**
     * 新增城市
     *
     * @param fsCity 城市
     * @return 结果
     */
    @Override
    public int insertFsCity(FsCity fsCity)
    {
        return fsCityMapper.insertFsCity(fsCity);
    }

    /**
     * 修改城市
     *
     * @param fsCity 城市
     * @return 结果
     */
    @Override
    public int updateFsCity(FsCity fsCity)
    {
        return fsCityMapper.updateFsCity(fsCity);
    }

    /**
     * 批量删除城市
     *
     * @param ids 需要删除的城市ID
     * @return 结果
     */
    @Override
    public int deleteFsCityByIds(Long[] ids)
    {
        return fsCityMapper.deleteFsCityByIds(ids);
    }

    /**
     * 删除城市信息
     *
     * @param id 城市ID
     * @return 结果
     */
    @Override
    public int deleteFsCityById(Long id)
    {
        return fsCityMapper.deleteFsCityById(id);
    }

    @Override

    public List<FsCity> selectFsCitys() {
        return fsCityMapper.selectFsCitys();
    }

    @Override
    public List<CitysAreaVO> getCitysArea() {
        return fsCityMapper.getCitysArea();
    }
}
