|
@@ -114,6 +114,32 @@ public class SmsUtilAliImplService implements SmsUtil {
|
|
|
setCacheCode(cacheKey, code);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void sendSmsCommon(String mobile, Long configId, String paramValue) {
|
|
|
+ MsgConfigDto.Vo msgConfig = R.feignCheckData(msgSendApiService.getMsgConfig(new MsgConfigDto.Vo().setId(configId)));
|
|
|
+ List<MsgConfigTestDto.BizParam> bizParams = R.feignCheckData(msgSendApiService.getBizParamByMsgConfig(new MsgConfigTestDto.MsgConfig().setConfigId(configId)));
|
|
|
+ if (CollUtil.isNotEmpty(bizParams) && msgConfig != null) {
|
|
|
+ List<MsgConfigTestDto.BizData> bizDataList = BeanUtil.copyToList(bizParams, MsgConfigTestDto.BizData.class);
|
|
|
+ List<MsgConfigTestDto.BizData> sendList = new ArrayList<>();
|
|
|
+ for (MsgConfigTestDto.BizData b : bizDataList) {
|
|
|
+ String channelType = b.getChannelType();
|
|
|
+ if (Integer.valueOf(channelType).intValue() == ChannelType.SMS.getCode().intValue()) {
|
|
|
+ Map<String, Object> params = MapUtil.newHashMap();
|
|
|
+ params.put("data", paramValue);
|
|
|
+ b.setReceivers(CollUtil.newHashSet(mobile));
|
|
|
+ b.setTemplateParams(params);
|
|
|
+ sendList.add(b);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ MsgConfigTestDto.SendByMsgConfig sendByMsgConfig = new MsgConfigTestDto.SendByMsgConfig().setConfigId(configId).setBizDataList(sendList);
|
|
|
+ log.info("通用短信发送参数-->{}", JSONUtil.toJsonStr(sendByMsgConfig));
|
|
|
+ msgSendApiService.sendByMsgConfig(sendByMsgConfig);
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public boolean verifyCode(String mobile, SmsSceneEnum smsSceneEnum, String uuid, String code) {
|
|
|
String cacheKey = cacheKey(smsSceneEnum, mobile, uuid);
|