package com.fs.live.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fs.live.domain.LiveOrderDf;
import com.fs.live.mapper.LiveOrderDfMapper;
import com.fs.live.service.ILiveOrderDfService;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * 订单代服管家Service业务层处理
 *
 * @author fs
 * @date 2025-07-08
 */
@Service
public class LiveOrderDfServiceImpl extends ServiceImpl<LiveOrderDfMapper, LiveOrderDf> implements ILiveOrderDfService {

    /**
     * 查询订单代服管家
     *
     * @param orderId 订单代服管家主键
     * @return 订单代服管家
     */
    @Override
    public LiveOrderDf selectLiveOrderDfByOrderId(Long orderId)
    {
        return baseMapper.selectLiveOrderDfByOrderId(orderId);
    }

    /**
     * 查询订单代服管家列表
     *
     * @param fsStoreOrderDf 订单代服管家
     * @return 订单代服管家
     */
    @Override
    public List<LiveOrderDf> selectLiveOrderDfList(LiveOrderDf fsStoreOrderDf)
    {
        return baseMapper.selectLiveOrderDfList(fsStoreOrderDf);
    }

    /**
     * 新增订单代服管家
     *
     * @param fsStoreOrderDf 订单代服管家
     * @return 结果
     */
    @Override
    public int insertLiveOrderDf(LiveOrderDf fsStoreOrderDf)
    {
        fsStoreOrderDf.setCreateTime(new Date());
        return baseMapper.insertLiveOrderDf(fsStoreOrderDf);
    }

    /**
     * 修改订单代服管家
     *
     * @param fsStoreOrderDf 订单代服管家
     * @return 结果
     */
    @Override
    public int updateLiveOrderDf(LiveOrderDf fsStoreOrderDf)
    {
        return baseMapper.updateLiveOrderDf(fsStoreOrderDf);
    }

    /**
     * 批量删除订单代服管家
     *
     * @param orderIds 需要删除的订单代服管家主键
     * @return 结果
     */
    @Override
    public int deleteLiveOrderDfByOrderIds(Long[] orderIds)
    {
        return baseMapper.deleteLiveOrderDfByOrderIds(orderIds);
    }

    /**
     * 删除订单代服管家信息
     *
     * @param orderId 订单代服管家主键
     * @return 结果
     */
    @Override
    public int deleteLiveOrderDfByOrderId(Long orderId)
    {
        return baseMapper.deleteLiveOrderDfByOrderId(orderId);
    }
}
