package com.fs.doc.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import com.fs.doc.param.DocOrderQueryParam;
import com.fs.doc.vo.DocOrderListQueryVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.doc.mapper.DocOrderMapper;
import com.fs.doc.domain.DocOrder;
import com.fs.doc.service.IDocOrderService;

/**
 * 问医生Service业务层处理
 * 
 * @author fs
 * @date 2023-01-09
 */
@Service
public class DocOrderServiceImpl implements IDocOrderService 
{
    @Autowired
    private DocOrderMapper docOrderMapper;

    /**
     * 查询问医生
     * 
     * @param orderId 问医生ID
     * @return 问医生
     */
    @Override
    public DocOrder selectDocOrderById(Long orderId)
    {
        return docOrderMapper.selectDocOrderById(orderId);
    }

    /**
     * 查询问医生列表
     * 
     * @param docOrder 问医生
     * @return 问医生
     */
    @Override
    public List<DocOrder> selectDocOrderList(DocOrder docOrder)
    {
        return docOrderMapper.selectDocOrderList(docOrder);
    }

    /**
     * 新增问医生
     * 
     * @param docOrder 问医生
     * @return 结果
     */
    @Override
    public int insertDocOrder(DocOrder docOrder)
    {
        docOrder.setCreateTime(DateUtils.getNowDate());
        return docOrderMapper.insertDocOrder(docOrder);
    }

    /**
     * 修改问医生
     * 
     * @param docOrder 问医生
     * @return 结果
     */
    @Override
    public int updateDocOrder(DocOrder docOrder)
    {
        return docOrderMapper.updateDocOrder(docOrder);
    }

    /**
     * 批量删除问医生
     * 
     * @param orderIds 需要删除的问医生ID
     * @return 结果
     */
    @Override
    public int deleteDocOrderByIds(Long[] orderIds)
    {
        return docOrderMapper.deleteDocOrderByIds(orderIds);
    }

    /**
     * 删除问医生信息
     * 
     * @param orderId 问医生ID
     * @return 结果
     */
    @Override
    public int deleteDocOrderById(Long orderId)
    {
        return docOrderMapper.deleteDocOrderById(orderId);
    }

    @Override
    public List<DocOrderListQueryVO> selectDocOrderListVOQuery(DocOrderQueryParam param) {
        return docOrderMapper.selectDocOrderListVOQuery(param);
    }
}
