package com.fs.course.service.impl;

import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON;
import com.fs.common.utils.PubFun;
import com.fs.course.param.SendXfkParam;
import com.fs.qw.domain.QwUser;
import com.fs.qw.mapper.QwExternalContactMapper;
import com.fs.qw.result.QwFilterSopCustomersResult;
import com.fs.qw.vo.QwSopRuleTimeVO;
import com.fs.sop.domain.*;
import com.fs.sop.mapper.QwSopLogsMapper;
import com.fs.sop.mapper.QwSopMapper;
import com.fs.sop.mapper.QwSopTempMapper;
import com.fs.sop.mapper.SopUserLogsInfoMapper;
import com.fs.sop.params.DeleteQwSopParam;
import com.fs.sop.params.QwSopTagsParam;
import com.fs.sop.params.SopUserLogsArray;
import com.fs.sop.params.SopUserLogsList;
import com.fs.sop.service.IQwSopTempVoiceService;
import com.fs.sop.service.ISopUserLogsService;
import com.fs.voice.utils.StringUtil;
import com.fs.wxUser.domain.CompanyWxUser;
import com.fs.wxUser.mapper.CompanyWxUserMapper;
import com.fs.wxUser.param.CompanyWxUserSopParam;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;

@Slf4j
@Service
@AllArgsConstructor
public class AsyncIsAddKfXfkService {

    private static final String domainXFKName = "https://workapi.dazhengnet.cn/api.php/Home/XfkWork/bindMember";

    /**
     * 异步推送
     */
    @Async("scheduledExecutorService")
    public void executeSopByIds(SendXfkParam xfkParam) {

        HttpRequest.post(domainXFKName)
                .body(JSON.toJSONString(xfkParam),"application/json;charset=UTF-8")
                .execute().body();


    }

}
