Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 60a1c901
authored
Mar 28, 2022
by
levphon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
指定授权-允许提交空数据以清空用户授权数据
1 parent
781d3818
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
src/main/java/cn/com/glsx/admin/modules/mapper/VehiclePermitMapper.java
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
src/main/resources/mapper/VehiclePermitMapper.xml
src/main/java/cn/com/glsx/admin/modules/mapper/VehiclePermitMapper.java
View file @
60a1c90
...
@@ -44,4 +44,13 @@ public interface VehiclePermitMapper extends CommonBaseMapper<VehiclePermit> {
...
@@ -44,4 +44,13 @@ public interface VehiclePermitMapper extends CommonBaseMapper<VehiclePermit> {
*/
*/
int
deleteExistedPermit
(
@Param
(
"contentIds"
)
Collection
<
Long
>
contentIds
,
@Param
(
"receiverId"
)
Long
receiverId
,
@Param
(
"contentType"
)
Integer
contentType
);
int
deleteExistedPermit
(
@Param
(
"contentIds"
)
Collection
<
Long
>
contentIds
,
@Param
(
"receiverId"
)
Long
receiverId
,
@Param
(
"contentType"
)
Integer
contentType
);
/**
* 删除被授权人授权数据
*
* @param receiverId
* @param contentType
* @return
*/
int
deletePermitByReceiverId
(
@Param
(
"receiverId"
)
Long
receiverId
,
@Param
(
"contentType"
)
Integer
contentType
);
}
}
\ No newline at end of file
\ No newline at end of file
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
View file @
60a1c90
...
@@ -2034,6 +2034,7 @@ public class VehicleService {
...
@@ -2034,6 +2034,7 @@ public class VehicleService {
* @param assignBO
* @param assignBO
*/
*/
public
int
assignVehicle
(
VehiclePermitAssignBO
assignBO
)
{
public
int
assignVehicle
(
VehiclePermitAssignBO
assignBO
)
{
if
(
CollectionUtils
.
isNotEmpty
(
assignBO
.
getVehicleIds
()))
{
List
<
VehiclePermit
>
list
=
Lists
.
newArrayList
();
List
<
VehiclePermit
>
list
=
Lists
.
newArrayList
();
//被授权人的下级用户id(含自己)
//被授权人的下级用户id(含自己)
...
@@ -2096,6 +2097,11 @@ public class VehicleService {
...
@@ -2096,6 +2097,11 @@ public class VehicleService {
log
.
info
(
"{}剔除用户[{}] 车辆数据 {}"
,
ShieldContextHolder
.
getUsername
(),
assignBO
.
getReceiverId
(),
delIdList
);
log
.
info
(
"{}剔除用户[{}] 车辆数据 {}"
,
ShieldContextHolder
.
getUsername
(),
assignBO
.
getReceiverId
(),
delIdList
);
}
}
return
0
;
return
0
;
}
else
{
int
delCnt
=
vehiclePermitMapper
.
deletePermitByReceiverId
(
assignBO
.
getReceiverId
(),
0
);
log
.
info
(
"{}删除用户[{}] 车辆授权数据{}条"
,
ShieldContextHolder
.
getUsername
(),
assignBO
.
getReceiverId
(),
delCnt
);
return
delCnt
;
}
}
}
public
List
<
VehiclePermitDTO
>
getAssignVehicle
(
Long
receiverId
)
{
public
List
<
VehiclePermitDTO
>
getAssignVehicle
(
Long
receiverId
)
{
...
...
src/main/resources/mapper/VehiclePermitMapper.xml
View file @
60a1c90
...
@@ -85,4 +85,13 @@
...
@@ -85,4 +85,13 @@
#{item}
#{item}
</foreach>
</foreach>
</update>
</update>
<update
id=
"deletePermitByReceiverId"
>
update t_vehicle_permit
set del_flag = -1,
updated_date = sysdate()
where del_flag = 0
and content_type = #{contentType}
and receiver_id = #{receiverId}
</update>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment