mirror of
https://gitee.com/dromara/sms4j.git
synced 2025-12-06 17:08:40 +08:00
删除无用模块,添加错误日志记录
This commit is contained in:
parent
7aef711fbf
commit
2bc24264b4
@ -24,6 +24,12 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.aliyun</groupId>
|
<groupId>com.aliyun</groupId>
|
||||||
<artifactId>dysmsapi20170525</artifactId>
|
<artifactId>dysmsapi20170525</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
<artifactId>okhttp</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
@ -37,5 +43,10 @@
|
|||||||
<groupId>kim.wind</groupId>
|
<groupId>kim.wind</groupId>
|
||||||
<artifactId>sms-aggregation-api</artifactId>
|
<artifactId>sms-aggregation-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
<artifactId>okhttp</artifactId>
|
||||||
|
<version>3.14.9</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import com.aliyun.teaopenapi.models.Config;
|
|||||||
import kim.wind.sms.aliyun.service.AlibabaSmsImpl;
|
import kim.wind.sms.aliyun.service.AlibabaSmsImpl;
|
||||||
import kim.wind.sms.comm.exception.SmsBlendException;
|
import kim.wind.sms.comm.exception.SmsBlendException;
|
||||||
import kim.wind.sms.comm.factory.BeanFactory;
|
import kim.wind.sms.comm.factory.BeanFactory;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -13,6 +14,7 @@ import kim.wind.sms.comm.factory.BeanFactory;
|
|||||||
* @author :Wind
|
* @author :Wind
|
||||||
* 2023/4/8 14:54
|
* 2023/4/8 14:54
|
||||||
**/
|
**/
|
||||||
|
@Slf4j
|
||||||
public class AlibabaSmsConfig {
|
public class AlibabaSmsConfig {
|
||||||
|
|
||||||
private static AlibabaSmsImpl alibabaSms;
|
private static AlibabaSmsImpl alibabaSms;
|
||||||
@ -30,6 +32,7 @@ public class AlibabaSmsConfig {
|
|||||||
config.endpoint = alibabaConfig.getRequestUrl();
|
config.endpoint = alibabaConfig.getRequestUrl();
|
||||||
return new Client(config);
|
return new Client(config);
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
log.error(e.getMessage());
|
||||||
throw new SmsBlendException(e.getMessage());
|
throw new SmsBlendException(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -85,11 +85,11 @@ public class AlibabaSmsImpl implements SmsBlend {
|
|||||||
smsResponse.setMessage(sendSmsResponse.body.message);
|
smsResponse.setMessage(sendSmsResponse.body.message);
|
||||||
}
|
}
|
||||||
} catch (TeaException error) {
|
} catch (TeaException error) {
|
||||||
|
log.error(error.getMessage());
|
||||||
throw new SmsBlendException(error.message);
|
throw new SmsBlendException(error.message);
|
||||||
// 如有需要,请打印 error
|
|
||||||
} catch (Exception _error) {
|
} catch (Exception _error) {
|
||||||
TeaException error = new TeaException(_error.getMessage(), _error);
|
TeaException error = new TeaException(_error.getMessage(), _error);
|
||||||
// 如有需要,请打印 error
|
log.error(_error.getMessage());
|
||||||
throw new SmsBlendException(error.message);
|
throw new SmsBlendException(error.message);
|
||||||
}
|
}
|
||||||
return smsResponse;
|
return smsResponse;
|
||||||
@ -125,11 +125,11 @@ public class AlibabaSmsImpl implements SmsBlend {
|
|||||||
smsResponse.setMessage(sendBatchSmsResponse.body.message);
|
smsResponse.setMessage(sendBatchSmsResponse.body.message);
|
||||||
}
|
}
|
||||||
} catch (TeaException error) {
|
} catch (TeaException error) {
|
||||||
|
log.error(error.getMessage());
|
||||||
throw new SmsBlendException(error.message);
|
throw new SmsBlendException(error.message);
|
||||||
// 如有需要,请打印 error
|
|
||||||
} catch (Exception _error) {
|
} catch (Exception _error) {
|
||||||
TeaException error = new TeaException(_error.getMessage(), _error);
|
TeaException error = new TeaException(_error.getMessage(), _error);
|
||||||
// 如有需要,请打印 error
|
log.error(error.getMessage());
|
||||||
throw new SmsBlendException(error.message);
|
throw new SmsBlendException(error.message);
|
||||||
}
|
}
|
||||||
return smsResponse;
|
return smsResponse;
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import kim.wind.sms.autoimmit.utils.RedisUtils;
|
|||||||
import kim.wind.sms.comm.utils.SmsUtil;
|
import kim.wind.sms.comm.utils.SmsUtil;
|
||||||
import kim.wind.sms.comm.utils.TimeExpiredPoolCache;
|
import kim.wind.sms.comm.utils.TimeExpiredPoolCache;
|
||||||
import kim.wind.sms.autoimmit.utils.SpringUtil;
|
import kim.wind.sms.autoimmit.utils.SpringUtil;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.aspectj.lang.ProceedingJoinPoint;
|
import org.aspectj.lang.ProceedingJoinPoint;
|
||||||
import org.aspectj.lang.annotation.Around;
|
import org.aspectj.lang.annotation.Around;
|
||||||
import org.aspectj.lang.annotation.Aspect;
|
import org.aspectj.lang.annotation.Aspect;
|
||||||
@ -16,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@Aspect
|
@Aspect
|
||||||
|
@Slf4j
|
||||||
public class AopAdvice {
|
public class AopAdvice {
|
||||||
|
|
||||||
private static final Long minTimer = 60 * 1000L;
|
private static final Long minTimer = 60 * 1000L;
|
||||||
@ -55,6 +57,7 @@ public class AopAdvice {
|
|||||||
try {
|
try {
|
||||||
proce = redisProcess(f);
|
proce = redisProcess(f);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage());
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
if (proce != null) {
|
if (proce != null) {
|
||||||
@ -73,7 +76,8 @@ public class AopAdvice {
|
|||||||
if (SmsUtil.isEmpty(i)) {
|
if (SmsUtil.isEmpty(i)) {
|
||||||
instance.put(args + "max", 1, accTimer);
|
instance.put(args + "max", 1, accTimer);
|
||||||
} else if (i > accountMax) {
|
} else if (i > accountMax) {
|
||||||
return new SmsBlendException("accountMax", args + "今日短信已达最大次数");
|
log.info("The phone:"+args +",number of short messages reached the maximum today");
|
||||||
|
return new SmsBlendException("The phone:"+args +",number of short messages reached the maximum today");
|
||||||
} else {
|
} else {
|
||||||
instance.put(args + "max", i + 1, accTimer);
|
instance.put(args + "max", i + 1, accTimer);
|
||||||
}
|
}
|
||||||
@ -84,7 +88,8 @@ public class AopAdvice {
|
|||||||
if (o < minuteMax) {
|
if (o < minuteMax) {
|
||||||
instance.put(args, o + 1, minTimer);
|
instance.put(args, o + 1, minTimer);
|
||||||
} else {
|
} else {
|
||||||
return new SmsBlendException("minuteMax", args + "短信发送过于频繁!");
|
log.info("The phone:"+args +",number of short messages reached the maximum today");
|
||||||
|
return new SmsBlendException("The phone:", args + " Text messages are sent too often!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
instance.put(args, 1, minTimer);
|
instance.put(args, 1, minTimer);
|
||||||
@ -106,7 +111,8 @@ public class AopAdvice {
|
|||||||
if (SmsUtil.isEmpty(i)) {
|
if (SmsUtil.isEmpty(i)) {
|
||||||
redis.setOrTime(REDIS_KEY+args + "max", 1,accTimer/1000);
|
redis.setOrTime(REDIS_KEY+args + "max", 1,accTimer/1000);
|
||||||
} else if (i > accountMax) {
|
} else if (i > accountMax) {
|
||||||
return new SmsBlendException("accountMax", args + "今日短信已达最大次数");
|
log.info("The phone:"+args +",number of short messages reached the maximum today");
|
||||||
|
return new SmsBlendException("The phone:"+args +",number of short messages reached the maximum today");
|
||||||
} else {
|
} else {
|
||||||
redis.setOrTime(REDIS_KEY+args + "max", i + 1,accTimer/1000);
|
redis.setOrTime(REDIS_KEY+args + "max", i + 1,accTimer/1000);
|
||||||
}
|
}
|
||||||
@ -117,7 +123,8 @@ public class AopAdvice {
|
|||||||
if (o < minuteMax) {
|
if (o < minuteMax) {
|
||||||
redis.setOrTime(REDIS_KEY+args, o + 1,minTimer/1000);
|
redis.setOrTime(REDIS_KEY+args, o + 1,minTimer/1000);
|
||||||
} else {
|
} else {
|
||||||
return new SmsBlendException("minuteMax", args + "短信发送过于频繁!");
|
log.info("The phone:"+args +",number of short messages reached the maximum today");
|
||||||
|
return new SmsBlendException("The phone:", args + " Text messages are sent too often!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
redis.setOrTime(REDIS_KEY+args, 1,minTimer/1000);
|
redis.setOrTime(REDIS_KEY+args, 1,minTimer/1000);
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
package kim.wind.sms.autoimmit.config;
|
package kim.wind.sms.autoimmit.config;
|
||||||
|
|
||||||
import kim.wind.sms.aliyun.config.AlibabaConfig;
|
|
||||||
import kim.wind.sms.autoimmit.aop.AopAdvice;
|
import kim.wind.sms.autoimmit.aop.AopAdvice;
|
||||||
import kim.wind.sms.autoimmit.utils.ConfigUtil;
|
import kim.wind.sms.autoimmit.utils.ConfigUtil;
|
||||||
import kim.wind.sms.autoimmit.utils.RedisUtils;
|
import kim.wind.sms.autoimmit.utils.RedisUtils;
|
||||||
@ -9,8 +8,7 @@ import kim.wind.sms.comm.config.SmsBanner;
|
|||||||
import kim.wind.sms.comm.config.SmsConfig;
|
import kim.wind.sms.comm.config.SmsConfig;
|
||||||
import kim.wind.sms.comm.delayedTime.DelayedTime;
|
import kim.wind.sms.comm.delayedTime.DelayedTime;
|
||||||
import kim.wind.sms.comm.factory.BeanFactory;
|
import kim.wind.sms.comm.factory.BeanFactory;
|
||||||
import kim.wind.sms.core.config.SupplierFactory;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import kim.wind.sms.huawei.config.HuaweiConfig;
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.core.env.Environment;
|
import org.springframework.core.env.Environment;
|
||||||
@ -18,6 +16,7 @@ import org.springframework.core.env.Environment;
|
|||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
|
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
public class SmsAutowiredConfig {
|
public class SmsAutowiredConfig {
|
||||||
|
|
||||||
private final SpringUtil springUtil;
|
private final SpringUtil springUtil;
|
||||||
@ -61,10 +60,12 @@ public class SmsAutowiredConfig {
|
|||||||
/* 如果配置中启用了redis,则注入redis工具*/
|
/* 如果配置中启用了redis,则注入redis工具*/
|
||||||
if (BeanFactory.getSmsConfig().getRedisCache()){
|
if (BeanFactory.getSmsConfig().getRedisCache()){
|
||||||
springUtil.createBean(RedisUtils.class);
|
springUtil.createBean(RedisUtils.class);
|
||||||
|
log.debug("The redis cache is enabled for sms-aggregation");
|
||||||
}
|
}
|
||||||
/* 如果启用了短信限制,则注入AOP组件*/
|
/* 如果启用了短信限制,则注入AOP组件*/
|
||||||
if (BeanFactory.getSmsConfig().getRestricted()){
|
if (BeanFactory.getSmsConfig().getRestricted()){
|
||||||
springUtil.createBean(AopAdvice.class);
|
springUtil.createBean(AopAdvice.class);
|
||||||
|
log.debug("SMS restriction is enabled");
|
||||||
}
|
}
|
||||||
if (BeanFactory.getSmsConfig().getIsPrint()){
|
if (BeanFactory.getSmsConfig().getIsPrint()){
|
||||||
SmsBanner.PrintBanner("V 1.0.4");
|
SmsBanner.PrintBanner("V 1.0.4");
|
||||||
|
|||||||
@ -1,11 +0,0 @@
|
|||||||
package kim.wind.sms.autoimmit.factory;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* AutoBeanFac
|
|
||||||
* <p> 自动注入中获取bean工厂,用于优先实例化bean确保spring中的对象和此处一致
|
|
||||||
* @author :Wind
|
|
||||||
* 2023/4/8 13:44
|
|
||||||
**/
|
|
||||||
public class AutoBeanFac {
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -19,6 +19,9 @@ public class RedisUtils {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public void init(RedisConnectionFactory connectionFactory) {
|
public void init(RedisConnectionFactory connectionFactory) {
|
||||||
|
if (connectionFactory == null){
|
||||||
|
log.error("RedisConnectionFactory not found");
|
||||||
|
}
|
||||||
// 指定相应的序列化方案
|
// 指定相应的序列化方案
|
||||||
StringRedisSerializer keySerializer = new StringRedisSerializer();
|
StringRedisSerializer keySerializer = new StringRedisSerializer();
|
||||||
JdkSerializationRedisSerializer valueSerializer = new JdkSerializationRedisSerializer();
|
JdkSerializationRedisSerializer valueSerializer = new JdkSerializationRedisSerializer();
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package kim.wind.sms.autoimmit.utils;
|
package kim.wind.sms.autoimmit.utils;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.BeansException;
|
import org.springframework.beans.BeansException;
|
||||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||||
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||||
@ -13,6 +14,7 @@ import org.springframework.context.ApplicationContextAware;
|
|||||||
* @author :Wind
|
* @author :Wind
|
||||||
* 2023/3/25 0:13
|
* 2023/3/25 0:13
|
||||||
**/
|
**/
|
||||||
|
@Slf4j
|
||||||
public class SpringUtil implements ApplicationContextAware {
|
public class SpringUtil implements ApplicationContextAware {
|
||||||
|
|
||||||
private static ApplicationContext applicationContext;
|
private static ApplicationContext applicationContext;
|
||||||
@ -38,6 +40,7 @@ public class SpringUtil implements ApplicationContextAware {
|
|||||||
try {
|
try {
|
||||||
return getApplicationContext().getBean(name);
|
return getApplicationContext().getBean(name);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage());
|
||||||
throw new RuntimeException(e.getMessage());
|
throw new RuntimeException(e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,6 +50,7 @@ public class SpringUtil implements ApplicationContextAware {
|
|||||||
try {
|
try {
|
||||||
return getApplicationContext().getBean(clazz);
|
return getApplicationContext().getBean(clazz);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage());
|
||||||
throw new RuntimeException(e.getMessage());
|
throw new RuntimeException(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -61,7 +65,6 @@ public class SpringUtil implements ApplicationContextAware {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>说明:创建一个bean
|
* <p>说明:创建一个bean
|
||||||
*
|
|
||||||
* @param
|
* @param
|
||||||
* @name: createBean
|
* @name: createBean
|
||||||
* @author :Wind
|
* @author :Wind
|
||||||
|
|||||||
@ -8,15 +8,15 @@ package kim.wind.sms.comm.enumerate;
|
|||||||
**/
|
**/
|
||||||
public enum SupplierType {
|
public enum SupplierType {
|
||||||
/** 阿里云*/
|
/** 阿里云*/
|
||||||
ALIBABA("alibaba"),
|
ALIBABA("阿里云短信"),
|
||||||
/** 华为云*/
|
/** 华为云*/
|
||||||
HUAWEI("huawei"),
|
HUAWEI("华为云短信"),
|
||||||
/** 云片*/
|
/** 云片*/
|
||||||
YUNPIAN("yunpian"),
|
YUNPIAN("云片短信"),
|
||||||
/** 腾讯云*/
|
/** 腾讯云*/
|
||||||
TENCENT("tencent"),
|
TENCENT("腾讯云短信"),
|
||||||
/** 合一短信*/
|
/** 合一短信*/
|
||||||
UNI_SMS("unisms")
|
UNI_SMS("合一短信")
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import java.util.concurrent.TimeUnit;
|
|||||||
* @author :Wind
|
* @author :Wind
|
||||||
* 2023/4/7 15:26
|
* 2023/4/7 15:26
|
||||||
**/
|
**/
|
||||||
|
|
||||||
public class BeanFactory {
|
public class BeanFactory {
|
||||||
|
|
||||||
/** 定时器*/
|
/** 定时器*/
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package kim.wind.sms.comm.utils;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import kim.wind.sms.comm.exception.SmsBlendException;
|
import kim.wind.sms.comm.exception.SmsBlendException;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -20,6 +21,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||||||
* @author :Wind
|
* @author :Wind
|
||||||
* 2023/3/25 18:26
|
* 2023/3/25 18:26
|
||||||
**/
|
**/
|
||||||
|
@Slf4j
|
||||||
public class TimeExpiredPoolCache {
|
public class TimeExpiredPoolCache {
|
||||||
/**
|
/**
|
||||||
* 持久化文件格式
|
* 持久化文件格式
|
||||||
@ -70,6 +72,7 @@ public class TimeExpiredPoolCache {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} catch (IOException ignored) {
|
} catch (IOException ignored) {
|
||||||
|
log.error(ignored.getMessage());
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -81,6 +84,7 @@ public class TimeExpiredPoolCache {
|
|||||||
try {
|
try {
|
||||||
clearExpiredCaches();
|
clearExpiredCaches();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage());
|
||||||
throw new SmsBlendException(e.getMessage());
|
throw new SmsBlendException(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -72,6 +72,7 @@ public class HuaweiSmsImpl implements SmsBlend {
|
|||||||
HuaweiResponse huaweiResponse = res.get(HuaweiResponse.class);
|
HuaweiResponse huaweiResponse = res.get(HuaweiResponse.class);
|
||||||
smsResponse.setErrMessage(huaweiResponse.getDescription());
|
smsResponse.setErrMessage(huaweiResponse.getDescription());
|
||||||
smsResponse.setErrorCode(huaweiResponse.getCode());
|
smsResponse.setErrorCode(huaweiResponse.getCode());
|
||||||
|
log.debug(huaweiResponse.getDescription());
|
||||||
})
|
})
|
||||||
.execute();
|
.execute();
|
||||||
return smsResponse;
|
return smsResponse;
|
||||||
|
|||||||
@ -13,10 +13,11 @@ import kim.wind.sms.comm.annotation.Restricted;
|
|||||||
import kim.wind.sms.comm.delayedTime.DelayedTime;
|
import kim.wind.sms.comm.delayedTime.DelayedTime;
|
||||||
import kim.wind.sms.comm.exception.SmsBlendException;
|
import kim.wind.sms.comm.exception.SmsBlendException;
|
||||||
import kim.wind.sms.tencent.config.TencentConfig;
|
import kim.wind.sms.tencent.config.TencentConfig;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
|
@Slf4j
|
||||||
public class TencentSmsImpl implements SmsBlend {
|
public class TencentSmsImpl implements SmsBlend {
|
||||||
|
|
||||||
private TencentConfig tencentSmsConfig;
|
private TencentConfig tencentSmsConfig;
|
||||||
@ -66,6 +67,7 @@ public class TencentSmsImpl implements SmsBlend {
|
|||||||
JSONObject jsonObject = JSON.parseObject(s1);
|
JSONObject jsonObject = JSON.parseObject(s1);
|
||||||
if (!"Ok".equals(jsonObject.getString("Code"))) {
|
if (!"Ok".equals(jsonObject.getString("Code"))) {
|
||||||
smsResponse.setErrMessage(jsonObject.getString("Message"));
|
smsResponse.setErrMessage(jsonObject.getString("Message"));
|
||||||
|
log.debug(smsResponse.getErrMessage());
|
||||||
}
|
}
|
||||||
smsResponse.setMessage(jsonObject.getString("Message"));
|
smsResponse.setMessage(jsonObject.getString("Message"));
|
||||||
smsResponse.setBizId(res.getRequestId());
|
smsResponse.setBizId(res.getRequestId());
|
||||||
@ -108,6 +110,7 @@ public class TencentSmsImpl implements SmsBlend {
|
|||||||
JSONObject jsonObject = JSON.parseObject(s1);
|
JSONObject jsonObject = JSON.parseObject(s1);
|
||||||
if (!"Ok".equals(jsonObject.getString("Code"))) {
|
if (!"Ok".equals(jsonObject.getString("Code"))) {
|
||||||
smsResponse.setErrMessage(jsonObject.getString("Message"));
|
smsResponse.setErrMessage(jsonObject.getString("Message"));
|
||||||
|
log.debug(jsonObject.getString("Message"));
|
||||||
}
|
}
|
||||||
smsResponse.setMessage(jsonObject.getString("Message"));
|
smsResponse.setMessage(jsonObject.getString("Message"));
|
||||||
smsResponse.setBizId(res.getRequestId());
|
smsResponse.setBizId(res.getRequestId());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user