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
6cbbfded
Commit
6cbbfded
authored
Jun 22, 2020
by
xieshixiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改BUG
parent
edd4abfb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/data/cache/ViolationCache.java
+3
-3
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/data/mapper/BindInfoMapper.java
+2
-1
infra/src/main/resources/mapper/BindInfoMapper.xml
+2
-2
No files found.
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/data/cache/ViolationCache.java
View file @
6cbbfded
package
com
.
hikcreate
.
edl
.
pub
.
web
.
mobile
.
infra
.
data
.
cache
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.ViolationFeign
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.param.request.ViolationIdCardQueryReq
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.param.request.ViolationPlateNumAndTypeQueryReq
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.param.response.ViolationRes
;
import
org.springframework.cache.annotation.Cacheable
;
...
...
@@ -26,8 +25,9 @@ public class ViolationCache {
* @param req 号牌+号牌类型,时间开始-结束
* @return
*/
@Cacheable
(
value
=
"violations"
,
key
=
"'plateNum:'+#req.plateNum+':plateType:'+req.plateType+':timeStart:'+#req.timeStart+':timeEnd:'+#req.timeEnd"
,
unless
=
"#result==null or #result.size()==0"
)
public
List
<
ViolationRes
>
getByPlateNumAndType
(
ViolationPlateNumAndTypeQueryReq
req
)
{
@Cacheable
(
value
=
"violations"
,
key
=
"'plateNum:'+#req.plateNum+':plateType:'+req.plateType+':timeStart:'+#req"
+
".timeStart.toString()+':timeEnd:'+#req.timeEnd.toString()"
,
unless
=
"#result==null or #result.size()==0"
)
public
List
<
ViolationRes
>
getByPlateNumAndType
(
ViolationPlateNumAndTypeQueryReq
req
)
{
return
violatio
.
getByPlateNumAndType
(
req
);
}
}
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/data/mapper/BindInfoMapper.java
View file @
6cbbfded
...
...
@@ -6,6 +6,7 @@ import com.hikcreate.edl.pub.web.mobile.infra.core.page.PageResult;
import
com.hikcreate.edl.pub.web.mobile.infra.model.BindInfo
;
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
org.apache.ibatis.annotations.Param
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -22,7 +23,7 @@ public interface BindInfoMapper extends BaseMapper<BindInfo> {
Integer
bindInfoInsert
(
BindInfo
info
);
Integer
clearPast
(
Date
dateTime
);
Integer
clearPast
(
@Param
(
"dateTime"
)
Date
dateTime
);
Integer
unbind
(
BindInfo
info
);
...
...
infra/src/main/resources/mapper/BindInfoMapper.xml
View file @
6cbbfded
...
...
@@ -41,8 +41,8 @@
</update>
<delete
id=
"clearPast"
>
delete from edl_public.bind_info as b where b.unbind_time
<![CDATA[
<=
]]>
#{dateTime} and b.status='0'
<delete
id=
"clearPast"
parameterType=
"java.util.Date"
>
delete from edl_public.bind_info as b where b.unbind_time
<![CDATA[
<=
]]>
#{dateTime} and b.status='0'
</delete>
</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