package com.ssj.dao.weixin.user.dao;

import com.ssj.bean.weixin.user.domain.UserCount;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;


/**
 * @author  ZhangCaibao
 * @version 2018年2月2日 下午4:12:29
 * 类说明
 */
@Repository
public interface UserCountDao extends JpaRepository<UserCount, String> {

	@Query(nativeQuery = true, value = "select *  from tb_user_count  where user_id =?1 and vip_id =?2 and type =?3 and to_date(now()) = to_date(create_time) ")
	UserCount findUserIdAndVipIdAndTypeAndToDays(String user_id,String vipId,int type);

}
