Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
b0852bca
Commit
b0852bca
authored
Apr 18, 2023
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决redis锁死锁问题
parent
048f37f4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
CompanyController.java
...mos/boot/module/ugp/biz/controller/CompanyController.java
+20
-0
OrgServiceImpl.java
...amos/boot/module/ugp/biz/service/impl/OrgServiceImpl.java
+0
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/CompanyController.java
View file @
b0852bca
...
...
@@ -34,6 +34,7 @@ import com.yeejoin.amos.feign.systemctl.model.RegionModel;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
...
...
@@ -106,6 +107,25 @@ public class CompanyController extends BaseController {
@Autowired
SuperviseRuleServiceImpl
superviseRuleService
;
@Autowired
private
RedisTemplate
redisTemplate
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/getRedisLock"
)
@ApiOperation
(
httpMethod
=
"get"
,
value
=
"检查redis锁情况"
,
notes
=
"检查redis锁情况"
)
public
ResponseModel
<
Boolean
>
getRedisLock
(){
Boolean
lock
=
redisTemplate
.
opsForValue
().
setIfAbsent
(
"lock"
,
"1"
);
return
ResponseHelper
.
buildResponse
(
lock
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/deleteRedisLock"
)
@ApiOperation
(
httpMethod
=
"get"
,
value
=
"删除redis锁"
,
notes
=
"删除redis锁"
)
public
ResponseModel
<
Boolean
>
deleteRedisLock
(){
Boolean
lock
=
redisTemplate
.
delete
(
"lock"
);
return
ResponseHelper
.
buildResponse
(
lock
);
}
/**
* tzs注册时同步ugp库
*
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/OrgServiceImpl.java
View file @
b0852bca
This diff is collapsed.
Click to expand it.
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