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
45329c1b
Commit
45329c1b
authored
Jun 21, 2020
by
xieshixiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改BUG
parent
cd0bb81d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
11 deletions
+36
-11
api/src/main/java/com/hikcreate/edl/pub/web/mobile/api/controller/BindInfoControlller.java
+1
-1
domain/src/main/java/com/hikcreate/edl/pub/web/mobile/domain/impl/BindServiceImpl.java
+17
-7
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/data/mapper/BindInfoMapper.java
+2
-0
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/model/BindInfo.java
+0
-3
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/model/param/response/DrivingLicenseInfoRes.java
+4
-0
infra/src/main/resources/mapper/BindInfoMapper.xml
+12
-0
No files found.
api/src/main/java/com/hikcreate/edl/pub/web/mobile/api/controller/BindInfoControlller.java
View file @
45329c1b
...
@@ -70,7 +70,7 @@ public class BindInfoControlller extends BaseController {
...
@@ -70,7 +70,7 @@ public class BindInfoControlller extends BaseController {
}
}
info
.
setStatus
(
"0"
);
info
.
setStatus
(
"0"
);
info
.
setUnbindTime
(
DateTime
.
now
().
toString
());
info
.
setUnbindTime
(
DateTime
.
now
().
toString
());
return
mapper
.
u
pdateByI
d
(
info
)
>
0
?
ResponseGenerator
.
success
()
:
ResponseGenerator
.
fail
(
""
);
return
mapper
.
u
nbin
d
(
info
)
>
0
?
ResponseGenerator
.
success
()
:
ResponseGenerator
.
fail
(
""
);
}
}
/**
/**
...
...
domain/src/main/java/com/hikcreate/edl/pub/web/mobile/domain/impl/BindServiceImpl.java
View file @
45329c1b
...
@@ -24,7 +24,11 @@ import com.hikcreate.edl.pub.web.mobile.infra.data.mapper.VerifyInfoMapper;
...
@@ -24,7 +24,11 @@ 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.BindInfo
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.BindInfoQuery
;
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.response.*
;
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.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
...
@@ -66,7 +70,7 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
...
@@ -66,7 +70,7 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
//判断规则1:用户已绑定的车辆不超过3辆,包括已解绑但未过一个月的车辆
//判断规则1:用户已绑定的车辆不超过3辆,包括已解绑但未过一个月的车辆
QueryWrapper
boundQuery
=
new
QueryWrapper
();
QueryWrapper
boundQuery
=
new
QueryWrapper
();
boundQuery
.
eq
(
"user_id"
,
info
.
get
Phone
());
boundQuery
.
eq
(
"user_id"
,
info
.
get
UserId
());
Integer
bound
=
mapper
.
selectCount
(
boundQuery
);
Integer
bound
=
mapper
.
selectCount
(
boundQuery
);
if
(
bound
>=
3
)
{
if
(
bound
>=
3
)
{
return
ResponseGenerator
.
fail
(
StatusCode
.
BUSINESS_ERROR
);
return
ResponseGenerator
.
fail
(
StatusCode
.
BUSINESS_ERROR
);
...
@@ -84,8 +88,13 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
...
@@ -84,8 +88,13 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
if
(
info
.
getPlateType
()
==
null
||
info
.
getPlateType
().
equals
(
""
))
{
if
(
info
.
getPlateType
()
==
null
||
info
.
getPlateType
().
equals
(
""
))
{
return
ResponseGenerator
.
fail
(
StatusCode
.
DATA_ERROR
);
return
ResponseGenerator
.
fail
(
StatusCode
.
DATA_ERROR
);
}
}
return
mapper
.
insert
(
info
)
>
0
?
ResponseGenerator
.
success
(
info
.
getUnqId
())
:
ResponseGenerator
.
fail
(
StatusCode
.
BUSINESS_ERROR
);
try
{
mapper
.
insert
(
info
);
return
ResponseGenerator
.
success
(
info
.
getUnqId
());
}
catch
(
Exception
e
)
{
return
ResponseGenerator
.
fail
(
StatusCode
.
BUSINESS_ERROR
);
}
}
}
@Override
@Override
...
@@ -103,10 +112,10 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
...
@@ -103,10 +112,10 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
}
}
YearCheckInfoRes
yearCheckInfoRes
=
new
YearCheckInfoRes
();
YearCheckInfoRes
yearCheckInfoRes
=
new
YearCheckInfoRes
();
yearCheckInfoRes
.
setPlateNum
(
bindInfo
.
getPlateNum
());
yearCheckInfoRes
.
setPlateNum
(
bindInfo
.
getPlateNum
());
if
(
StrUtil
.
isNotBlank
(
vehicleRes
.
getYxqz
())
)
{
if
(
StrUtil
.
isNotBlank
(
vehicleRes
.
getYxqz
())
)
{
yearCheckInfoRes
.
setValidityTime
(
vehicleRes
.
getYxqz
().
substring
(
0
,
10
));
yearCheckInfoRes
.
setValidityTime
(
vehicleRes
.
getYxqz
().
substring
(
0
,
10
));
Long
checkTime
=
DateUtil
.
parse
(
vehicleRes
.
getYxqz
(),
"yyyy-MM-dd HH:mm:ss"
).
getTime
();
Long
checkTime
=
DateUtil
.
parse
(
vehicleRes
.
getYxqz
(),
"yyyy-MM-dd HH:mm:ss"
).
getTime
();
if
(
checkTime
>=
System
.
currentTimeMillis
()
)
{
if
(
checkTime
>=
System
.
currentTimeMillis
()
)
{
yearCheckInfoRes
.
setStatus
(
"未到期"
);
yearCheckInfoRes
.
setStatus
(
"未到期"
);
}
else
{
}
else
{
yearCheckInfoRes
.
setStatus
(
"已到期"
);
yearCheckInfoRes
.
setStatus
(
"已到期"
);
...
@@ -231,6 +240,7 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
...
@@ -231,6 +240,7 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
result
.
setPlateNum
(
drivingLicenseRes
.
getSfzmhm
());
result
.
setPlateNum
(
drivingLicenseRes
.
getSfzmhm
());
result
.
setValidityTime
(
drivingLicenseRes
.
getYxqz
());
result
.
setValidityTime
(
drivingLicenseRes
.
getYxqz
());
result
.
setStatus
(
drivingLicenseRes
.
getZtValue
());
result
.
setStatus
(
drivingLicenseRes
.
getZtValue
());
result
.
setSurplusGrade
(
String
.
valueOf
(
12
-
Integer
.
parseInt
(
drivingLicenseRes
.
getLjjf
())));
return
ResponseGenerator
.
success
(
result
);
return
ResponseGenerator
.
success
(
result
);
}
}
...
...
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/data/mapper/BindInfoMapper.java
View file @
45329c1b
...
@@ -19,4 +19,6 @@ public interface BindInfoMapper extends BaseMapper<BindInfo> {
...
@@ -19,4 +19,6 @@ public interface BindInfoMapper extends BaseMapper<BindInfo> {
Integer
clearPast
(
DateTime
dateTime
);
Integer
clearPast
(
DateTime
dateTime
);
Integer
unbind
(
BindInfo
info
);
}
}
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/model/BindInfo.java
View file @
45329c1b
package
com
.
hikcreate
.
edl
.
pub
.
web
.
mobile
.
infra
.
model
;
package
com
.
hikcreate
.
edl
.
pub
.
web
.
mobile
.
infra
.
model
;
import
cn.hutool.core.date.DateTime
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
/**
* 绑定信息实体类
* 绑定信息实体类
...
@@ -56,5 +54,4 @@ public class BindInfo implements Serializable {
...
@@ -56,5 +54,4 @@ public class BindInfo implements Serializable {
private
String
unbindTime
;
private
String
unbindTime
;
}
}
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/model/param/response/DrivingLicenseInfoRes.java
View file @
45329c1b
...
@@ -25,5 +25,9 @@ public class DrivingLicenseInfoRes {
...
@@ -25,5 +25,9 @@ public class DrivingLicenseInfoRes {
* 姓名
* 姓名
*/
*/
private
String
driverName
;
private
String
driverName
;
/**
* 剩余计分
*/
private
String
surplusGrade
;
}
}
infra/src/main/resources/mapper/BindInfoMapper.xml
View file @
45329c1b
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.hikcreate.edl.pub.web.mobile.infra.data.mapper.BindInfoMapper"
>
<mapper
namespace=
"com.hikcreate.edl.pub.web.mobile.infra.data.mapper.BindInfoMapper"
>
<insert
id=
"bindInfoInsert"
parameterType=
"com.hikcreate.edl.pub.web.mobile.infra.model.BindInfo"
>
insert ignore into edl_public.bind_info(unq_id,user_id,phone,plate_color,plate_num,plate_type,gmt_bind_time)
values (#{unqId},#{userId},#{phone},#{plateColor},#{plateNum},#{plateType},#{gmtBindTime})
</insert>
<select
id=
"selectByQuery"
parameterType=
"com.hikcreate.edl.pub.web.mobile.infra.model.BindInfoQuery"
<select
id=
"selectByQuery"
parameterType=
"com.hikcreate.edl.pub.web.mobile.infra.model.BindInfoQuery"
resultType=
"com.hikcreate.edl.pub.web.mobile.infra.model.BindInfo"
>
resultType=
"com.hikcreate.edl.pub.web.mobile.infra.model.BindInfo"
>
select b.unq_id, b.user_id, b.phone,
select b.unq_id, b.user_id, b.phone,
...
@@ -29,6 +36,11 @@
...
@@ -29,6 +36,11 @@
</if>
</if>
</select>
</select>
<update
id=
"unbind"
>
update edl_public.bind_info as b set b.status="0",b.unbind_time=#{unbindTime} where b.unq_id=#{unqId}
</update>
<delete
id=
"clearPast"
>
<delete
id=
"clearPast"
>
delete from edl_public.bind_info as b where b.unbind_time
<![CDATA[ <= ]]>
#{dateTime} and b.status='0'
delete from edl_public.bind_info as b where b.unbind_time
<![CDATA[ <= ]]>
#{dateTime} and b.status='0'
...
...
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