package com.wzj.soopin.content.mapper.repository;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.wzj.soopin.content.domain.mo.MessageMO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;

import java.util.List;

@InterceptorIgnore(tenantLine = "true")
@Mapper
@Repository
public interface MessageRepository  {

    // 通过实现Repository，自定义条件查询
    List<MessageMO> findAllByToUserIdEqualsOrderByCreateTimeDesc(@Param("toUserId") String toUserId,
                                                                 @Param("pageable") Pageable pageable);

    void save(MessageMO messageMO);
    // void deleteAllByFromUserIdAndToUserIdAndMsgType();
}
