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
fe694fe2
Commit
fe694fe2
authored
Jun 21, 2020
by
xieshixiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改BUG
parent
89d807be
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
35 deletions
+29
-35
api/src/main/java/com/hikcreate/edl/pub/web/mobile/api/controller/BindInfoControlller.java
+11
-12
api/src/main/java/com/hikcreate/edl/pub/web/mobile/api/controller/H5Controller.java
+13
-22
domain/src/main/java/com/hikcreate/edl/pub/web/mobile/domain/impl/BindServiceImpl.java
+1
-0
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/model/param/response/InsuranceInfoRes.java
+4
-1
No files found.
api/src/main/java/com/hikcreate/edl/pub/web/mobile/api/controller/BindInfoControlller.java
View file @
fe694fe2
...
@@ -12,6 +12,7 @@ import com.hikcreate.edl.pub.web.mobile.infra.model.BindInfoQuery;
...
@@ -12,6 +12,7 @@ import com.hikcreate.edl.pub.web.mobile.infra.model.BindInfoQuery;
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.response.ResultList
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.response.ResultList
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -58,19 +59,19 @@ public class BindInfoControlller extends BaseController {
...
@@ -58,19 +59,19 @@ public class BindInfoControlller extends BaseController {
/**
/**
* 解绑用户信息的接口
* 解绑用户信息的接口
*
*
* @param
info
* @param
query
* @return Result
* @return Result
* @author: xsx
* @author: xsx
* @date: 2020/6/19 10:27
* @date: 2020/6/19 10:27
*/
*/
@PostMapping
(
"unbind"
)
@PostMapping
(
"unbind"
)
public
Response
unbindInfo
(
@RequestBody
BindInfo
info
)
{
public
Response
unbindInfo
(
@RequestBody
@Validated
BindInfoQuery
query
)
{
if
(
info
==
null
)
{
return
ResponseGenerator
.
fail
(
StatusCode
.
PARAM_ERROR
);
BindInfo
bindInfo
=
new
BindInfo
(
);
}
bindInfo
.
setUnqId
(
query
.
getUnqId
());
i
nfo
.
setStatus
(
"0"
);
bindI
nfo
.
setStatus
(
"0"
);
i
nfo
.
setUnbindTime
(
DateTime
.
now
().
toString
());
bindI
nfo
.
setUnbindTime
(
DateTime
.
now
().
toString
());
return
mapper
.
unbind
(
i
nfo
)
>
0
?
ResponseGenerator
.
success
()
:
ResponseGenerator
.
fail
(
""
);
return
mapper
.
unbind
(
bindI
nfo
)
>
0
?
ResponseGenerator
.
success
()
:
ResponseGenerator
.
fail
(
""
);
}
}
/**
/**
...
@@ -83,10 +84,8 @@ public class BindInfoControlller extends BaseController {
...
@@ -83,10 +84,8 @@ public class BindInfoControlller extends BaseController {
*/
*/
@PostMapping
(
"query"
)
@PostMapping
(
"query"
)
@ResponseEncryptAnnotation
@ResponseEncryptAnnotation
public
Response
<
ResultList
<
BindInfo
>>
bindInfoQery
(
@RequestBody
BindInfoQuery
query
)
{
public
Response
<
ResultList
<
BindInfo
>>
bindInfoQery
(
@RequestBody
@Validated
BindInfoQuery
query
)
{
if
(
query
==
null
)
{
return
ResponseGenerator
.
fail
(
StatusCode
.
PARAM_ERROR
);
}
return
ResponseGenerator
.
success
(
new
ResultList
<
BindInfo
>(
mapper
.
selectByQuery
(
query
).
getDataItems
()));
return
ResponseGenerator
.
success
(
new
ResultList
<
BindInfo
>(
mapper
.
selectByQuery
(
query
).
getDataItems
()));
}
}
...
...
api/src/main/java/com/hikcreate/edl/pub/web/mobile/api/controller/H5Controller.java
View file @
fe694fe2
...
@@ -16,7 +16,12 @@ import com.hikcreate.edl.pub.web.mobile.infra.model.BindInfoQuery;
...
@@ -16,7 +16,12 @@ import com.hikcreate.edl.pub.web.mobile.infra.model.BindInfoQuery;
import
com.hikcreate.edl.pub.web.mobile.infra.model.VerifyInfo
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.VerifyInfo
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.request.CheckVerifyCodeReq
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.request.CheckVerifyCodeReq
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.request.SendVerifyCodeReq
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.request.SendVerifyCodeReq
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.response.*
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.response.CheckValidityRes
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.response.DrivingLicenseInfoRes
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.response.InsuranceInfoRes
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.response.ResultList
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.response.ViolationInfoRes
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.response.YearCheckInfoRes
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
...
@@ -59,9 +64,7 @@ public class H5Controller {
...
@@ -59,9 +64,7 @@ public class H5Controller {
*/
*/
@PostMapping
(
"yearCheckInfo"
)
@PostMapping
(
"yearCheckInfo"
)
public
Response
<
YearCheckInfoRes
>
yearCheckInfo
(
@RequestBody
@Validated
BindInfoQuery
query
)
{
public
Response
<
YearCheckInfoRes
>
yearCheckInfo
(
@RequestBody
@Validated
BindInfoQuery
query
)
{
if
(
query
==
null
)
{
return
ResponseGenerator
.
fail
(
StatusCode
.
PARAM_ERROR
);
}
return
service
.
yearCheckInfo
(
query
);
return
service
.
yearCheckInfo
(
query
);
}
}
...
@@ -75,9 +78,7 @@ public class H5Controller {
...
@@ -75,9 +78,7 @@ public class H5Controller {
*/
*/
@PostMapping
(
"violationInfo"
)
@PostMapping
(
"violationInfo"
)
public
Response
<
ResultList
<
ViolationInfoRes
>>
violationInfo
(
@RequestBody
@Validated
BindInfoQuery
query
)
{
public
Response
<
ResultList
<
ViolationInfoRes
>>
violationInfo
(
@RequestBody
@Validated
BindInfoQuery
query
)
{
if
(
query
==
null
)
{
return
ResponseGenerator
.
fail
(
StatusCode
.
PARAM_ERROR
);
}
return
service
.
violationInfo
(
query
);
return
service
.
violationInfo
(
query
);
}
}
...
@@ -91,9 +92,7 @@ public class H5Controller {
...
@@ -91,9 +92,7 @@ public class H5Controller {
*/
*/
@PostMapping
(
"insuranceInfo"
)
@PostMapping
(
"insuranceInfo"
)
public
Response
<
InsuranceInfoRes
>
insuranceInfo
(
@RequestBody
@Validated
BindInfoQuery
query
)
{
public
Response
<
InsuranceInfoRes
>
insuranceInfo
(
@RequestBody
@Validated
BindInfoQuery
query
)
{
if
(
query
==
null
)
{
return
ResponseGenerator
.
fail
(
StatusCode
.
PARAM_ERROR
);
}
return
service
.
insuranceInfo
(
query
);
return
service
.
insuranceInfo
(
query
);
}
}
...
@@ -108,9 +107,7 @@ public class H5Controller {
...
@@ -108,9 +107,7 @@ public class H5Controller {
*/
*/
@PostMapping
(
"drivingLicenseInfo"
)
@PostMapping
(
"drivingLicenseInfo"
)
public
Response
<
DrivingLicenseInfoRes
>
drivingLicenseInfo
(
@RequestBody
@Validated
BindInfoQuery
query
)
{
public
Response
<
DrivingLicenseInfoRes
>
drivingLicenseInfo
(
@RequestBody
@Validated
BindInfoQuery
query
)
{
if
(
query
==
null
)
{
return
ResponseGenerator
.
fail
(
StatusCode
.
PARAM_ERROR
);
}
return
service
.
drivingLicenseInfo
(
query
);
return
service
.
drivingLicenseInfo
(
query
);
}
}
...
@@ -121,9 +118,7 @@ public class H5Controller {
...
@@ -121,9 +118,7 @@ public class H5Controller {
*/
*/
@PostMapping
(
"checkValidity"
)
@PostMapping
(
"checkValidity"
)
public
Response
<
CheckValidityRes
>
checkValidity
(
@RequestBody
@Validated
BindInfoQuery
query
)
{
public
Response
<
CheckValidityRes
>
checkValidity
(
@RequestBody
@Validated
BindInfoQuery
query
)
{
if
(
query
==
null
)
{
return
ResponseGenerator
.
fail
(
StatusCode
.
PARAM_ERROR
);
}
VerifyInfo
verifyInfo
=
verifyInfoMapper
.
checkValidity
(
query
.
getPhone
(),
query
.
getUserId
(),
VerifyInfo
verifyInfo
=
verifyInfoMapper
.
checkValidity
(
query
.
getPhone
(),
query
.
getUserId
(),
DateUtil
.
offsetDay
(
DateTime
.
now
(),
-
10
));
DateUtil
.
offsetDay
(
DateTime
.
now
(),
-
10
));
...
@@ -147,9 +142,7 @@ public class H5Controller {
...
@@ -147,9 +142,7 @@ public class H5Controller {
*/
*/
@PostMapping
(
"sendVerifyCode"
)
@PostMapping
(
"sendVerifyCode"
)
public
Response
<
Void
>
sendVerifyCode
(
@RequestBody
@Validated
SendVerifyCodeReq
req
)
{
public
Response
<
Void
>
sendVerifyCode
(
@RequestBody
@Validated
SendVerifyCodeReq
req
)
{
if
(
req
==
null
)
{
return
ResponseGenerator
.
fail
(
StatusCode
.
PARAM_ERROR
);
}
SendVerifyCodeMicReq
micReq
=
new
SendVerifyCodeMicReq
();
SendVerifyCodeMicReq
micReq
=
new
SendVerifyCodeMicReq
();
micReq
.
setPhone
(
req
.
getPhone
());
micReq
.
setPhone
(
req
.
getPhone
());
micReq
.
setVerifyCode
(
VerifyCodeUtil
.
getCode
());
micReq
.
setVerifyCode
(
VerifyCodeUtil
.
getCode
());
...
@@ -167,9 +160,7 @@ public class H5Controller {
...
@@ -167,9 +160,7 @@ public class H5Controller {
*/
*/
@PostMapping
(
"checkVerifyCode"
)
@PostMapping
(
"checkVerifyCode"
)
public
Response
<
Void
>
sendVerifyCode
(
@RequestBody
@Validated
CheckVerifyCodeReq
req
)
{
public
Response
<
Void
>
sendVerifyCode
(
@RequestBody
@Validated
CheckVerifyCodeReq
req
)
{
if
(
req
==
null
)
{
return
ResponseGenerator
.
fail
(
StatusCode
.
PARAM_ERROR
);
}
CheckVerifyCodeMicReq
micReq
=
new
CheckVerifyCodeMicReq
();
CheckVerifyCodeMicReq
micReq
=
new
CheckVerifyCodeMicReq
();
micReq
.
setPhone
(
req
.
getPhone
());
micReq
.
setPhone
(
req
.
getPhone
());
micReq
.
setVerifyCode
(
req
.
getVerifyCode
());
micReq
.
setVerifyCode
(
req
.
getVerifyCode
());
...
...
domain/src/main/java/com/hikcreate/edl/pub/web/mobile/domain/impl/BindServiceImpl.java
View file @
fe694fe2
...
@@ -145,6 +145,7 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
...
@@ -145,6 +145,7 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
}
}
InsuranceInfoRes
insuranceInfoRes
=
new
InsuranceInfoRes
();
InsuranceInfoRes
insuranceInfoRes
=
new
InsuranceInfoRes
();
insuranceInfoRes
.
setPlateNum
(
bindInfo
.
getPlateNum
());
insuranceInfoRes
.
setPlateNum
(
bindInfo
.
getPlateNum
());
insuranceInfoRes
.
setInsuranceType
(
"交强险"
);
if
(
StrUtil
.
isNotBlank
(
vehicleRes
.
getBxzzrq
()))
{
if
(
StrUtil
.
isNotBlank
(
vehicleRes
.
getBxzzrq
()))
{
Long
time
=
DateUtil
.
parse
(
vehicleRes
.
getBxzzrq
(),
"yyyy-MM-dd HH:mm:ss"
).
getTime
();
Long
time
=
DateUtil
.
parse
(
vehicleRes
.
getBxzzrq
(),
"yyyy-MM-dd HH:mm:ss"
).
getTime
();
if
(
time
>=
System
.
currentTimeMillis
())
{
if
(
time
>=
System
.
currentTimeMillis
())
{
...
...
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/model/param/response/InsuranceInfoRes.java
View file @
fe694fe2
...
@@ -25,5 +25,8 @@ public class InsuranceInfoRes {
...
@@ -25,5 +25,8 @@ public class InsuranceInfoRes {
* 保险状态
* 保险状态
*/
*/
private
String
status
;
private
String
status
;
/**
* 保险类型
*/
private
String
insuranceType
;
}
}
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