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.SysTelecom;
import com.huimv.environ.eco.mapper.SysTelecomMapper;
import com.huimv.environ.eco.service.ISysTelecomService;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author astupidcoder
 * @since 2021-11-22
 */
@Service
public class SysTelecomServiceImpl extends ServiceImpl<SysTelecomMapper, SysTelecom> implements ISysTelecomService {

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