Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
head_group
xyqb-user2
Commits
56dc4fb6
Commit
56dc4fb6
authored
Dec 18, 2017
by
Java—红包—徐 然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改增加appName
parent
d1b4a38d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
10 deletions
+18
-10
SmsController.java
...uantgroup/xyqb/controller/internal/sms/SmsController.java
+18
-10
No files found.
src/main/java/cn/quantgroup/xyqb/controller/internal/sms/SmsController.java
View file @
56dc4fb6
...
...
@@ -55,16 +55,16 @@ public class SmsController implements IBaseController {
*/
@CaptchaValidator
@RequestMapping
(
"/send_sms_verification_code"
)
public
JsonResult
verifyPhoneNoH5
(
@RequestParam
String
phoneNo
,
@RequestParam
(
required
=
false
)
String
registerFrom
)
{
public
JsonResult
verifyPhoneNoH5
(
@RequestParam
String
phoneNo
,
@RequestParam
(
required
=
false
)
String
registerFrom
,
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
appName
)
{
LOGGER
.
info
(
"注册-发送验证码, phoneNo:{}, registerFrom:{}"
,
phoneNo
,
registerFrom
);
return
sendVerificationCode2
(
phoneNo
);
return
sendVerificationCode2
(
phoneNo
,
appName
);
}
@CaptchaValidator
@RequestMapping
(
"/send_reset_code"
)
public
JsonResult
resetPasswordH5
(
@RequestParam
String
phoneNo
,
@RequestParam
(
required
=
false
)
String
registerFrom
)
{
public
JsonResult
resetPasswordH5
(
@RequestParam
String
phoneNo
,
@RequestParam
(
required
=
false
)
String
registerFrom
,
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
appName
)
{
LOGGER
.
info
(
"重置密码-发送验证码, phoneNo:{}, registerFrom:{}"
,
phoneNo
,
registerFrom
);
return
sendVerificationCode2
(
phoneNo
);
return
sendVerificationCode2
(
phoneNo
,
appName
);
}
/**
...
...
@@ -115,9 +115,9 @@ public class SmsController implements IBaseController {
*/
@CaptchaValidator
@RequestMapping
(
"/send_login_code"
)
public
JsonResult
sendLoginCode
(
@RequestParam
String
phoneNo
,
@RequestParam
(
required
=
false
)
String
registerFrom
)
{
public
JsonResult
sendLoginCode
(
@RequestParam
String
phoneNo
,
@RequestParam
(
required
=
false
)
String
registerFrom
,
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
appName
)
{
LOGGER
.
info
(
"快速登陆-发送验证码, phoneNo:{}, registerFrom:{}"
,
phoneNo
,
registerFrom
);
return
sendVerificationCode2
(
phoneNo
);
return
sendVerificationCode2
(
phoneNo
,
appName
);
}
/**
...
...
@@ -125,12 +125,12 @@ public class SmsController implements IBaseController {
*/
@CaptchaValidator
@RequestMapping
(
"/send_regist_code"
)
public
JsonResult
sendRegistCode
(
@RequestParam
String
phoneNo
,
@RequestParam
(
required
=
false
)
String
registerFrom
)
{
public
JsonResult
sendRegistCode
(
@RequestParam
String
phoneNo
,
@RequestParam
(
required
=
false
)
String
registerFrom
,
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
appName
)
{
LOGGER
.
info
(
"快速注册-发送验证码, phoneNo:{}, registerFrom:{}"
,
phoneNo
,
registerFrom
);
return
sendVerificationCode2
(
phoneNo
);
return
sendVerificationCode2
(
phoneNo
,
appName
);
}
private
JsonResult
sendVerificationCode2
(
String
phoneNo
)
{
private
JsonResult
sendVerificationCode2
(
String
phoneNo
,
String
appName
)
{
if
(!
ValidationUtil
.
validatePhoneNo
(
phoneNo
))
{
return
JsonResult
.
buildErrorStateResult
(
"手机号格式有误"
,
null
);
}
...
...
@@ -147,7 +147,15 @@ public class SmsController implements IBaseController {
/*ConfirmableMsg confirmableMsg = new ConfirmableMsg(
uniqueId, newList, "1", "1", phoneNo
);*/
MsgParams
message
=
new
MsgParams
(
Collections
.
singletonList
(
2
),
phoneNo
,
"1"
,
"1"
,
Collections
.
singletonList
(
randomCode
),
uniqueId
);
MsgParams
message
=
new
MsgParams
.
Builder
()
.
typeList
(
Collections
.
singletonList
(
2
))
.
phoneNo
(
phoneNo
)
.
merchantId
(
"1"
)
.
contentId
(
"1"
)
.
uniqueId
(
uniqueId
)
.
contentArgs
(
Collections
.
singletonList
(
randomCode
))
.
channel
(
appName
)
.
build
();
try
{
//smsService.getSmsSender().sendConfirmableMessage(confirmableMsg);
smsService
.
getSmsSender
().
sendMsg
(
message
);
...
...
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