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.HospitalOrderLogsMapper;
import com.fs.hospital.domain.HospitalOrderLogs;
import com.fs.hospital.service.IHospitalOrderLogsService;

/**
 * 日志Service业务层处理
 * 
 * @author fs
 * @date 2024-03-22
 */
@Service
public class HospitalOrderLogsServiceImpl implements IHospitalOrderLogsService 
{
    @Autowired
    private HospitalOrderLogsMapper hospitalOrderLogsMapper;

    /**
     * 查询日志
     * 
     * @param logsId 日志主键
     * @return 日志
     */
    @Override
    public HospitalOrderLogs selectHospitalOrderLogsByLogsId(Long logsId)
    {
        return hospitalOrderLogsMapper.selectHospitalOrderLogsByLogsId(logsId);
    }

    /**
     * 查询日志列表
     * 
     * @param hospitalOrderLogs 日志
     * @return 日志
     */
    @Override
    public List<HospitalOrderLogs> selectHospitalOrderLogsList(HospitalOrderLogs hospitalOrderLogs)
    {
        return hospitalOrderLogsMapper.selectHospitalOrderLogsList(hospitalOrderLogs);
    }

    /**
     * 新增日志
     * 
     * @param hospitalOrderLogs 日志
     * @return 结果
     */
    @Override
    public int insertHospitalOrderLogs(HospitalOrderLogs hospitalOrderLogs)
    {
        hospitalOrderLogs.setCreateTime(DateUtils.getNowDate());
        return hospitalOrderLogsMapper.insertHospitalOrderLogs(hospitalOrderLogs);
    }

    /**
     * 修改日志
     * 
     * @param hospitalOrderLogs 日志
     * @return 结果
     */
    @Override
    public int updateHospitalOrderLogs(HospitalOrderLogs hospitalOrderLogs)
    {
        return hospitalOrderLogsMapper.updateHospitalOrderLogs(hospitalOrderLogs);
    }

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

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