package com.phm.manage.service.impl;

import com.phm.manage.domain.ExternalInterfaceLog;
import com.phm.manage.mapper.ExternalInterfaceLogMapper;
import com.phm.manage.service.IExternalInterfaceLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 外部接口日志Service业务层处理
 *
 * @author phm
 * @date 2023-08-22
 */
@Service
public class ExternalInterfaceLogServiceImpl implements IExternalInterfaceLogService {
    @Autowired
    private ExternalInterfaceLogMapper externalInterfaceLogMapper;

    /**
     * 查询外部接口日志
     *
     * @param id 外部接口日志主键
     * @return 外部接口日志
     */
    @Override
    public ExternalInterfaceLog selectExternalInterfaceLogById(Long id) {
        return externalInterfaceLogMapper.selectExternalInterfaceLogById(id);
    }

    /**
     * 查询外部接口日志列表
     *
     * @param externalInterfaceLog 外部接口日志
     * @return 外部接口日志
     */
    @Override
    public List<ExternalInterfaceLog> selectExternalInterfaceLogList(ExternalInterfaceLog externalInterfaceLog) {
        return externalInterfaceLogMapper.selectExternalInterfaceLogList(externalInterfaceLog);
    }

    /**
     * 新增外部接口日志
     *
     * @param externalInterfaceLog 外部接口日志
     * @return 结果
     */
    @Override
    public int insertExternalInterfaceLog(ExternalInterfaceLog externalInterfaceLog) {
        return externalInterfaceLogMapper.insertExternalInterfaceLog(externalInterfaceLog);
    }

    /**
     * 修改外部接口日志
     *
     * @param externalInterfaceLog 外部接口日志
     * @return 结果
     */
    @Override
    public int updateExternalInterfaceLog(ExternalInterfaceLog externalInterfaceLog) {
        return externalInterfaceLogMapper.updateExternalInterfaceLog(externalInterfaceLog);
    }

    /**
     * 批量删除外部接口日志
     *
     * @param ids 需要删除的外部接口日志主键
     * @return 结果
     */
    @Override
    public int deleteExternalInterfaceLogByIds(Long[] ids) {
        return externalInterfaceLogMapper.deleteExternalInterfaceLogByIds(ids);
    }

    /**
     * 删除外部接口日志信息
     *
     * @param id 外部接口日志主键
     * @return 结果
     */
    @Override
    public int deleteExternalInterfaceLogById(Long id) {
        return externalInterfaceLogMapper.deleteExternalInterfaceLogById(id);
    }
}
