|
|
@@ -3,10 +3,13 @@ package org.dromara.backstage.task;
|
|
|
import cn.hutool.http.HttpRequest;
|
|
|
import cn.hutool.http.HttpUtil;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.dromara.backstage.business.lock.LockBusiness;
|
|
|
import org.dromara.common.core.api.ReturnResult;
|
|
|
import org.dromara.common.redis.utils.RedisUtils;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
@@ -22,10 +25,12 @@ import java.util.Map;
|
|
|
*/
|
|
|
@Slf4j
|
|
|
@Service
|
|
|
+@RequiredArgsConstructor
|
|
|
public class AsyncTaskService {
|
|
|
@Value("${third-api.sms-api}")
|
|
|
String smsApi;
|
|
|
|
|
|
+
|
|
|
public void asyncSendSms(String mobile, String message) {
|
|
|
String keyToken = "yktSmsToken";
|
|
|
String sendUrl = smsApi + "sms/api/v1/send";
|
|
|
@@ -46,4 +51,5 @@ public class AsyncTaskService {
|
|
|
log.info("[短信发送]-{\"内容\":\"{}\",\"发送异常\":\"{}\"", message, ex.getMessage());
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|