package com.fs.hospital.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.hospital.mapper.HospitalOutpatientOrderLogsMapper;
import com.fs.hospital.domain.HospitalOutpatientOrderLogs;
import com.fs.hospital.service.IHospitalOutpatientOrderLogsService;

/**
 * 日志Service业务层处理
 * 
 * @author fs
 * @date 2024-03-26
 */
@Service
public class HospitalOutpatientOrderLogsServiceImpl implements IHospitalOutpatientOrderLogsService 
{
    @Autowired
    private HospitalOutpatientOrderLogsMapper hospitalOutpatientOrderLogsMapper;

    /**
     * 查询日志
     * 
     * @param logsId 日志主键
     * @return 日志
     */
    @Override
    public HospitalOutpatientOrderLogs selectHospitalOutpatientOrderLogsByLogsId(Long logsId)
    {
        return hospitalOutpatientOrderLogsMapper.selectHospitalOutpatientOrderLogsByLogsId(logsId);
    }

    /**
     * 查询日志列表
     * 
     * @param hospitalOutpatientOrderLogs 日志
     * @return 日志
     */
    @Override
    public List<HospitalOutpatientOrderLogs> selectHospitalOutpatientOrderLogsList(HospitalOutpatientOrderLogs hospitalOutpatientOrderLogs)
    {
        return hospitalOutpatientOrderLogsMapper.selectHospitalOutpatientOrderLogsList(hospitalOutpatientOrderLogs);
    }

    /**
     * 新增日志
     * 
     * @param hospitalOutpatientOrderLogs 日志
     * @return 结果
     */
    @Override
    public int insertHospitalOutpatientOrderLogs(HospitalOutpatientOrderLogs hospitalOutpatientOrderLogs)
    {
        hospitalOutpatientOrderLogs.setCreateTime(DateUtils.getNowDate());
        return hospitalOutpatientOrderLogsMapper.insertHospitalOutpatientOrderLogs(hospitalOutpatientOrderLogs);
    }

    /**
     * 修改日志
     * 
     * @param hospitalOutpatientOrderLogs 日志
     * @return 结果
     */
    @Override
    public int updateHospitalOutpatientOrderLogs(HospitalOutpatientOrderLogs hospitalOutpatientOrderLogs)
    {
        return hospitalOutpatientOrderLogsMapper.updateHospitalOutpatientOrderLogs(hospitalOutpatientOrderLogs);
    }

    /**
     * 批量删除日志
     * 
     * @param logsIds 需要删除的日志主键
     * @return 结果
     */
    @Override
    public int deleteHospitalOutpatientOrderLogsByLogsIds(Long[] logsIds)
    {
        return hospitalOutpatientOrderLogsMapper.deleteHospitalOutpatientOrderLogsByLogsIds(logsIds);
    }

    /**
     * 删除日志信息
     * 
     * @param logsId 日志主键
     * @return 结果
     */
    @Override
    public int deleteHospitalOutpatientOrderLogsByLogsId(Long logsId)
    {
        return hospitalOutpatientOrderLogsMapper.deleteHospitalOutpatientOrderLogsByLogsId(logsId);
    }
}
