package com.yihu.jw.hospital.message.dao;

import com.yihu.jw.entity.hospital.message.BaseUserMessageDO;
import com.yihu.jw.entity.hospital.message.BaseUserMsgContentDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

public interface BaseUserMsgContentDao extends PagingAndSortingRepository<BaseUserMsgContentDO, String>, JpaSpecificationExecutor<BaseUserMsgContentDO> {
    @Query(value = "select *  from base_user_msg_content t where t.base_user_msg_id = ?1 order by t.update_time desc ",nativeQuery = true)
    List<BaseUserMsgContentDO> getContentListByID(String base_user_msg_id);
}
