package com.flossom.system.service.impl;

import java.util.List;

import com.flossom.common.core.domain.entity.WxInstrumentInstructions;
import com.flossom.common.core.mapper.WxInstrumentInstructionsMapper;
import com.flossom.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.flossom.system.service.IWxInstrumentInstructionsService;

/**
 * 仪器说明书Service业务层处理
 *
 * @author flossom
 * @date 2024-01-16
 */
@Service
public class WxInstrumentInstructionsServiceImpl implements IWxInstrumentInstructionsService {

    @Autowired
    private WxInstrumentInstructionsMapper wxInstrumentInstructionsMapper;

    /**
     * 查询仪器说明书
     *
     * @param id 仪器说明书主键
     * @return 仪器说明书
     */
    @Override
    public WxInstrumentInstructions selectWxInstrumentInstructionsById(Long id) {
        return wxInstrumentInstructionsMapper.selectWxInstrumentInstructionsById(id);
    }

    /**
     * 查询仪器说明书列表
     *
     * @param wxInstrumentInstructions 仪器说明书
     * @return 仪器说明书
     */
    @Override
    public List<WxInstrumentInstructions> selectWxInstrumentInstructionsList(WxInstrumentInstructions wxInstrumentInstructions) {
        return wxInstrumentInstructionsMapper.selectWxInstrumentInstructionsList(wxInstrumentInstructions);
    }

    /**
     * 新增仪器说明书
     *
     * @param wxInstrumentInstructions 仪器说明书
     * @return 结果
     */
    @Override
    public int insertWxInstrumentInstructions(WxInstrumentInstructions wxInstrumentInstructions) {
        wxInstrumentInstructions.setCreateTime(DateUtils.getNowDate());
        return wxInstrumentInstructionsMapper.insertWxInstrumentInstructions(wxInstrumentInstructions);
    }

    /**
     * 修改仪器说明书
     *
     * @param wxInstrumentInstructions 仪器说明书
     * @return 结果
     */
    @Override
    public int updateWxInstrumentInstructions(WxInstrumentInstructions wxInstrumentInstructions) {
        return wxInstrumentInstructionsMapper.updateWxInstrumentInstructions(wxInstrumentInstructions);
    }

    /**
     * 批量删除仪器说明书
     *
     * @param ids 需要删除的仪器说明书主键
     * @return 结果
     */
    @Override
    public int deleteWxInstrumentInstructionsByIds(Long[] ids) {
        return wxInstrumentInstructionsMapper.deleteWxInstrumentInstructionsByIds(ids);
    }

    /**
     * 删除仪器说明书信息
     *
     * @param id 仪器说明书主键
     * @return 结果
     */
    @Override
    public int deleteWxInstrumentInstructionsById(Long id) {
        return wxInstrumentInstructionsMapper.deleteWxInstrumentInstructionsById(id);
    }
}
