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
94192156
Commit
94192156
authored
Aug 22, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改一码通认领接口返回值
parent
80bd2f8b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
EquipmentCategoryServiceImpl.java
...le/ymt/biz/service/impl/EquipmentCategoryServiceImpl.java
+10
-10
No files found.
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/service/impl/EquipmentCategoryServiceImpl.java
View file @
94192156
...
...
@@ -1328,7 +1328,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
EquipmentCategoryServiceImpl
categoryService
=
(
EquipmentCategoryServiceImpl
)
AopContext
.
currentProxy
();
//生成码
//集群模式使用
RLock
lock
=
redissonClient
.
getLock
(
LOCK_KEY
);
//
RLock lock = redissonClient.getLock(LOCK_KEY);
// lock.lock(); // 获取锁
// log.info("加锁成功");
// codeMap = categoryService.creatCode(city, county, equCategory, code96333, supervisionCode);
...
...
@@ -1337,16 +1337,16 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
// log.info("释放锁");
// log.info("已生成对应监管码或96333电梯识别码");
//单机模式使用
boolean
flag
=
false
;
if
(
lock
.
tryLock
(
3
,
5
,
TimeUnit
.
SECONDS
))
{
//
boolean flag = false;
//
if (lock.tryLock(3, 5, TimeUnit.SECONDS)) {
codeMap
=
categoryService
.
creatCode
(
city
,
county
,
equCategory
,
code96333
,
supervisionCode
);
log
.
info
(
"已生成对应监管码或96333电梯识别码"
);
flag
=
true
;
}
if
(
flag
)
{
lock
.
unlock
();
// 释放锁
log
.
info
(
"释放锁"
);
}
//
flag = true;
//
}
//
if (flag) {
//
lock.unlock(); // 释放锁
//
log.info("释放锁");
//
}
//添加对应监管码和96333码调用通用新增保存接口进行修改
supervisionMap
.
put
(
"CODE96333"
,
codeMap
.
get
(
"code96333"
));
supervisionMap
.
put
(
"SUPERVISORY_CODE"
,
codeMap
.
get
(
"superviseCode"
));
...
...
@@ -1423,7 +1423,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
response
.
setStatus
(
HttpStatus
.
BAD_REQUEST
.
value
());
return
response
;
}
return
ResponseHelper
.
buildResponse
(
"SUCCESS"
);
return
ResponseHelper
.
buildResponse
(
record
);
}
@Autowired
...
...
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