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
d3d40e9f
Commit
d3d40e9f
authored
Sep 06, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
//BUG 2761 判断人员删除时的逻辑 如果被选为队伍联系人则无法被删除 bykongfm
parent
10f6331c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
FirefightersController.java
...oot/module/jcs/biz/controller/FirefightersController.java
+10
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FirefightersController.java
View file @
d3d40e9f
...
...
@@ -6,6 +6,8 @@ import java.util.Map;
import
javax.servlet.http.HttpServletRequest
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireTeam
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.FireTeamServiceImpl
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
...
...
@@ -81,6 +83,8 @@ public class FirefightersController extends BaseController {
@Autowired
FirefightersJacketServiceImpl
iFirefightersJacketService
;
@Autowired
FireTeamServiceImpl
iFireTeamService
;
@Autowired
RedisUtils
redisUtils
;
@Value
(
"${redis.cache.failure.time}"
)
private
long
time
;
...
...
@@ -116,6 +120,11 @@ public class FirefightersController extends BaseController {
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除"
,
notes
=
"根据id删除"
)
@Transactional
public
ResponseModel
<
Object
>
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
//BUG 2761 判断人员删除时的逻辑 如果被选为队伍联系人则无法被删除 bykongfm
List
fireTeam
=
iFireTeamService
.
list
(
new
LambdaQueryWrapper
<
FireTeam
>().
eq
(
FireTeam:
:
getIsDelete
,
false
).
eq
(
FireTeam:
:
getContactUserId
,
id
));
if
(
fireTeam
.
size
()
>
0
)
{
return
ResponseHelper
.
buildResponse
(
"-1"
);
}
QueryWrapper
<
FirefightersJacket
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"firefighters_id"
,
id
);
queryWrapper
.
eq
(
"is_delete"
,
0
);
...
...
@@ -139,7 +148,7 @@ public class FirefightersController extends BaseController {
.
update
(
new
UpdateWrapper
<
FirefightersJacket
>().
eq
(
"firefighters_id"
,
id
).
set
(
"is_delete"
,
1
));
// 删除缓存
redisUtils
.
del
(
RedisKey
.
FIREFIGHTERS_ID
+
id
,
RedisKey
.
FIREFIGHTERS_LIST_ID
+
id
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
"0"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
"删除失败!"
);
...
...
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