Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
8cc5da56
Commit
8cc5da56
authored
Nov 06, 2020
by
giaogiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
短信
parent
fdd93b2f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
7 deletions
+69
-7
common/pom.xml
+11
-6
common/src/main/java/com/jumeirah/common/sms/SmsUtil.java
+57
-0
common/src/main/resources/mapper/StrokeMapper.xml
+1
-1
No files found.
common/pom.xml
View file @
8cc5da56
...
@@ -48,13 +48,18 @@
...
@@ -48,13 +48,18 @@
<version>
3.4.7
</version>
<version>
3.4.7
</version>
</dependency>
</dependency>
<!-- 极光 end -->
<!-- 极光 end -->
<!-- wecloud短信 start-->
<!-- wecloud短信 start-->
<!-- <dependency>-->
<dependency>
<!-- <groupId>cn.wecloud</groupId>-->
<groupId>
cn.wecloud
</groupId>
<!-- <artifactId>we-cloud-sdk-sms</artifactId>-->
<artifactId>
we-cloud-sdk-sms
</artifactId>
<!-- <version>0.0.1</version>-->
<version>
1.0.0
</version>
<!-- </dependency>-->
<exclusions>
<exclusion>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-simple
</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- wecloud短信 end-->
<!-- wecloud短信 end-->
</dependencies>
</dependencies>
...
...
common/src/main/java/com/jumeirah/common/sms/SmsUtil.java
0 → 100644
View file @
8cc5da56
package
com
.
jumeirah
.
common
.
sms
;
import
cn.wecloud.sdk.common.exception.WeCloudApiException
;
import
cn.wecloud.sdk.sms.client.WeCloudSmsClient
;
import
cn.wecloud.sdk.sms.data.WeCloudSmsSingleSendResult
;
import
cn.wecloud.sdk.sms.model.WeCloudSmsAbroadModel
;
import
cn.wecloud.sdk.sms.request.WeCloudSmsDomesticSingleSendRequest
;
import
cn.wecloud.sdk.sms.response.WeCloudSmsDomesticSingleSendResponse
;
//@Slf4j
public
class
SmsUtil
{
public
static
void
main
(
String
[]
args
)
throws
WeCloudApiException
{
// 创建连接对象
final
WeCloudSmsClient
client
=
new
WeCloudSmsClient
(
"9XPgCY9rAb1GG2yg"
);
// 创建请求信息对象
final
WeCloudSmsAbroadModel
model
=
new
WeCloudSmsAbroadModel
(
"855"
,
"081612642"
,
"1323474417736716290"
,
"888888"
);
// 创建请求对象
final
WeCloudSmsDomesticSingleSendRequest
request
=
new
WeCloudSmsDomesticSingleSendRequest
(
model
);
// 执行请求
final
WeCloudSmsDomesticSingleSendResponse
execute
=
client
.
execute
(
request
);
// 判断是否请求成功
if
(
execute
.
isSuccess
())
{
// 获取返回业务对象
final
WeCloudSmsSingleSendResult
result
=
execute
.
getData
();
}
else
{
// 输出请求失败信息
// log.error(execute.getMsg());
}
}
public
static
void
send
(
String
areaCode
,
String
phone
,
String
verificationCode
)
throws
WeCloudApiException
{
// 创建连接对象
final
WeCloudSmsClient
client
=
new
WeCloudSmsClient
(
"9XPgCY9rAb1GG2yg"
);
// 创建请求信息对象
String
templateId
=
"1323474417736716290"
;
final
WeCloudSmsAbroadModel
model
=
new
WeCloudSmsAbroadModel
(
areaCode
,
phone
,
templateId
,
verificationCode
);
// 创建请求对象
final
WeCloudSmsDomesticSingleSendRequest
request
=
new
WeCloudSmsDomesticSingleSendRequest
(
model
);
// 执行请求
final
WeCloudSmsDomesticSingleSendResponse
execute
=
client
.
execute
(
request
);
// 判断是否请求成功
if
(
execute
.
isSuccess
())
{
// 获取返回业务对象
final
WeCloudSmsSingleSendResult
result
=
execute
.
getData
();
}
else
{
// 输出请求失败信息
// log.error(execute.getMsg());
}
}
}
common/src/main/resources/mapper/StrokeMapper.xml
View file @
8cc5da56
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
plain_type_id,
plain_type_id,
outset_time,
outset_time,
return_time,
return_time,
type,
zuo
type,
STATUS,
STATUS,
money,
money,
user_id,
user_id,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment