package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysCityMapper;
import com.ruoyi.system.domain.SysCity;
import com.ruoyi.system.service.ISysCityService;

/**
 * 城市Service业务层处理
 * 
 * @author haotian
 * @date 2024-11-08
 */
@Service
public class SysCityServiceImpl implements ISysCityService 
{
    @Autowired
    private SysCityMapper sysCityMapper;

    /**
     * 查询城市
     * 
     * @param cityId 城市主键
     * @return 城市
     */
    @Override
    public SysCity selectSysCityByCityId(Long cityId)
    {
        return sysCityMapper.selectSysCityByCityId(cityId);
    }

    /**
     * 查询城市列表
     * 
     * @param sysCity 城市
     * @return 城市
     */
    @Override
    public List<SysCity> selectSysCityList(SysCity sysCity)
    {
        return sysCityMapper.selectSysCityList(sysCity);
    }

    /**
     * 新增城市
     * 
     * @param sysCity 城市
     * @return 结果
     */
    @Override
    public int insertSysCity(SysCity sysCity)
    {
        return sysCityMapper.insertSysCity(sysCity);
    }

    /**
     * 修改城市
     * 
     * @param sysCity 城市
     * @return 结果
     */
    @Override
    public int updateSysCity(SysCity sysCity)
    {
        return sysCityMapper.updateSysCity(sysCity);
    }

    /**
     * 批量删除城市
     * 
     * @param cityIds 需要删除的城市主键
     * @return 结果
     */
    @Override
    public int deleteSysCityByCityIds(Long[] cityIds)
    {
        return sysCityMapper.deleteSysCityByCityIds(cityIds);
    }

    /**
     * 删除城市信息
     * 
     * @param cityId 城市主键
     * @return 结果
     */
    @Override
    public int deleteSysCityByCityId(Long cityId)
    {
        return sysCityMapper.deleteSysCityByCityId(cityId);
    }
}
