package com.muyu.enterpise.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muyu.domain.FaultType;
import com.muyu.enterpise.mapper.FaultTypeMapper;
import com.muyu.enterpise.service.FaultTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 故障类型
 *  * @className: FaultLog  ️✈️
 *  * @author: Yang 鹏  🦅
 *  * @date: 2024/9/23 21:06 ⏰
 *  * @Version: 1.0
 *  * @description: 故障检测
 */
@Service
public class FaultTypeServiceImpl extends ServiceImpl<FaultTypeMapper, FaultType> implements FaultTypeService {
    @Autowired
    private FaultTypeMapper faultTypeMapper;
    /**
     * 故障码分类查询
     * @return
     */
    @Override
    public List<FaultType> select() {
        LambdaQueryWrapper<FaultType> queryWrapper = new LambdaQueryWrapper<>();
        List<FaultType> list = this.list(queryWrapper);
        return list;
    }

    @Override
    public Integer add(FaultType faultType) {
        return faultTypeMapper.add(faultType);
    }

    @Override
    public Integer update(FaultType faultType) {
        return faultTypeMapper.update(faultType);
    }

    @Override
    public Integer delete(Integer id) {
        return faultTypeMapper.delete(id);
    }
}
