package com.ssj.dao.sys.fx.dao;

import com.ssj.bean.sys.fx.domain.DeviceAct;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;


@Repository
public interface DeviceActDao extends JpaRepository<DeviceAct, String> {

	@Query(nativeQuery = true, value = " SELECT count(DISTINCT(t.imei)) from fx_device_act t where t.to_merchant_id=?1 AND t.type=1 ")
	public Integer countDeviceByMerchantId(String merchantId);
	
}
 