Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-auth
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-platform-auth
Commits
b70c381a
Commit
b70c381a
authored
Sep 30, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新页面code,同时更新子集的父级code
parent
3760fa36
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
0 deletions
+41
-0
TabSysMenuMapper.java
...c/main/java/com/gic/auth/dao/mapper/TabSysMenuMapper.java
+11
-0
MenuService.java
...rvice/src/main/java/com/gic/auth/service/MenuService.java
+10
-0
MenuServiceImpl.java
.../main/java/com/gic/auth/service/impl/MenuServiceImpl.java
+5
-0
MenuApiServiceImpl.java
...a/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
+7
-0
TabSysMenuMapper.xml
...th-service/src/main/resources/mapper/TabSysMenuMapper.xml
+8
-0
No files found.
gic-platform-auth-service/src/main/java/com/gic/auth/dao/mapper/TabSysMenuMapper.java
View file @
b70c381a
...
...
@@ -156,4 +156,14 @@ public interface TabSysMenuMapper {
* @return int
*/
int
countByMenuCode
(
@Param
(
"menuCode"
)
String
menuCode
,
@Param
(
"menuId"
)
Integer
menuId
);
/**
* 批量更新子集的父级code数据,根据父级ID
* @Title: updateParentCodeByParentId
* @Description:
* @author guojuxing
* @param parentId
* @return void
*/
void
updateParentCodeByParentId
(
@Param
(
"parentId"
)
Integer
parentId
,
@Param
(
"parentCode"
)
String
parentCode
);
}
\ No newline at end of file
gic-platform-auth-service/src/main/java/com/gic/auth/service/MenuService.java
View file @
b70c381a
...
...
@@ -134,4 +134,14 @@ public interface MenuService {
* @return boolean
*/
boolean
isRepeatMenuCode
(
String
code
,
Integer
menuId
);
/**
* 批量更新子集的父级code数据,根据父级ID
* @Title: updateParentCodeByParentId
* @Description:
* @author guojuxing
* @param parentId 父级ID
* @return void
*/
void
updateParentCodeByParentId
(
Integer
parentId
,
String
parentCode
);
}
gic-platform-auth-service/src/main/java/com/gic/auth/service/impl/MenuServiceImpl.java
View file @
b70c381a
...
...
@@ -139,6 +139,11 @@ public class MenuServiceImpl implements MenuService {
return
false
;
}
@Override
public
void
updateParentCodeByParentId
(
Integer
parentId
,
String
parentCode
)
{
tabSysMenuMapper
.
updateParentCodeByParentId
(
parentId
,
parentCode
);
}
private
void
updateSort
(
Integer
sort
,
Integer
id
)
{
TabSysMenu
record
=
new
TabSysMenu
();
record
.
setMenuId
(
id
);
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
View file @
b70c381a
...
...
@@ -226,6 +226,9 @@ public class MenuApiServiceImpl implements MenuApiService {
}
menuService
.
updatePage
(
menuDTO
);
//同时更新子集的父级code数据
menuService
.
updateParentCodeByParentId
(
menuDTO
.
getMenuId
(),
menuDTO
.
getMenuCode
());
return
ServiceResponse
.
success
();
}
...
...
@@ -495,6 +498,10 @@ public class MenuApiServiceImpl implements MenuApiService {
}
setMenuVersion
(
menuDTO
);
menuService
.
updatePage
(
menuDTO
);
//同时更新子集的父级code数据
menuService
.
updateParentCodeByParentId
(
menuDTO
.
getMenuId
(),
menuDTO
.
getMenuCode
());
return
ServiceResponse
.
success
();
}
...
...
gic-platform-auth-service/src/main/resources/mapper/TabSysMenuMapper.xml
View file @
b70c381a
...
...
@@ -400,4 +400,11 @@
and menu_id
<>
#{menuId}
</if>
</select>
<update
id=
"updateParentCodeByParentId"
>
update tab_sys_menu set parent_code = #{parentCode}
where parent_id = #{parentId}
and status = 1
</update>
</mapper>
\ No newline at end of file
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