package cn.axzo.msg.center.api.fallback;

import cn.axzo.msg.center.api.MessageApi;
import cn.axzo.msg.center.api.request.MessageModuleStatisticReq;
import cn.axzo.msg.center.api.request.MessagePageQueryReq;
import cn.axzo.msg.center.api.request.MessageReadAllReq;
import cn.axzo.msg.center.api.request.MessageStatisticReq;
import cn.axzo.msg.center.api.response.MessageDetailRes;
import cn.axzo.msg.center.api.response.MessageModuleStatisticRes;
import cn.axzo.msg.center.api.response.MessageStatisticRes;
import cn.azxo.framework.common.model.CommonResponse;
import cn.azxo.framework.common.model.Page;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

/**
 * @author cold_blade
 * @date 2023/9/13
 * @version 1.0
 */
@Slf4j
public class MessageApiFallback implements MessageApi {
    @Override
    public CommonResponse<MessageStatisticRes> countPersonMessage(MessageStatisticReq request) {
        log.warn("个人消息按类型统计待办/未读数量, req:{}", request);
        return CommonResponse.fail("个人消息按类型统计待办/未读数量");
    }

    @Override
    public CommonResponse<List<MessageModuleStatisticRes>> statisticPersonModuleMessage(MessageModuleStatisticReq request) {
        log.warn("按模块分组统计个人信息超时, req:{}", request);
        return CommonResponse.fail("按模块分组统计个人信息超时");
    }

    @Override
    public CommonResponse<Void> readAllMessages(MessageReadAllReq request) {
        log.warn("将全部未读消息置为已读超时, req:{}", request);
        return CommonResponse.fail("将全部未读消息置为已读超时");
    }

    @Override
    public CommonResponse<Page<MessageDetailRes>> pageQueryMessageRecords(MessagePageQueryReq request) {
        log.warn("分页查询消息记录超时, req:{}", request);
        return CommonResponse.fail("分页查询消息记录超时");
    }
}
