package com.ningdatech.pmapi.meeting.helper;

import com.ningdatech.pmapi.meeting.entity.domain.Meeting;
import com.ningdatech.pmapi.meeting.entity.domain.MeetingExpert;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;

import java.util.Collections;
import java.util.List;

/**
 * <p>
 * YxtCallOrSmsHelper
 * </p>
 *
 * @author WendyYang
 * @since 23:59 2022/8/31
 */
@Component
@AllArgsConstructor
public class YxtCallOrSmsHelper {

    // private final YinXinTongClient yinXinTongClient;

    public void callByMeetingExperts(Meeting meeting, List<MeetingExpert> experts) {
        /*String callContent = String.format(YxtCallTemplateConst.OFFLINE_TEMPLATE,
                meeting.getHoldCompany(), meeting.getName(),
                meeting.getStartTime().format(DateUtil.DTF_YMD_HM), meeting.getRegionDetail());
        List<SubmitTaskCallContext> callContexts = CollUtils.convert(experts, w -> {
            SubmitTaskCallContext context = new SubmitTaskCallContext();
            context.setContent(callContent);
            context.setReceiveNumber(w.getMobile());
            return context;
        });
        SubmitTaskCallResponse callResponse = yinXinTongClient.submitTaskCall(SubmitTaskCallCmd.of(callContexts));
        experts.forEach(w -> w.setSubmitKey(callResponse.getSubmitKey()));*/
    }

    /*public void sendSms(List<SendSmsContext> smsList) {
        yinXinTongClient.submitSmsTask(new SendSmsCmd() {{
            setContextList(smsList);
            setSmsSignEnum(YxtSmsSignEnum.ZJS_ELECTRONIC_EXPERT_LIB);
        }});
    }

    public void sendSms(SendSmsContext sms) {
        sendSms(Collections.singletonList(sms));
    }*/

}
