ChatRecordApiService.java 1.25 KB
package cn.fw.hermes.sdk.api;

import cn.fw.data.base.domain.common.Message;
import cn.fw.hermes.sdk.api.para.ChatPullCondition;
import cn.fw.hermes.sdk.api.result.ChatUserDto;
import java.util.List;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: Chenery
 * @Date: 2021/2/21 18:14
 */
@FeignClient(value = "fw-hermes")
public interface ChatRecordApiService {
    /**
     * 统计昨日单次聊天次数大于等于所给定次数的聊天记录集合
     * @param chatCount 单聊次数
     * @return
     */
    @GetMapping("/api/chat/record/count")
    Message<List<ChatUserDto>> count(@RequestParam("chatCount") Integer chatCount);

    /**
     * 查询指定时间范围内指定两人有效聊天次数
     * 开始时间不能早于当前时间的7天前(消息默认漫游7天)
     * @param chatPullCondition 查询条件对象
     * @return
     */
    @PostMapping("/api/chat/record/pull")
    Message<Integer> queryChatRecordOfCouple(@RequestBody ChatPullCondition chatPullCondition);


}