package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.mapper.NightMarketMapper;
import com.ruoyi.system.domain.NightMarket;
import com.ruoyi.system.service.INightMarketService;

/**
 * 夜市Service业务层处理
 *
 * @author ruoyi
 * @date 2025-09-02
 */
@Service
public class NightMarketServiceImpl extends ServiceImpl<BaseMapper<NightMarket>,NightMarket> implements INightMarketService
{
    @Autowired
    private NightMarketMapper nightMarketMapper;

    /**
     * 查询夜市
     *
     * @param id 夜市主键
     * @return 夜市
     */
    @Override
    public NightMarket selectNightMarketById(Long id)
    {
        return nightMarketMapper.selectNightMarketById(id);
    }

    /**
     * 查询夜市列表
     *
     * @param nightMarket 夜市
     * @return 夜市
     */
    @Override
    public List<NightMarket> selectNightMarketList(NightMarket nightMarket)
    {
        return nightMarketMapper.selectNightMarketList(nightMarket);
    }

    /**
     * 新增夜市
     *
     * @param nightMarket 夜市
     * @return 结果
     */
    @Override
    public int insertNightMarket(NightMarket nightMarket)
    {
        return nightMarketMapper.insertNightMarket(nightMarket);
    }

    /**
     * 修改夜市
     *
     * @param nightMarket 夜市
     * @return 结果
     */
    @Override
    public int updateNightMarket(NightMarket nightMarket)
    {
        return nightMarketMapper.updateNightMarket(nightMarket);
    }

    /**
     * 批量删除夜市
     *
     * @param ids 需要删除的夜市主键
     * @return 结果
     */
    @Override
    public int deleteNightMarketByIds(Long[] ids)
    {
        return nightMarketMapper.deleteNightMarketByIds(ids);
    }

    /**
     * 删除夜市信息
     *
     * @param id 夜市主键
     * @return 结果
     */
    @Override
    public int deleteNightMarketById(Long id)
    {
        return nightMarketMapper.deleteNightMarketById(id);
    }
}
