package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BasicInfoMapper;
import com.ruoyi.system.domain.BasicInfo;
import com.ruoyi.system.service.IBasicInfoService;

/**
 * 基本信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-12
 */
@Service
public class BasicInfoServiceImpl implements IBasicInfoService 
{
    @Autowired
    private BasicInfoMapper basicInfoMapper;

    /**
     * 查询基本信息
     * 
     * @param id 基本信息主键
     * @return 基本信息
     */
    @Override
    public BasicInfo selectBasicInfoById(Long id)
    {
        return basicInfoMapper.selectBasicInfoById(id);
    }

    /**
     * 查询基本信息列表
     * 
     * @param basicInfo 基本信息
     * @return 基本信息
     */
    @Override
    public List<BasicInfo> selectBasicInfoList(BasicInfo basicInfo)
    {
        return basicInfoMapper.selectBasicInfoList(basicInfo);
    }

    /**
     * 新增基本信息
     * 
     * @param basicInfo 基本信息
     * @return 结果
     */
    @Override
    public int insertBasicInfo(BasicInfo basicInfo)
    {
        basicInfo.setCreateTime(DateUtils.getNowDate());
        return basicInfoMapper.insertBasicInfo(basicInfo);
    }

    /**
     * 修改基本信息
     * 
     * @param basicInfo 基本信息
     * @return 结果
     */
    @Override
    public int updateBasicInfo(BasicInfo basicInfo)
    {
        basicInfo.setUpdateTime(DateUtils.getNowDate());
        return basicInfoMapper.updateBasicInfo(basicInfo);
    }

    /**
     * 批量删除基本信息
     * 
     * @param ids 需要删除的基本信息主键
     * @return 结果
     */
    @Override
    public int deleteBasicInfoByIds(Long[] ids)
    {
        return basicInfoMapper.deleteBasicInfoByIds(ids);
    }

    /**
     * 删除基本信息信息
     * 
     * @param id 基本信息主键
     * @return 结果
     */
    @Override
    public int deleteBasicInfoById(Long id)
    {
        return basicInfoMapper.deleteBasicInfoById(id);
    }
}
