package com.ruoyi.system.service;

import com.ruoyi.system.mapper.SysFaultMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;


import javax.annotation.Resource;

@Service
public class SysFaultService {
    @Resource
    public SysFaultMapper sysFaultMapper;

    public void insertfault(String faultId,
                            String faultdescs,
                            String faultstatus,
                            String createtime,
                            String messageType,
                            String controllerId,
                            String deviceId,
                            String longitude,
                            String latitude,
                            String readpeople){
        sysFaultMapper.insertfault(faultId,faultdescs,faultstatus,createtime,messageType,controllerId,deviceId,longitude,latitude,readpeople);
    }

    public void updatefault(
                     String faultstatus,
                     String messageType,
                     String longitude,
                     String latitude,
                     String faultdescs,
                     String controllerId,
                     String deviceId,
                     String createtime){
        sysFaultMapper.updatefault(faultstatus, messageType, longitude, latitude, faultdescs, controllerId, deviceId, createtime);
    }

    public Integer selectfaultcount(@Param("fleetId")String fleetId){
        return sysFaultMapper.selectfaultcount(fleetId);
    }
    public void createmessage(@Param("tableName")String tableName){
        sysFaultMapper.createmessage(tableName);
    }


}
