Commit dec8609d authored by honghy's avatar honghy

新增短信判断渠道逻辑

parent bd2f6a3d
......@@ -392,8 +392,13 @@ public class SmsSendServiceImpl implements SmsSendService {
.setMobile(mobile)
.setSmsTemplateDTO(SmsTemplateConvert.INSTANCE.toDto(smsTemplate))
.setTemplateParams(newTemplateParams);
// 判断渠道
SmsChannelDO smsChannel = smsChannelService.getSmsChannel(smsTemplate.getChannelId());
if (smsChannel == null) {
throw exception(SMS_CHANNEL_NOT_EXISTS);
}
//根据debug配置决定是否发送短信
if (Objects.isNull(businessProperties) || !businessProperties.isDebug()) {
if ((Objects.isNull(businessProperties) || !businessProperties.isDebug()) && smsChannel.getStatus() == 0) {
smsProducer.sendSmsSendMessageV2(smsSendMessage);
}
return sendLogId;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment