package com.sptg.third.biz.topsailiot.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.sptg.third.api.entity.topsailiot.TopsailAlarm;
import com.sptg.third.api.entity.topsailiot.TopsailDevice;
import com.sptg.third.biz.mapper.topsailiot.TopsailAlarmMapper;
import com.sptg.third.biz.mapper.topsailiot.TopsailDeviceMapper;
import com.sptg.third.biz.topsailiot.service.TopsailAlarmServiceInterface;
import com.sptg.third.biz.topsailiot.service.TopsailDeviceServiceInterface;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author zwx
 * @create 2020/12/6 11:04
 */
@Service
@RequiredArgsConstructor
public class TopsailAlarmServiceImpl extends ServiceImpl<TopsailAlarmMapper, TopsailAlarm> implements TopsailAlarmServiceInterface {

    @Override
    public TopsailAlarm getByAlarmId(Integer alarmId) {
        Wrapper<TopsailAlarm> wrapper = new EntityWrapper<>();
        wrapper.eq("i_alarm_id", alarmId);
        TopsailAlarm topsailAlarm = this.selectOne(wrapper);
        return topsailAlarm;
    }
}
