-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from hiparker/development
fix: 修复若干bug
- Loading branch information
Showing
4 changed files
with
73 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
SET NAMES utf8mb4; | ||
SET FOREIGN_KEY_CHECKS = 0; | ||
|
||
update sys_menu | ||
set parent_ids = CONCAT_WS(',', 0, id) | ||
where parent_id = 0; | ||
|
||
update sys_menu pp | ||
left join sys_menu p on p.id = pp.parent_id | ||
set | ||
pp.parent_ids = CONCAT_WS(',', p.parent_ids, pp.id) | ||
where p.parent_id = 0; | ||
|
||
update sys_menu ppp | ||
left join sys_menu pp on pp.id = ppp.parent_id | ||
left join sys_menu p on p.id = pp.parent_id | ||
set | ||
ppp.parent_ids = CONCAT_WS(',', pp.parent_ids, ppp.id) | ||
where p.parent_id = 0; | ||
|
||
|
||
update sys_menu pppp | ||
left join sys_menu ppp on ppp.id = pppp.parent_id | ||
left join sys_menu pp on pp.id = ppp.parent_id | ||
left join sys_menu p on p.id = pp.parent_id | ||
set | ||
pppp.parent_ids = CONCAT_WS(',', ppp.parent_ids, pppp.id) | ||
where p.parent_id = 0; | ||
|
||
|
||
|
||
update sys_menu ppppp | ||
left join sys_menu pppp on pppp.id = ppppp.parent_id | ||
left join sys_menu ppp on ppp.id = pppp.parent_id | ||
left join sys_menu pp on pp.id = ppp.parent_id | ||
left join sys_menu p on p.id = pp.parent_id | ||
set | ||
ppppp.parent_ids = CONCAT_WS(',', pppp.parent_ids, ppppp.id) | ||
where p.parent_id = 0; | ||
|
||
|
||
SET FOREIGN_KEY_CHECKS = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters