package com.ghy.order.service.impl;

import java.util.List;

import com.ghy.order.domain.OrderCallRecord;
import com.ghy.order.mapper.OrderCallRecordMapper;
import com.ghy.order.service.IOrderCallRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ghy.common.core.text.Convert;

/**
 * 订单约单记录Service业务层处理
 *
 * @author clunt
 * @date 2023-06-04
 */
@Service
public class OrderCallRecordServiceImpl implements IOrderCallRecordService
{
    @Autowired
    private OrderCallRecordMapper orderCallRecordMapper;

    /**
     * 查询订单约单记录
     *
     * @param id 订单约单记录主键
     * @return 订单约单记录
     */
    @Override
    public OrderCallRecord selectOrderCallRecordById(Long id)
    {
        return orderCallRecordMapper.selectOrderCallRecordById(id);
    }

    /**
     * 查询订单约单记录列表
     *
     * @param orderCallRecord 订单约单记录
     * @return 订单约单记录
     */
    @Override
    public List<OrderCallRecord> selectOrderCallRecordList(OrderCallRecord orderCallRecord)
    {
        return orderCallRecordMapper.selectOrderCallRecordList(orderCallRecord);
    }

    /**
     * 新增订单约单记录
     *
     * @param orderCallRecord 订单约单记录
     * @return 结果
     */
    @Override
    public int insertOrderCallRecord(OrderCallRecord orderCallRecord)
    {
        return orderCallRecordMapper.insertOrderCallRecord(orderCallRecord);
    }

    /**
     * 修改订单约单记录
     *
     * @param orderCallRecord 订单约单记录
     * @return 结果
     */
    @Override
    public int updateOrderCallRecord(OrderCallRecord orderCallRecord)
    {
        return orderCallRecordMapper.updateOrderCallRecord(orderCallRecord);
    }

    /**
     * 批量删除订单约单记录
     *
     * @param ids 需要删除的订单约单记录主键
     * @return 结果
     */
    @Override
    public int deleteOrderCallRecordByIds(String ids)
    {
        return orderCallRecordMapper.deleteOrderCallRecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除订单约单记录信息
     *
     * @param id 订单约单记录主键
     * @return 结果
     */
    @Override
    public int deleteOrderCallRecordById(Long id)
    {
        return orderCallRecordMapper.deleteOrderCallRecordById(id);
    }

}