diff --git a/db-file/升级SQL/1.6.3 =》1.6.4.sql b/db-file/升级SQL/1.6.3 =》1.6.4.sql new file mode 100644 index 0000000..56692fb --- /dev/null +++ b/db-file/升级SQL/1.6.3 =》1.6.4.sql @@ -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; diff --git a/opsli-modulars/opsli-modulars-generator/src/main/java/org/opsli/modulars/generator/logs/api/GenLogsApi.java b/opsli-modulars/opsli-modulars-generator/src/main/java/org/opsli/modulars/generator/logs/api/GenLogsApi.java index 3bb0202..5588dfa 100644 --- a/opsli-modulars/opsli-modulars-generator/src/main/java/org/opsli/modulars/generator/logs/api/GenLogsApi.java +++ b/opsli-modulars/opsli-modulars-generator/src/main/java/org/opsli/modulars/generator/logs/api/GenLogsApi.java @@ -20,6 +20,7 @@ import org.opsli.modulars.generator.logs.wrapper.GenLogsModel; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -51,10 +52,9 @@ public interface GenLogsApi { /** * 代码生成 修改 - * @param model 模型 */ @GetMapping("/create") - void create(GenLogsModel model, HttpServletResponse response); + void create(HttpServletRequest request, HttpServletResponse response); /** * 生成菜单 diff --git a/opsli-modulars/opsli-modulars-generator/src/main/java/org/opsli/modulars/generator/logs/web/GenLogsRestController.java b/opsli-modulars/opsli-modulars-generator/src/main/java/org/opsli/modulars/generator/logs/web/GenLogsRestController.java index 103ed33..ccceaec 100644 --- a/opsli-modulars/opsli-modulars-generator/src/main/java/org/opsli/modulars/generator/logs/web/GenLogsRestController.java +++ b/opsli-modulars/opsli-modulars-generator/src/main/java/org/opsli/modulars/generator/logs/web/GenLogsRestController.java @@ -18,6 +18,7 @@ package org.opsli.modulars.generator.logs.web; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.beanutils.BeanUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.opsli.api.base.result.ResultVo; import org.opsli.common.annotation.ApiRestController; @@ -28,7 +29,10 @@ import org.opsli.modulars.generator.logs.entity.GenLogs; import org.opsli.modulars.generator.logs.service.IGenLogsService; import org.opsli.modulars.generator.logs.wrapper.GenLogsModel; import org.opsli.plugins.generator.utils.GeneratorHandleUtil; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -57,13 +61,20 @@ public class GenLogsRestController extends BaseRestController