package com.fs.his.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.his.mapper.FsInquiryOrderMediaMapper;
import com.fs.his.domain.FsInquiryOrderMedia;
import com.fs.his.service.IFsInquiryOrderMediaService;

/**
 * 媒体订单Service业务层处理
 * 
 * @author fs
 * @date 2023-06-12
 */
@Service
public class FsInquiryOrderMediaServiceImpl implements IFsInquiryOrderMediaService 
{
    @Autowired
    private FsInquiryOrderMediaMapper fsInquiryOrderMediaMapper;

    /**
     * 查询媒体订单
     * 
     * @param mediaId 媒体订单主键
     * @return 媒体订单
     */
    @Override
    public FsInquiryOrderMedia selectFsInquiryOrderMediaByMediaId(Long mediaId)
    {
        return fsInquiryOrderMediaMapper.selectFsInquiryOrderMediaByMediaId(mediaId);
    }

    /**
     * 查询媒体订单列表
     * 
     * @param fsInquiryOrderMedia 媒体订单
     * @return 媒体订单
     */
    @Override
    public List<FsInquiryOrderMedia> selectFsInquiryOrderMediaList(FsInquiryOrderMedia fsInquiryOrderMedia)
    {
        return fsInquiryOrderMediaMapper.selectFsInquiryOrderMediaList(fsInquiryOrderMedia);
    }

    /**
     * 新增媒体订单
     * 
     * @param fsInquiryOrderMedia 媒体订单
     * @return 结果
     */
    @Override
    public int insertFsInquiryOrderMedia(FsInquiryOrderMedia fsInquiryOrderMedia)
    {
        fsInquiryOrderMedia.setCreateTime(DateUtils.getNowDate());
        return fsInquiryOrderMediaMapper.insertFsInquiryOrderMedia(fsInquiryOrderMedia);
    }

    /**
     * 修改媒体订单
     * 
     * @param fsInquiryOrderMedia 媒体订单
     * @return 结果
     */
    @Override
    public int updateFsInquiryOrderMedia(FsInquiryOrderMedia fsInquiryOrderMedia)
    {
        return fsInquiryOrderMediaMapper.updateFsInquiryOrderMedia(fsInquiryOrderMedia);
    }

    /**
     * 批量删除媒体订单
     * 
     * @param mediaIds 需要删除的媒体订单主键
     * @return 结果
     */
    @Override
    public int deleteFsInquiryOrderMediaByMediaIds(Long[] mediaIds)
    {
        return fsInquiryOrderMediaMapper.deleteFsInquiryOrderMediaByMediaIds(mediaIds);
    }

    /**
     * 删除媒体订单信息
     * 
     * @param mediaId 媒体订单主键
     * @return 结果
     */
    @Override
    public int deleteFsInquiryOrderMediaByMediaId(Long mediaId)
    {
        return fsInquiryOrderMediaMapper.deleteFsInquiryOrderMediaByMediaId(mediaId);
    }
}
