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
655f0e5f
Commit
655f0e5f
authored
Jun 21, 2020
by
lixian7
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整接口
parent
cb0e74ce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
domain/src/main/java/com/hikcreate/edl/pub/web/mobile/domain/impl/BindServiceImpl.java
+1
-1
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/data/cache/BindCache.java
+9
-3
No files found.
domain/src/main/java/com/hikcreate/edl/pub/web/mobile/domain/impl/BindServiceImpl.java
View file @
655f0e5f
...
@@ -126,7 +126,7 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
...
@@ -126,7 +126,7 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
*/
*/
@Override
@Override
public
boolean
unbindInfo
(
UnBindReq
req
)
{
public
boolean
unbindInfo
(
UnBindReq
req
)
{
return
bindCache
.
unBind
(
req
.
getUnqId
());
return
bindCache
.
unBind
(
req
.
getUnqId
()
,
req
.
getUserId
()
);
}
}
/**
/**
...
...
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/data/cache/BindCache.java
View file @
655f0e5f
...
@@ -7,6 +7,7 @@ import com.hikcreate.edl.pub.web.mobile.infra.data.mapper.BindInfoMapper;
...
@@ -7,6 +7,7 @@ import com.hikcreate.edl.pub.web.mobile.infra.data.mapper.BindInfoMapper;
import
com.hikcreate.edl.pub.web.mobile.infra.model.BindInfo
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.BindInfo
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.cache.annotation.Caching
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -47,11 +48,16 @@ public class BindCache {
...
@@ -47,11 +48,16 @@ public class BindCache {
/**
/**
* 解绑
* 解绑
* @param unqId
* @param unqId 绑定唯一标识
* @param userId 第三方用户ID
* @return
* @return
*/
*/
@CacheEvict
(
value
=
"bindinfo"
,
key
=
"'id:'+#unqId"
,
condition
=
"#unqId!=null"
)
@Caching
(
evict
=
{
public
boolean
unBind
(
String
unqId
){
@CacheEvict
(
value
=
"bindinfo"
,
key
=
"'id:'+#unqId"
,
condition
=
"#unqId!=null"
),
@CacheEvict
(
value
=
"bindinfo"
,
key
=
"'userId:'+#userId"
,
condition
=
"#userId!=null"
)
})
public
boolean
unBind
(
String
unqId
,
String
userId
){
BindInfo
bindInfo
=
new
BindInfo
();
BindInfo
bindInfo
=
new
BindInfo
();
bindInfo
.
setUnqId
(
unqId
);
bindInfo
.
setUnqId
(
unqId
);
bindInfo
.
setStatus
(
"0"
);
bindInfo
.
setStatus
(
"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