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

import cn.axzo.core.domain.PageResult;
import cn.axzo.msg.center.api.InsideMessageRecordApi;
import cn.axzo.msg.center.api.request.*;
import cn.axzo.msg.center.api.response.MessageNewRes;
import cn.axzo.msg.center.api.response.MessageRecordRes;
import cn.azxo.framework.common.model.CommonResponse;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Slf4j
public class InsideMessageRecordApiFallBack implements InsideMessageRecordApi {

    @Override
    public CommonResponse<PageResult<MessageNewRes>> listMsgInfo4Trade(CmsMsgListReq req) {
        log.warn("查询消息列表超时,req={}", JSONUtil.toJsonStr(req));
        return CommonResponse.fail("查询消息列表超时");
    }

    @Override
    public CommonResponse<PageResult<MessageRecordRes>> queryMessageRecordList(MessageRecordReq request) {
        log.warn("查询消息记录列表超时,req={}", JSONUtil.toJsonStr(request));
        return CommonResponse.fail("查询消息记录列表超时");
    }

    @Override
    public CommonResponse<Boolean> changeHasRead(UpdateReadReq request) {
        return null;
    }

    @Override
    public CommonResponse<PageResult<MessageRecordRes>> queryUnReadList(QueryMessageRecordReq request) {
        return null;
    }

    @Override
    public CommonResponse<PageResult<MessageRecordRes>> querySent(QueryMessageRecordReq request) {
        return null;
    }

    @Override
    public CommonResponse<Integer> unReadStatistics(MessageStatisticsReq request) {
        return null;
    }

    @Override
    public CommonResponse<Boolean> deleteMessageRecords(MessageRecordDeleteReq request) {
        return CommonResponse.success(false);
    }

    @Override
    public CommonResponse<Void> markReceived(List<Long> msgIdList) {
        return CommonResponse.fail("更新消息状态异常");
    }
}
