package com.ssj.service.sys.schoolmatecircle.service;

import com.ssj.bean.sys.schoolmatecircle.domain.SchoolmateMessage;
import com.ssj.framework.core.common.service.BaseService;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author Mount Liu
 * @date 2018/8/15
 */
public interface SchoolmateMessageService extends BaseService<SchoolmateMessage, String> {

    /**
     * 总数
     * @param userId
     * @return
     */
    long countByUserId(String userId);

    /**
     * 根据用户查询所有消息
     * @param userId
     * @return
     */
    List<Map<String, Object>> findByUserId(String userId);

    /**
     * 删除查询后的未读消息
     * @param userId
     * @param now
     * @return
     */
    void removeAfterQueryUnReadMessage(String userId, Date now);

}
