package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.butler.ButlerSettings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ButlerSettingsMapper;
import com.ruoyi.system.service.IButlerSettingsService;

/**
 * 物业管家设置Service业务层处理
 * 
 * @author boman
 * @date 2025-03-07
 */
@Service
public class ButlerSettingsServiceImpl implements IButlerSettingsService 
{
    @Autowired
    private ButlerSettingsMapper butlerSettingsMapper;

    /**
     * 查询物业管家设置
     * 
     * @param settingsId 物业管家设置主键
     * @return 物业管家设置
     */
    @Override
    public ButlerSettings selectButlerSettingsBySettingsId(Long settingsId)
    {
        return butlerSettingsMapper.selectButlerSettingsBySettingsId(settingsId);
    }

    /**
     * 查询物业管家设置列表
     * 
     * @param butlerSettings 物业管家设置
     * @return 物业管家设置
     */
    @Override
    public List<ButlerSettings> selectButlerSettingsList(ButlerSettings butlerSettings)
    {
        return butlerSettingsMapper.selectButlerSettingsList(butlerSettings);
    }

    /**
     * 新增物业管家设置
     * 
     * @param butlerSettings 物业管家设置
     * @return 结果
     */
    @Override
    public int insertButlerSettings(ButlerSettings butlerSettings)
    {
        butlerSettings.setCreateTime(DateUtils.getNowDate());
        return butlerSettingsMapper.insertButlerSettings(butlerSettings);
    }

    /**
     * 修改物业管家设置
     * 
     * @param butlerSettings 物业管家设置
     * @return 结果
     */
    @Override
    public int updateButlerSettings(ButlerSettings butlerSettings)
    {
        butlerSettings.setUpdateTime(DateUtils.getNowDate());
        return butlerSettingsMapper.updateButlerSettings(butlerSettings);
    }

    /**
     * 批量删除物业管家设置
     * 
     * @param settingsIds 需要删除的物业管家设置主键
     * @return 结果
     */
    @Override
    public int deleteButlerSettingsBySettingsIds(Long[] settingsIds)
    {
        return butlerSettingsMapper.deleteButlerSettingsBySettingsIds(settingsIds);
    }

    /**
     * 删除物业管家设置信息
     * 
     * @param settingsId 物业管家设置主键
     * @return 结果
     */
    @Override
    public int deleteButlerSettingsBySettingsId(Long settingsId)
    {
        return butlerSettingsMapper.deleteButlerSettingsBySettingsId(settingsId);
    }
}
