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 javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@Profile("!apitest")
public class DefaultNotificationSender implements NotificationSender {

    @Resource
    private WxCustomMpService wxCustomMpService;

    @Override
    public void sendOrderMessageAsync(PlayOrderInfoEntity orderInfo) {
        wxCustomMpService.sendOrderMessageAsync(orderInfo);
    }

    @Override
    public void sendOrderFinishMessageAsync(PlayOrderInfoEntity order) {
        wxCustomMpService.sendOrderFinishMessageAsync(order);
    }

    @Override
    public void sendOrderCancelMessageAsync(PlayOrderInfoEntity orderInfo, String refundReason) {
        wxCustomMpService.sendOrderCancelMessageAsync(orderInfo, refundReason);
    }

    @Override
    public void sendComplaintMessage(PlayOrderComplaintInfoEntity info, PlayOrderInfoEntity orderInfo) {
        wxCustomMpService.sendComplaintMessage(info, orderInfo);
    }

    @Override
    public void sendCheckMessage(PlayClerkUserReviewInfoEntity entity, PlayClerkUserInfoEntity userInfo,
                                 String reviewState) {
        wxCustomMpService.sendCheckMessage(entity, userInfo, reviewState);
    }
}
