package com.fs.live.service.impl;


import com.fs.live.domain.LiveAfterSalesItem;
import com.fs.live.mapper.LiveAfterSalesItemMapper;
import com.fs.live.service.ILiveAfterSalesItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * 售后子Service业务层处理
 *
 * @author fs
 * @date 2025-07-08
 */
@Service
public class LiveAfterSalesItemServiceImpl  implements ILiveAfterSalesItemService {

    @Autowired
    private LiveAfterSalesItemMapper baseMapper;

    /**
     * 查询售后子
     *
     * @param id 售后子主键
     * @return 售后子
     */
    @Override
    public LiveAfterSalesItem selectLiveAfterSalesItemById(Long id)
    {
        return baseMapper.selectLiveAfterSalesItemById(id);
    }

    /**
     * 查询售后子列表
     *
     * @param liveAfterSalesItem 售后子
     * @return 售后子
     */
    @Override
    public List<LiveAfterSalesItem> selectLiveAfterSalesItemList(LiveAfterSalesItem liveAfterSalesItem)
    {
        return baseMapper.selectLiveAfterSalesItemList(liveAfterSalesItem);
    }

    /**
     * 新增售后子
     *
     * @param liveAfterSalesItem 售后子
     * @return 结果
     */
    @Override
    public int insertLiveAfterSalesItem(LiveAfterSalesItem liveAfterSalesItem)
    {
        return baseMapper.insertLiveAfterSalesItem(liveAfterSalesItem);
    }

    /**
     * 修改售后子
     *
     * @param liveAfterSalesItem 售后子
     * @return 结果
     */
    @Override
    public int updateLiveAfterSalesItem(LiveAfterSalesItem liveAfterSalesItem)
    {
        return baseMapper.updateLiveAfterSalesItem(liveAfterSalesItem);
    }

    /**
     * 批量删除售后子
     *
     * @param ids 需要删除的售后子主键
     * @return 结果
     */
    @Override
    public int deleteLiveAfterSalesItemByIds(Long[] ids)
    {
        return baseMapper.deleteLiveAfterSalesItemByIds(ids);
    }

    /**
     * 删除售后子信息
     *
     * @param id 售后子主键
     * @return 结果
     */
    @Override
    public int deleteLiveAfterSalesItemById(Long id)
    {
        return baseMapper.deleteLiveAfterSalesItemById(id);
    }

    @Override
    public List<LiveAfterSalesItem> selectLiveAfterSalesItemByAfterId(Long afterId) {
        return baseMapper.selectLiveAfterSalesItemByAfterId(afterId);
    }
}
