package com.ssj.dao.weixin.message.dao;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.ssj.bean.weixin.message.domain.MessageReply;
@Repository
public interface MessageReplyDao extends JpaRepository<MessageReply, String> {

    public Page<MessageReply> findAll(Specification<MessageReply> specification, Pageable page);

    @Query(nativeQuery = true, value = " select  * from tb_message_reply where keyword = ?1  ")
    public MessageReply findByKeyword(String keyword);

    @Query(nativeQuery = true, value = " select  * from tb_message_reply where id = ?1  ")
    public MessageReply findById(String id);
}
