package com.zioinfo.signage.mapper;

import com.zioinfo.signage.domain.GatewayVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface GatewayMapper {
    List<GatewayVo> findAll(@Param("tenantCode") String tenantCode,
                          @Param("storeId") Long storeId,
                          @Param("deviceType") String deviceType,
                          @Param("status") String status);
    GatewayVo findById(@Param("id") Long id);
    GatewayVo findByDeviceId(@Param("deviceId") String deviceId);
    int insert(GatewayVo hcore);
    int update(GatewayVo hcore);
    int updateStatus(@Param("id") Long id, @Param("status") String status);
    int delete(@Param("id") Long id);
    long countOnline(@Param("tenantCode") String tenantCode);
    long countOffline(@Param("tenantCode") String tenantCode);
    long countAll(@Param("tenantCode") String tenantCode);
}
