package com.ifish.dao;

import com.ifish.entity.DevicePetUser;
import com.ifish.entity.DeviceUser;
import com.ifish.entity.DeviceUserId;

import java.util.List;

/** 
 * @ClassName: DeviceUserDao 
 * @Description: TODO 
 * @author ggw 
 *  
 */
public interface DevicePetUserDao extends BaseDao<DevicePetUser, DeviceUserId>{
	
	public void removeAll(List<DevicePetUser> list);
	
	/**
	 * 查询用户的设备数量
	 * @param userId
	 * @return
	 */
	public int getDeviceNumById(Integer userId);

	/**
	 * 查询宠物店
	 * @param userId
	 * @return
	 */
	public List<String> getDeviceStoreName(Integer userId);

	List getDeviceIdByStoreNameAndUserId(Integer userId, String storeName);

	void updateStoreName(int userId, String oldName, String newName, String storeName);

	/**
	 * 根据deviceId查询设备和用户对应数据
	 * @param userId
	 * @return
	 */
	List<DevicePetUser> getUserIdByDeviceId(Integer userId);

	List<DevicePetUser> findByDeviceId(Integer deviceId);

	DevicePetUser getDevicePetUserByUseridAndDeviceId(String userId, String deviceId);
}
