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
379d03fe
Commit
379d03fe
authored
May 09, 2017
by
Java-刘 彧阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
聚美注册短信发送
parent
2c2f8255
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
3 deletions
+24
-3
MotanUserServiceImpl.java
.../xyqb/controller/external/motan/MotanUserServiceImpl.java
+4
-1
AppController.java
...antgroup/xyqb/controller/external/user/AppController.java
+4
-2
ISmsService.java
...main/java/cn/quantgroup/xyqb/service/sms/ISmsService.java
+2
-0
SmsServiceImpl.java
...a/cn/quantgroup/xyqb/service/sms/impl/SmsServiceImpl.java
+14
-0
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/motan/MotanUserServiceImpl.java
View file @
379d03fe
...
...
@@ -615,9 +615,12 @@ public class MotanUserServiceImpl implements UserMotanService {
user
.
setCreatedAt
(
currentTime
);
userRepository
.
saveAndFlush
(
user
);
if
(
registerFrom
!=
645L
)
{
if
(
registerFrom
!=
645L
&&
registerFrom
!=
900L
)
{
smsService
.
sendAfterRegister
(
phoneNo
);
log
.
info
(
"第三方登录用户注册成功, registerFrom:{}, phoneNo:{},idNo:{},name:{} 并且已发送短信通知"
,
registerFrom
,
phoneNo
,
idNo
,
name
);
}
else
if
(
registerFrom
==
900L
){
smsService
.
sendAfterRegister
(
phoneNo
,
"123"
);
log
.
info
(
"第三方(聚美)登录用户注册成功, registerFrom:{}, phoneNo:{},idNo:{},name:{} 并且已发送短信通知"
,
registerFrom
,
phoneNo
,
idNo
,
name
);
}
if
(
StringUtils
.
isNotEmpty
(
idNo
)
&&
StringUtils
.
isNotEmpty
(
name
))
{
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/user/AppController.java
View file @
379d03fe
...
...
@@ -183,14 +183,16 @@ public class AppController implements IBaseController {
user
.
setCreatedAt
(
currentTime
);
userRepository
.
saveAndFlush
(
user
);
if
(
registerFrom
!=
645L
)
{
if
(
registerFrom
!=
645L
&&
registerFrom
!=
900L
)
{
smsService
.
sendAfterRegister
(
phoneNo
);
LOGGER
.
info
(
"第三方登录用户注册成功, registerFrom:{}, phoneNo:{}, 并且已发送短信通知"
,
registerFrom
,
phoneNo
);
}
else
if
(
registerFrom
==
900L
){
smsService
.
sendAfterRegister
(
phoneNo
,
"123"
);
LOGGER
.
info
(
"第三方(聚美)登录用户注册成功, registerFrom:{}, phoneNo:{},idNo:{},name:{} 并且已发送短信通知"
,
registerFrom
,
phoneNo
,
idNo
,
name
);
}
if
(
StringUtils
.
isNotEmpty
(
idNo
)
&&
StringUtils
.
isNotEmpty
(
name
))
{
LOGGER
.
info
(
"第三方登录用户,保存 UserDetail"
);
IdCardInfo
cardInfo
;
try
{
cardInfo
=
idCardService
.
getIdCardInfoWithExceptions
(
idNo
);
...
...
src/main/java/cn/quantgroup/xyqb/service/sms/ISmsService.java
View file @
379d03fe
...
...
@@ -14,6 +14,8 @@ public interface ISmsService {
void
sendAfterRegister
(
String
phoneNo
);
void
sendAfterRegister
(
String
phoneNo
,
String
contentId
);
boolean
validRegisterOrResetPasswdVerificationCode
(
String
phoneNo
,
String
smsVerificationCode
);
boolean
validateFastLoginVerificationCode
(
String
phoneNo
,
String
verificationCode
);
...
...
src/main/java/cn/quantgroup/xyqb/service/sms/impl/SmsServiceImpl.java
View file @
379d03fe
...
...
@@ -53,6 +53,20 @@ public class SmsServiceImpl implements ISmsService {
}
}
@Override
public
void
sendAfterRegister
(
String
phoneNo
,
String
contentId
)
{
try
{
if
(
StringUtils
.
isBlank
(
contentId
)){
contentId
=
"24"
;
}
MsgParams
msgParams
=
new
MsgParams
(
Collections
.
singletonList
(
2
),
phoneNo
,
"1"
,
contentId
,
Collections
.
emptyList
());
smsSender
.
sendMsg
(
msgParams
);
LOGGER
.
info
(
"注册完成,发送短信, phoneNo:{}"
,
phoneNo
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
/**
* 检查验证码是否正确
*
...
...
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