package com.sqx.modules.message.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sqx.common.utils.Result;
import com.sqx.modules.message.entity.MessageInfo;
import com.sqx.modules.sendRecord.entity.SendRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author fang
 * @date 2020/7/9
 */
@Mapper
public interface MessageInfoDao extends BaseMapper<MessageInfo> {

    int updateSendState(@Param("userId") Long userId,@Param("state") Integer state);

    IPage<MessageInfo> selectMessageByUserIdLimit1(@Param("pages") Page<SendRecord> pages, @Param("userId") Long userId);

    IPage<MessageInfo> selectComplaintByType(@Param("pages") Page<MessageInfo> pages, @Param("messageInfo") MessageInfo messageInfo);
}
