package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.houseInfo.PropertySettings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PropertySettingsMapper;
import com.ruoyi.system.service.IPropertySettingsService;

/**
 * 物业费设置Service业务层处理
 * 
 * @author boman
 * @date 2025-03-11
 */
@Service
public class PropertySettingsServiceImpl implements IPropertySettingsService 
{
    @Autowired
    private PropertySettingsMapper propertySettingsMapper;

    /**
     * 查询物业费设置
     * 
     * @param settingsId 物业费设置主键
     * @return 物业费设置
     */
    @Override
    public PropertySettings selectPropertySettingsBySettingsId(Long settingsId)
    {
        return propertySettingsMapper.selectPropertySettingsBySettingsId(settingsId);
    }

    /**
     * 查询物业费设置列表
     * 
     * @param propertySettings 物业费设置
     * @return 物业费设置
     */
    @Override
    public List<PropertySettings> selectPropertySettingsList(PropertySettings propertySettings)
    {
        return propertySettingsMapper.selectPropertySettingsList(propertySettings);
    }

    /**
     * 新增物业费设置
     * 
     * @param propertySettings 物业费设置
     * @return 结果
     */
    @Override
    public int insertPropertySettings(PropertySettings propertySettings)
    {
        propertySettings.setCreateTime(DateUtils.getNowDate());
        return propertySettingsMapper.insertPropertySettings(propertySettings);
    }

    /**
     * 修改物业费设置
     * 
     * @param propertySettings 物业费设置
     * @return 结果
     */
    @Override
    public int updatePropertySettings(PropertySettings propertySettings)
    {
        propertySettings.setUpdateTime(DateUtils.getNowDate());
        return propertySettingsMapper.updatePropertySettings(propertySettings);
    }

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

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