package cn.axzo.msg.center.service.group.client.fallback;

import cn.axzo.msg.center.service.group.client.MessageGroupClient;
import cn.axzo.msg.center.service.group.request.MessageGroupNodeAddRequest;
import cn.axzo.msg.center.service.group.request.MessageGroupNodeListRequest;
import cn.axzo.msg.center.service.group.request.MessageGroupNodeUpdateRequest;
import cn.axzo.msg.center.service.group.request.MessageGroupQueryRequest;
import cn.axzo.msg.center.service.group.response.MessageGroupNodeBriefResponse;
import cn.axzo.msg.center.service.group.response.MessageGroupTreeNodeResponse;
import cn.azxo.framework.common.model.CommonResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @description
 *
 * @author cold_blade
 * @date 2023/9/26
 * @version 1.0
 */
@Slf4j
@Component
public class MessageGroupClientFallback implements MessageGroupClient {
    @Override
    public CommonResponse<Void> addNode(MessageGroupNodeAddRequest request) {
        log.error("fall back while adding message group node. request:{}", request);
        return CommonResponse.error("fall back while adding message group node");
    }

    @Override
    public CommonResponse<Void> updateNode(MessageGroupNodeUpdateRequest request) {
        log.error("fall back while updating message group node. request:{}", request);
        return CommonResponse.error("fall back while updating message group node");
    }

    @Override
    public CommonResponse<Void> deleteNode(String nodeCode, Long operatorId) {
        log.error("fall back while deleting message group node. nodeCode:[{}], operatorId:[{}]", nodeCode, operatorId);
        return CommonResponse.error("fall back while deleting message group node");
    }

    @Override
    public CommonResponse<List<MessageGroupTreeNodeResponse>> list(MessageGroupQueryRequest request) {
        log.error("fall back while listing message group node. request:{}", request);
        return CommonResponse.error("fall back while listing message group node");
    }

    @Override
    public CommonResponse<List<MessageGroupTreeNodeResponse>> listCutTree(MessageGroupQueryRequest request) {
        log.error("fall back while listing message group cutTree. request:{}", request);
        return CommonResponse.error("fall back while listing message group cutTree");
    }

    @Override
    public CommonResponse<List<MessageGroupNodeBriefResponse>> listNodeBriefInfo(MessageGroupNodeListRequest request) {
        log.error("fall back while listing message group node brief info. request:{}", request);
        return CommonResponse.error("fall back while listing message group node brief info.");
    }
}
