package com.ruoyi.system.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.landlord.HouseLandlord;
import com.ruoyi.system.mapper.HouseLandlordMapper;
import com.ruoyi.system.service.IHouseLandlordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 业主管理Service业务层处理
 * 
 * @author boman
 * @date 2025-02-14
 */
@Service
public class HouseLandlordServiceImpl implements IHouseLandlordService 
{
    @Autowired
    private HouseLandlordMapper houseLandlordMapper;

    /**
     * 查询业主管理
     * 
     * @param houseLandlordId 业主管理主键
     * @return 业主管理
     */
    @Override
    public HouseLandlord selectHouseLandlordByHouseLandlordId(Long houseLandlordId)
    {
        return houseLandlordMapper.selectHouseLandlordByHouseLandlordId(houseLandlordId);
    }

    /**
     * 查询业主管理列表
     * 
     * @param houseLandlord 业主管理
     * @return 业主管理
     */
    @Override
    public List<HouseLandlord> selectHouseLandlordList(HouseLandlord houseLandlord)
    {
        return houseLandlordMapper.selectHouseLandlordList(houseLandlord);
    }

    /**
     * 新增业主管理
     * 
     * @param houseLandlord 业主管理
     * @return 结果
     */
    @Override
    public int insertHouseLandlord(HouseLandlord houseLandlord)
    {
        houseLandlord.setCreateTime(DateUtils.getNowDate());
        return houseLandlordMapper.insertHouseLandlord(houseLandlord);
    }

    /**
     * 修改业主管理
     * 
     * @param houseLandlord 业主管理
     * @return 结果
     */
    @Override
    public int updateHouseLandlord(HouseLandlord houseLandlord)
    {
        houseLandlord.setUpdateTime(DateUtils.getNowDate());
        return houseLandlordMapper.updateHouseLandlord(houseLandlord);
    }

    /**
     * 批量删除业主管理
     * 
     * @param houseLandlordIds 需要删除的业主管理主键
     * @return 结果
     */
    @Override
    public int deleteHouseLandlordByHouseLandlordIds(Long[] houseLandlordIds)
    {
        return houseLandlordMapper.deleteHouseLandlordByHouseLandlordIds(houseLandlordIds);
    }

    /**
     * 删除业主管理信息
     * 
     * @param houseLandlordId 业主管理主键
     * @return 结果
     */
    @Override
    public int deleteHouseLandlordByHouseLandlordId(Long houseLandlordId)
    {
        return houseLandlordMapper.deleteHouseLandlordByHouseLandlordId(houseLandlordId);
    }
}
