package com.ruoyi.logistics.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.logistics.mapper.SysCityMapper;
import com.ruoyi.logistics.domain.SysCity;
import com.ruoyi.logistics.service.ISysCityService;

/**
 * 城市管理Service业务层处理
 * 
 * @author RuiJing
 * @date 2026-01-29
 */
@Service
public class SysCityServiceImpl implements ISysCityService 
{
    @Autowired
    private SysCityMapper sysCityMapper;

    /**
     * 查询城市管理
     * 
     * @param id 城市管理主键
     * @return 城市管理
     */
    @Override
    public SysCity selectSysCityById(Long id)
    {
        return sysCityMapper.selectSysCityById(id);
    }

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

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

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

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

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