package com.ssj.dao.weixin.tyzyb.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.ssj.bean.weixin.tyzyb.domain.TbTyZyb;

@Repository
public interface ITyZybDao extends JpaRepository<TbTyZyb, String> {

	@Query(nativeQuery = true, value = " SELECT * from tb_ty_zyb where click_user=?1 and share_code is not null order by create_time desc limit 1")
	TbTyZyb findByAnyCondition(String userId);

}
