1
0
mirror of synced 2025-12-19 14:48:02 +08:00

🆕 #2755 【小程序】增加小程序云开发短信接口

This commit is contained in:
liming1019
2022-07-26 21:40:49 +08:00
committed by GitHub
parent 5a2607787f
commit b550806956
6 changed files with 124 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ package cn.binarywang.wx.miniapp.api.impl;
import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.bean.cloud.*;
import cn.binarywang.wx.miniapp.bean.cloud.request.WxCloudSendSmsV2Request;
import cn.binarywang.wx.miniapp.test.ApiTestModule;
import com.google.common.collect.ImmutableSortedMap;
import com.google.common.collect.Lists;
@@ -394,4 +395,17 @@ public class WxMaCloudServiceImplTest {
assertThat(result.getCollections()[0].getIndexCount()).isGreaterThan(0);
assertThat(result.getCollections()[0].getIndexSize()).isGreaterThan(0);
}
@Test
public void testSendSmsV2() throws WxErrorException {
WxCloudSendSmsV2Request request = WxCloudSendSmsV2Request.builder()
.urlLink("https://wxaurl.cn/xxxxxx")
.templateId("844110")
.templateParamList(Arrays.asList(new String[]{"能力上新"}))
.phoneNumberList(Arrays.asList("+8612345678910"))
.build();
final WxCloudSendSmsV2Result result = this.wxMaService.getCloudService().sendSmsV2(request);
assertThat(result).isNotNull();
}
}