diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsTemplateServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsTemplateServiceImpl.java index 0f276a915..8eefb2a2e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsTemplateServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsTemplateServiceImpl.java @@ -54,8 +54,6 @@ public class SmsTemplateServiceImpl implements SmsTemplateService { @Resource private SmsChannelService smsChannelService; - @Resource - private SmsClientFactory smsClientFactory; @Override public Long createSmsTemplate(SmsTemplateCreateReqVO createReqVO) { @@ -174,7 +172,7 @@ public class SmsTemplateServiceImpl implements SmsTemplateService { @VisibleForTesting void validateApiTemplate(Long channelId, String apiTemplateId) { // 获得短信模板 - SmsClient smsClient = smsClientFactory.getSmsClient(channelId); + SmsClient smsClient = smsChannelService.getSmsClient(channelId); Assert.notNull(smsClient, String.format("短信客户端(%d) 不存在", channelId)); SmsCommonResult templateResult = smsClient.getSmsTemplate(apiTemplateId); // 校验短信模板是否正确