package com.mortals.xhx.common.utils;

import com.mortals.framework.util.HttpUtil;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;

/**
 * 发送任务
 *
 * @author: zxfei
 * @date: 2022/4/28 10:56
 * @description:
 **/
@Slf4j
@AllArgsConstructor
public class SendTask implements Runnable {
    private String sendUrl;

    private String content;
    @Override
    public void run() {
        // TODO: 2022/4/28
        try {
            // log.debug("启动发送"+smsGateQueueEntity);
            String resp = HttpUtil.doPost(sendUrl, content);
            log.debug("http resp:{}", resp);
        } catch (Exception e) {
            log.error("发送异常：" + e);
        }
    }
}
