package com.fastbee.ggroup.service.impl;

import java.util.ArrayList;
import java.util.List;

import com.fastbee.ggroup.domain.dto.GSiteDeviceDto;
import com.fastbee.ggroup.mapper.GSitesMapper;
import com.fastbee.iot.domain.Device;
import com.fastbee.iot.mapper.DeviceMapper;
import com.github.yulichang.query.MPJLambdaQueryWrapper;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fastbee.ggroup.mapper.GSiteDeviceMapper;
import com.fastbee.ggroup.domain.GSiteDevice;
import com.fastbee.ggroup.service.IGSiteDeviceService;

/**
 * 站点设备关系Service业务层处理
 * 
 * @author kerwincui
 * &#064;date  2024-11-05
 */
@Service
public class GSiteDeviceServiceImpl implements IGSiteDeviceService 
{
    @Autowired
    private GSiteDeviceMapper gSiteDeviceMapper;

    @Autowired
    private GSitesMapper gSitesMapper;

    @Autowired
    private DeviceMapper deviceMapper;

    /**
     * 查询站点设备关系
     * 
     * @param id 站点设备关系主键
     * @return 站点设备关系
     */
    @Override
    public GSiteDevice selectGSiteDeviceById(Long id)
    {
        return gSiteDeviceMapper.selectGSiteDeviceById(id);
    }

    /**
     * 查询站点设备关系列表
     * 
     * @param gSiteDevice 站点设备关系
     * @return 站点设备关系
     */
    @Override
    public List<GSiteDevice> selectGSiteDeviceList(GSiteDevice gSiteDevice)
    {
        return gSiteDeviceMapper.selectGSiteDeviceList(gSiteDevice);
    }

    /**
     * 新增站点设备关系
     * 
     * @param gSiteDevice 站点设备关系
     * @return 结果
     */
    @Override
    public int insertGSiteDevice(GSiteDevice gSiteDevice)
    {
        return gSiteDeviceMapper.insertGSiteDevice(gSiteDevice);
    }

    /**
     * 修改站点设备关系
     * 
     * @param gSiteDevice 站点设备关系
     * @return 结果
     */
    @Override
    public int updateGSiteDevice(GSiteDevice gSiteDevice)
    {
        return gSiteDeviceMapper.updateGSiteDevice(gSiteDevice);
    }

    /**
     * 批量删除站点设备关系
     * 
     * @param ids 需要删除的站点设备关系主键
     * @return 结果
     */
    @Override
    public int deleteGSiteDeviceByIds(Long[] ids)
    {
        return gSiteDeviceMapper.deleteGSiteDeviceByIds(ids);
    }

    /**
     * 删除站点设备关系信息
     * 
     * @param id 站点设备关系主键
     * @return 结果
     */
    @Override
    public int deleteGSiteDeviceById(Long id)
    {
        return gSiteDeviceMapper.deleteGSiteDeviceById(id);
    }

    /**
     * 查询站点设备已经关联关系信息
     *
     * @param id 站点设备关系主键
     * @return 结果
     */
    @Override
    public List<GSiteDeviceDto> getGSiteDeviceByDevice(Long id){

        return null;
    }
}
