Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
extend
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
park
extend
Commits
c3e4372c
Commit
c3e4372c
authored
Jun 24, 2020
by
lixian7
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修复
parent
ee91a58a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
domain/src/main/java/com/hikcreate/edl/pub/web/mobile/domain/impl/BindServiceImpl.java
+8
-1
infra/src/main/resources/mapper/VerifyInfoMapper.xml
+1
-1
No files found.
domain/src/main/java/com/hikcreate/edl/pub/web/mobile/domain/impl/BindServiceImpl.java
View file @
c3e4372c
...
...
@@ -87,6 +87,13 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, ParkBindInfo> i
@Value
(
"${biz.unbind.limit.count:10}"
)
Integer
unBindCount
;
/**
* 验证有效性限制时间
* 单位:小时
*/
@Value
(
"${biz.check.validity.limit.time:24}"
)
Integer
checkValidityLimitTime
;
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
@@ -328,7 +335,7 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, ParkBindInfo> i
* 校验当前电话号码是否在1天内已通过验证
*/
ParkVerifyInfo
verify
=
verifyInfo
.
checkValidity
(
query
.
getPhone
(),
query
.
getUserId
(),
DateUtil
.
offset
Day
(
DateTime
.
now
(),
-
1
));
DateUtil
.
offset
Hour
(
DateTime
.
now
(),
-
checkValidityLimitTime
));
if
(
verify
==
null
)
{
return
ResultGenerator
.
fail
(
StatusCode
.
PERMISSION_DENIED
);
}
...
...
infra/src/main/resources/mapper/VerifyInfoMapper.xml
View file @
c3e4372c
...
...
@@ -5,6 +5,6 @@
<select
id=
"checkValidity"
resultType=
"com.hikcreate.edl.pub.web.mobile.infra.model.entity.ParkVerifyInfo"
>
select id, user_id, verify_code, phone,pass_time from park_verify_info as v
where pass_time
<![CDATA[ >= ]]>
#{time} and phone=#{phone} and user_id=#{userId}
where pass_time
<![CDATA[ >= ]]>
#{time} and phone=#{phone} and user_id=#{userId}
limit 1;
</select>
</mapper>
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