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.TopsailDevice;
import com.sptg.third.api.entity.topsailiot.TopsailDeviceConfig;
import com.sptg.third.biz.mapper.topsailiot.TopsailDeviceConfigMapper;
import com.sptg.third.biz.mapper.topsailiot.TopsailDeviceMapper;
import com.sptg.third.biz.topsailiot.service.TopsailDeviceConfigServiceInterface;
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 TopsailDeviceConfigServiceImpl extends ServiceImpl<TopsailDeviceConfigMapper, TopsailDeviceConfig> implements TopsailDeviceConfigServiceInterface {
    @Override
    public TopsailDeviceConfig getByImei(String imei) {
        Wrapper<TopsailDeviceConfig> wrapper = new EntityWrapper<>();
        wrapper.eq("s_imei", imei);
        TopsailDeviceConfig topsailDeviceConfig = this.selectOne(wrapper);
        return topsailDeviceConfig;
    }
}
