mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-31 18:28:43 +08:00 
			
		
		
		
	【代码优化】增强 JDK17、JDK8 之间的兼容性
This commit is contained in:
		| @@ -1,5 +1,6 @@ | ||||
| package cn.iocoder.yudao.module.system.framework.sms.core.client.impl; | ||||
|  | ||||
| import cn.hutool.core.collection.ListUtil; | ||||
| import cn.iocoder.yudao.framework.common.core.KeyValue; | ||||
| import cn.iocoder.yudao.module.system.framework.sms.core.client.dto.SmsReceiveRespDTO; | ||||
| import cn.iocoder.yudao.module.system.framework.sms.core.client.dto.SmsSendRespDTO; | ||||
| @@ -47,7 +48,7 @@ public class SmsClientTests { | ||||
|         String mobile = "15601691323"; | ||||
|         String apiTemplateId = "SMS_207945135"; | ||||
|         // 调用 | ||||
|         SmsSendRespDTO sendRespDTO = client.sendSms(sendLogId, mobile, apiTemplateId, List.of(new KeyValue<>("code", "1024"))); | ||||
|         SmsSendRespDTO sendRespDTO = client.sendSms(sendLogId, mobile, apiTemplateId, ListUtil.of(new KeyValue<>("code", "1024"))); | ||||
|         // 打印结果 | ||||
|         System.out.println(sendRespDTO); | ||||
|     } | ||||
| @@ -96,7 +97,7 @@ public class SmsClientTests { | ||||
|         String mobile = "15601691323"; | ||||
|         String apiTemplateId = "2136358"; | ||||
|         // 调用 | ||||
|         SmsSendRespDTO sendRespDTO = client.sendSms(sendLogId, mobile, apiTemplateId, List.of(new KeyValue<>("code", "1024"))); | ||||
|         SmsSendRespDTO sendRespDTO = client.sendSms(sendLogId, mobile, apiTemplateId, ListUtil.of(new KeyValue<>("code", "1024"))); | ||||
|         // 打印结果 | ||||
|         System.out.println(sendRespDTO); | ||||
|     } | ||||
| @@ -131,7 +132,7 @@ public class SmsClientTests { | ||||
|         Long sendLogId = System.currentTimeMillis(); | ||||
|         String mobile = "15601691323"; | ||||
|         String apiTemplateId = "xx test01"; | ||||
|         List<KeyValue<String, Object>> templateParams = List.of(new KeyValue<>("code", "1024")); | ||||
|         List<KeyValue<String, Object>> templateParams = ListUtil.of(new KeyValue<>("code", "1024")); | ||||
|         // 调用 | ||||
|         SmsSendRespDTO smsSendRespDTO = client.sendSms(sendLogId, mobile, apiTemplateId, templateParams); | ||||
|         // 打印结果 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV