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
6f0e4e6d
Commit
6f0e4e6d
authored
Jun 23, 2020
by
xieshixiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
5bc1596f
9c16def2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
api/src/main/java/com/hikcreate/edl/pub/web/mobile/api/controller/H5Controller.java
+9
-1
domain/src/main/java/com/hikcreate/edl/pub/web/mobile/domain/impl/BindServiceImpl.java
+6
-2
No files found.
api/src/main/java/com/hikcreate/edl/pub/web/mobile/api/controller/H5Controller.java
View file @
6f0e4e6d
...
...
@@ -25,6 +25,7 @@ import com.hikcreate.edl.pub.web.mobile.infra.model.param.response.ViolationInfo
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.response.YearCheckInfoRes
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -56,6 +57,13 @@ public class H5Controller {
DefaultConverter
defaultConverter
;
/**
* 验证有效性限制时间
* 单位:小时
*/
@Value
(
"${biz.check.validity.limit.time:24}"
)
Integer
checkValidityLimitTime
;
/**
* 年检信息查询接口
*
* @param query
...
...
@@ -127,7 +135,7 @@ public class H5Controller {
public
Response
<
CheckValidityRes
>
checkValidity
(
@RequestBody
@Validated
H5BindInfoQuery
query
)
{
ParkVerifyInfo
verifyInfo
=
verifyInfoMapper
.
checkValidity
(
query
.
getPhone
(),
query
.
getUserId
(),
DateUtil
.
offset
Day
(
DateTime
.
now
(),
-
1
));
DateUtil
.
offset
Hour
(
DateTime
.
now
(),
-
checkValidityLimitTime
));
CheckValidityRes
checkValidityRes
=
new
CheckValidityRes
();
defaultConverter
.
getMapperFacade
().
map
(
query
,
checkValidityRes
);
...
...
domain/src/main/java/com/hikcreate/edl/pub/web/mobile/domain/impl/BindServiceImpl.java
View file @
6f0e4e6d
...
...
@@ -77,7 +77,7 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, ParkBindInfo> i
* 解除绑定时间限制
* 单位:小时
*/
@Value
(
"${biz.unbind.time:
-
720}"
)
@Value
(
"${biz.unbind.time:720}"
)
Integer
unBindTime
;
...
...
@@ -156,12 +156,16 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, ParkBindInfo> i
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Response
unbindInfo
(
UnBindReq
req
)
{
ParkBindInfo
bindInfo
=
bindCache
.
getById
(
req
.
getUnqId
());
if
(
bindInfo
==
null
||
"0"
.
equals
(
bindInfo
.
getStatus
()))
{
return
ResponseGenerator
.
fail
(
StatusCode
.
DATA_ERROR
,
"绑定信息不存在"
);
}
/**
* 解绑规则:30天内,同一客户解绑次数总计不能超过10次
*/
QueryWrapper
<
ParkBindInfo
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"user_id"
,
req
.
getUserId
());
queryWrapper
.
ge
(
"unbind_time"
,
DateUtil
.
offsetHour
(
new
Date
(),
unBindTime
));
queryWrapper
.
ge
(
"unbind_time"
,
DateUtil
.
offsetHour
(
new
Date
(),
-
unBindTime
));
queryWrapper
.
eq
(
"status"
,
"0"
);
Integer
integer
=
mapper
.
selectCount
(
queryWrapper
);
if
(
integer
>=
10
)
{
...
...
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