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.HospitalPharmacyOrderLogsMapper;
import com.fs.hospital.domain.HospitalPharmacyOrderLogs;
import com.fs.hospital.service.IHospitalPharmacyOrderLogsService;

/**
 * 日志Service业务层处理
 * 
 * @author fs
 * @date 2024-03-26
 */
@Service
public class HospitalPharmacyOrderLogsServiceImpl implements IHospitalPharmacyOrderLogsService 
{
    @Autowired
    private HospitalPharmacyOrderLogsMapper hospitalPharmacyOrderLogsMapper;

    /**
     * 查询日志
     * 
     * @param logsId 日志主键
     * @return 日志
     */
    @Override
    public HospitalPharmacyOrderLogs selectHospitalPharmacyOrderLogsByLogsId(Long logsId)
    {
        return hospitalPharmacyOrderLogsMapper.selectHospitalPharmacyOrderLogsByLogsId(logsId);
    }

    /**
     * 查询日志列表
     * 
     * @param hospitalPharmacyOrderLogs 日志
     * @return 日志
     */
    @Override
    public List<HospitalPharmacyOrderLogs> selectHospitalPharmacyOrderLogsList(HospitalPharmacyOrderLogs hospitalPharmacyOrderLogs)
    {
        return hospitalPharmacyOrderLogsMapper.selectHospitalPharmacyOrderLogsList(hospitalPharmacyOrderLogs);
    }

    /**
     * 新增日志
     * 
     * @param hospitalPharmacyOrderLogs 日志
     * @return 结果
     */
    @Override
    public int insertHospitalPharmacyOrderLogs(HospitalPharmacyOrderLogs hospitalPharmacyOrderLogs)
    {
        hospitalPharmacyOrderLogs.setCreateTime(DateUtils.getNowDate());
        return hospitalPharmacyOrderLogsMapper.insertHospitalPharmacyOrderLogs(hospitalPharmacyOrderLogs);
    }

    /**
     * 修改日志
     * 
     * @param hospitalPharmacyOrderLogs 日志
     * @return 结果
     */
    @Override
    public int updateHospitalPharmacyOrderLogs(HospitalPharmacyOrderLogs hospitalPharmacyOrderLogs)
    {
        return hospitalPharmacyOrderLogsMapper.updateHospitalPharmacyOrderLogs(hospitalPharmacyOrderLogs);
    }

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

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