Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1-office-web-sit
Commits
701ba9ff
Commit
701ba9ff
authored
Dec 23, 2021
by
唐功亮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加打印 语句
parent
91d2fae2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletions
+14
-1
MemberServiceImpl.java
...office/modules/manage/service/impl/MemberServiceImpl.java
+10
-1
TimescodeRegiServiceImpl.java
...modules/manage/service/impl/TimescodeRegiServiceImpl.java
+4
-0
No files found.
src/main/java/io/office/modules/manage/service/impl/MemberServiceImpl.java
View file @
701ba9ff
...
@@ -68,6 +68,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
...
@@ -68,6 +68,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
@Override
@Override
public
void
userRegistered
(
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
void
userRegistered
(
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
log
.
info
(
"注册IP为:"
+
IPUtils
.
getIpAddr
(
request
));
String
userName
=
params
.
get
(
"userName"
)
==
null
?
""
:
String
.
valueOf
(
params
.
get
(
"userName"
));
String
userName
=
params
.
get
(
"userName"
)
==
null
?
""
:
String
.
valueOf
(
params
.
get
(
"userName"
));
String
emiail
=
params
.
get
(
"e-miail"
)
==
null
?
""
:
String
.
valueOf
(
params
.
get
(
"e-miail"
));
String
emiail
=
params
.
get
(
"e-miail"
)
==
null
?
""
:
String
.
valueOf
(
params
.
get
(
"e-miail"
));
String
phone
=
params
.
get
(
"phone"
)
==
null
?
""
:
String
.
valueOf
(
params
.
get
(
"phone"
));
String
phone
=
params
.
get
(
"phone"
)
==
null
?
""
:
String
.
valueOf
(
params
.
get
(
"phone"
));
...
@@ -94,6 +95,11 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
...
@@ -94,6 +95,11 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
if
(!
matchPhoneNumber
(
phone
))
{
if
(!
matchPhoneNumber
(
phone
))
{
throw
new
RRException
(
"手机格式不正确,请重新填写"
);
throw
new
RRException
(
"手机格式不正确,请重新填写"
);
}
}
//判断用户名是否存在
MemberEntity
memberEntityName
=
memberDao
.
selectByName
(
userName
);
if
(
memberEntityName
!=
null
){
throw
new
RRException
(
"用户名已存在"
);
}
//利用获取验证码时保存的session,判断手机验证码非空,和发送的短信内容是否一致,提交时的手机号与接收验证码的手机号是否相同,验证码是否已失效
//利用获取验证码时保存的session,判断手机验证码非空,和发送的短信内容是否一致,提交时的手机号与接收验证码的手机号是否相同,验证码是否已失效
ValueOperations
forValue
=
redisTemplate
.
opsForValue
();
ValueOperations
forValue
=
redisTemplate
.
opsForValue
();
...
@@ -117,7 +123,8 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
...
@@ -117,7 +123,8 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
memberEntity
.
setOicq
(
""
);
memberEntity
.
setOicq
(
""
);
memberEntity
.
setPassword
(
passWord
);
memberEntity
.
setPassword
(
passWord
);
memberEntity
.
setRegisterip
(
IPUtils
.
getIpAddr
(
request
));
memberEntity
.
setRegisterip
(
IPUtils
.
getIpAddr
(
request
));
log
.
info
(
"注册IP为:"
+
IPUtils
.
getIpAddr
(
request
));
memberEntity
.
setApplystate
(
"未申请"
);
memberEntity
.
setSource
(
"www"
);
memberEntity
.
setRegisterdate
(
new
Date
());
memberEntity
.
setRegisterdate
(
new
Date
());
memberEntity
.
setUpdatedate
(
new
Date
());
memberEntity
.
setUpdatedate
(
new
Date
());
memberEntity
.
setLevels
(
1
);
memberEntity
.
setLevels
(
1
);
...
@@ -454,6 +461,8 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
...
@@ -454,6 +461,8 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
Document
document
=
DocumentHelper
.
parseText
(
post
);
Document
document
=
DocumentHelper
.
parseText
(
post
);
// 获取returnstatus节点对象
// 获取returnstatus节点对象
String
returnstatus
=
document
.
selectSingleNode
(
"//returnstatus"
).
getText
();
String
returnstatus
=
document
.
selectSingleNode
(
"//returnstatus"
).
getText
();
log
.
info
(
"发送验证码返回信息"
+
post
);
System
.
out
.
println
(
post
);
if
(
returnstatus
.
equals
(
"Success"
))
{
if
(
returnstatus
.
equals
(
"Success"
))
{
//保存验证码信息log_message表
//保存验证码信息log_message表
state
=
"发送成功"
;
state
=
"发送成功"
;
...
...
src/main/java/io/office/modules/manage/service/impl/TimescodeRegiServiceImpl.java
View file @
701ba9ff
...
@@ -10,6 +10,7 @@ import io.office.modules.manage.entity.LogMessageEntity;
...
@@ -10,6 +10,7 @@ import io.office.modules.manage.entity.LogMessageEntity;
import
io.office.modules.manage.entity.TimescodeRegiIpEntity
;
import
io.office.modules.manage.entity.TimescodeRegiIpEntity
;
import
io.office.modules.manage.service.LogMessageService
;
import
io.office.modules.manage.service.LogMessageService
;
import
io.office.modules.manage.utils.DateUtils
;
import
io.office.modules.manage.utils.DateUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.httpclient.NameValuePair
;
import
org.apache.commons.httpclient.NameValuePair
;
import
org.apache.commons.httpclient.methods.PostMethod
;
import
org.apache.commons.httpclient.methods.PostMethod
;
import
org.dom4j.Document
;
import
org.dom4j.Document
;
...
@@ -41,6 +42,7 @@ import javax.servlet.http.HttpSession;
...
@@ -41,6 +42,7 @@ import javax.servlet.http.HttpSession;
@Service
(
"timescodeRegiService"
)
@Service
(
"timescodeRegiService"
)
@Slf4j
public
class
TimescodeRegiServiceImpl
extends
ServiceImpl
<
TimescodeRegiDao
,
TimescodeRegiEntity
>
implements
TimescodeRegiService
{
public
class
TimescodeRegiServiceImpl
extends
ServiceImpl
<
TimescodeRegiDao
,
TimescodeRegiEntity
>
implements
TimescodeRegiService
{
@Autowired
@Autowired
...
@@ -204,9 +206,11 @@ public class TimescodeRegiServiceImpl extends ServiceImpl<TimescodeRegiDao, Time
...
@@ -204,9 +206,11 @@ public class TimescodeRegiServiceImpl extends ServiceImpl<TimescodeRegiDao, Time
};
};
String
post
=
sendPost
(
"http://39.106.204.178:8888/sms.aspx"
,
data
);
String
post
=
sendPost
(
"http://39.106.204.178:8888/sms.aspx"
,
data
);
log
.
info
(
"login验证码发送信息:"
+
post
);
Document
document
=
DocumentHelper
.
parseText
(
post
);
Document
document
=
DocumentHelper
.
parseText
(
post
);
// 获取returnstatus节点对象
// 获取returnstatus节点对象
String
returnstatus
=
document
.
selectSingleNode
(
"//returnstatus"
).
getText
();
String
returnstatus
=
document
.
selectSingleNode
(
"//returnstatus"
).
getText
();
log
.
info
(
"login验证码发送信息:"
+
returnstatus
);
if
(
returnstatus
.
equals
(
"Success"
)){
if
(
returnstatus
.
equals
(
"Success"
)){
//保存验证码信息log_message表
//保存验证码信息log_message表
state
=
"发送成功"
;
state
=
"发送成功"
;
...
...
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