package com.huimv.environ.eco.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huimv.common.utils.Result;
import com.huimv.common.utils.ResultCode;
import com.huimv.environ.eco.entity.SysTelecomEvent;
import com.huimv.environ.eco.mapper.SysTelecomEventMapper;
import com.huimv.environ.eco.service.ISysTelecomEventService;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class SysTelecomEventServiceImpl extends ServiceImpl<SysTelecomEventMapper, SysTelecomEvent> implements ISysTelecomEventService {

    @Override
    public Result listByRoom(Map map) {
        String deviceId = (String)map.get("deviceId");
        QueryWrapper<SysTelecomEvent> wrapper = new QueryWrapper<>();
        wrapper.eq("device_id",deviceId);
        this.list(wrapper);
        return new Result(ResultCode.SUCCESS,wrapper);
    }

}
