package com.sptg.iot.biz.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.sptg.iot.api.entity.IotSysConf;
import com.sptg.iot.biz.mapper.IotSysConfMapper;
import com.sptg.iot.biz.service.IotSysConfServiceInterface;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author zwx
 * @create 2020/10/20 10:24
 */
@Service
@RequiredArgsConstructor
public class IotSysConfServiceImpl extends ServiceImpl<IotSysConfMapper, IotSysConf> implements IotSysConfServiceInterface {

    @Override
    public IotSysConf findSysConfById(Long id) {
        Wrapper<IotSysConf> wrapper = new EntityWrapper<>();
        wrapper.eq("l_id",id);
        return this.selectOne(wrapper);
    }

    @Override
    public IotSysConf findSysConfByAppId(String appId) {
        Wrapper<IotSysConf> wrapper = new EntityWrapper<>();
        wrapper.eq("s_app_id",appId);
        return this.selectOne(wrapper);
    }
}
