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
b6e165d3
Commit
b6e165d3
authored
Jun 21, 2020
by
xieshixiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改BUG
parent
0ba3fc03
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
12 deletions
+23
-12
domain/src/main/java/com/hikcreate/edl/pub/web/mobile/domain/impl/BindServiceImpl.java
+22
-12
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/data/mapper/BindInfoMapper.java
+1
-0
No files found.
domain/src/main/java/com/hikcreate/edl/pub/web/mobile/domain/impl/BindServiceImpl.java
View file @
b6e165d3
...
...
@@ -25,9 +25,9 @@ import com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.par
import
com.hikcreate.edl.pub.web.mobile.infra.data.mapper.BindInfoMapper
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.mapper.VerifyInfoMapper
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.BindInfo
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.VerifyInfo
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.request.BindInfoQueryReq
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.request.H5BindInfoQuery
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.VerifyInfo
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.request.UnBindReq
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.response.DrivingLicenseInfoRes
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.response.InsuranceInfoRes
;
...
...
@@ -100,12 +100,22 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
return
ResponseGenerator
.
fail
(
StatusCode
.
DATA_ERROR
);
}
try
{
QueryWrapper
<
BindInfo
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"user_id"
,
info
.
getUserId
());
queryWrapper
.
eq
(
"plate_num"
,
info
.
getPlateNum
());
queryWrapper
.
eq
(
"plate_type"
,
info
.
getPlateType
());
BindInfo
bindExist
=
mapper
.
selectOne
(
queryWrapper
);
if
(
bindExist
!=
null
)
{
info
.
setUnqId
(
bindExist
.
getUnqId
());
info
.
setStatus
(
"1"
);
mapper
.
updateById
(
info
);
}
else
{
info
.
setUnqId
(
UUID
.
randomUUID
().
toString
());
mapper
.
insert
(
info
);
return
ResponseGenerator
.
success
(
info
.
getUnqId
());
}
catch
(
Exception
e
)
{
return
ResponseGenerator
.
fail
(
StatusCode
.
BUSINESS_ERROR
);
}
return
ResponseGenerator
.
success
(
info
.
getUnqId
());
}
/**
...
...
@@ -115,7 +125,7 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
* @return
*/
@Override
public
boolean
unbindInfo
(
UnBindReq
req
)
{
public
boolean
unbindInfo
(
UnBindReq
req
)
{
return
bindCache
.
unBind
(
req
.
getUnqId
());
}
...
...
@@ -126,13 +136,13 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
* @return
*/
@Override
public
List
<
BindInfo
>
selectByQuery
(
BindInfoQueryReq
query
)
{
public
List
<
BindInfo
>
selectByQuery
(
BindInfoQueryReq
query
)
{
return
bindCache
.
selectByQuery
(
query
.
getUserId
());
}
@Override
public
Response
<
YearCheckInfoRes
>
yearCheckInfo
(
H5BindInfoQuery
query
)
{
BindInfo
bindInfo
=
bindCache
.
getById
(
query
.
getUnqId
());
public
Response
<
YearCheckInfoRes
>
yearCheckInfo
(
H5BindInfoQuery
query
)
{
BindInfo
bindInfo
=
bindCache
.
getById
(
query
.
getUnqId
());
if
(
bindInfo
==
null
||
"0"
.
equals
(
bindInfo
.
getStatus
()))
{
return
ResponseGenerator
.
fail
(
StatusCode
.
DATA_ERROR
);
}
...
...
@@ -158,7 +168,7 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
}
@Override
public
Response
<
InsuranceInfoRes
>
insuranceInfo
(
H5BindInfoQuery
query
)
{
public
Response
<
InsuranceInfoRes
>
insuranceInfo
(
H5BindInfoQuery
query
)
{
BindInfo
bindInfo
=
bindCache
.
getById
(
query
.
getUnqId
());
if
(
bindInfo
==
null
||
"0"
.
equals
(
bindInfo
.
getStatus
()))
{
return
ResponseGenerator
.
fail
(
StatusCode
.
DATA_ERROR
);
...
...
@@ -193,7 +203,7 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
@Override
public
Response
<
ResultList
<
ViolationInfoRes
>>
violationInfo
(
H5BindInfoQuery
query
)
{
public
Response
<
ResultList
<
ViolationInfoRes
>>
violationInfo
(
H5BindInfoQuery
query
)
{
/**
* 校验当前的绑定信息是否存在
*/
...
...
@@ -227,7 +237,7 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
}
@Override
public
Response
<
DrivingLicenseInfoRes
>
drivingLicenseInfo
(
H5BindInfoQuery
query
)
{
public
Response
<
DrivingLicenseInfoRes
>
drivingLicenseInfo
(
H5BindInfoQuery
query
)
{
/**
* 校验当前的绑定信息是否存在
*/
...
...
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/data/mapper/BindInfoMapper.java
View file @
b6e165d3
...
...
@@ -19,6 +19,7 @@ public interface BindInfoMapper extends BaseMapper<BindInfo> {
List
<
BindInfo
>
selectByQuery
(
String
userId
);
Integer
bindInfoInsert
(
BindInfo
info
);
Integer
clearPast
(
DateTime
dateTime
);
...
...
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