package com.fs.his.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fs.his.param.FsShareAmountDetailParam;
import com.fs.his.vo.FsShareAmountDetailVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.his.mapper.FsShareAmountDetailMapper;
import com.fs.his.domain.FsShareAmountDetail;
import com.fs.his.service.IFsShareAmountDetailService;

/**
 * 分账明细Service业务层处理
 * 
 * @author fs
 * @date 2025-12-02
 */
@Service
public class FsShareAmountDetailServiceImpl extends ServiceImpl<FsShareAmountDetailMapper, FsShareAmountDetail> implements IFsShareAmountDetailService {

    /**
     * 查询分账明细
     * 
     * @param id 分账明细主键
     * @return 分账明细
     */
    @Override
    public FsShareAmountDetail selectFsShareAmountDetailById(Long id)
    {
        return baseMapper.selectFsShareAmountDetailById(id);
    }

    /**
     * 查询分账明细列表
     * 
     * @param fsShareAmountDetail 分账明细
     * @return 分账明细
     */
    @Override
    public List<FsShareAmountDetailVO> selectFsShareAmountDetailList(FsShareAmountDetailParam fsShareAmountDetail)
    {
        return baseMapper.selectFsShareAmountDetailList(fsShareAmountDetail);
    }

    /**
     * 新增分账明细
     * 
     * @param fsShareAmountDetail 分账明细
     * @return 结果
     */
    @Override
    public int insertFsShareAmountDetail(FsShareAmountDetail fsShareAmountDetail)
    {
        fsShareAmountDetail.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertFsShareAmountDetail(fsShareAmountDetail);
    }

    /**
     * 修改分账明细
     * 
     * @param fsShareAmountDetail 分账明细
     * @return 结果
     */
    @Override
    public int updateFsShareAmountDetail(FsShareAmountDetail fsShareAmountDetail)
    {
        fsShareAmountDetail.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateFsShareAmountDetail(fsShareAmountDetail);
    }

    /**
     * 批量删除分账明细
     * 
     * @param ids 需要删除的分账明细主键
     * @return 结果
     */
    @Override
    public int deleteFsShareAmountDetailByIds(Long[] ids)
    {
        return baseMapper.deleteFsShareAmountDetailByIds(ids);
    }

    /**
     * 删除分账明细信息
     * 
     * @param id 分账明细主键
     * @return 结果
     */
    @Override
    public int deleteFsShareAmountDetailById(Long id)
    {
        return baseMapper.deleteFsShareAmountDetailById(id);
    }
}
