package com.starry.admin.modules.weichat.service;

import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserReviewInfoEntity;
import com.starry.admin.modules.order.module.entity.PlayOrderComplaintInfoEntity;
import com.starry.admin.modules.order.module.entity.PlayOrderInfoEntity;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

@Slf4j
@Primary
@Component
@Profile("apitest")
public class MockNotificationSender implements NotificationSender {

    @Override
    public void sendOrderMessageAsync(PlayOrderInfoEntity orderInfo) {
        log.debug("[wechat-mock] skip sendOrderMessageAsync orderId={}", orderInfo.getId());
    }

    @Override
    public void sendOrderFinishMessageAsync(PlayOrderInfoEntity order) {
        log.debug("[wechat-mock] skip sendOrderFinishMessageAsync orderId={}", order.getId());
    }

    @Override
    public void sendOrderCancelMessageAsync(PlayOrderInfoEntity orderInfo, String refundReason) {
        log.debug("[wechat-mock] skip sendOrderCancelMessageAsync orderId={}", orderInfo.getId());
    }

    @Override
    public void sendComplaintMessage(PlayOrderComplaintInfoEntity info, PlayOrderInfoEntity orderInfo) {
        log.debug("[wechat-mock] skip sendComplaintMessage orderId={}", orderInfo.getId());
    }

    @Override
    public void sendCheckMessage(PlayClerkUserReviewInfoEntity entity, PlayClerkUserInfoEntity userInfo,
                                 String reviewState) {
        log.debug("[wechat-mock] skip sendCheckMessage clerkId={}", userInfo == null ? null : userInfo.getId());
    }
}
