From 9386bfc5c16a6fa73fb69d63f26dc12b9ed8c4ac Mon Sep 17 00:00:00 2001 From: lijiahang Date: Mon, 3 Jun 2024 13:12:50 +0800 Subject: [PATCH] =?UTF-8?q?:pencil:=20=E5=8D=87=E7=BA=A7=E6=96=87=E6=A1=A3?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + .../core/generator/core/CustomFileFilter.java | 4 -- .../generator/template/ServerTemplate.java | 10 ----- .../core/generator/template/Table.java | 5 --- .../orion-server-module-controller.http.vm | 14 ------- .../orion-server-module-controller.java.vm | 13 ------ .../orion-server-module-convert.java.vm | 4 -- ...-server-module-operator-key-define.java.vm | 7 ---- .../orion-server-module-service-impl.java.vm | 41 ++++--------------- .../orion-server-module-service.java.vm | 11 ----- .../resources/templates/orion-sql-dict.sql.vm | 5 --- .../resources/templates/orion-vue-api.ts.vm | 8 ---- .../module/infra/api/CommandSnippetApi.java | 22 ++++++++++ .../module/infra/api/PathBookmarkApi.java | 22 ++++++++++ .../asset/api/impl/CommandSnippetApiImpl.java | 30 ++++++++++++++ .../asset/api/impl/PathBookmarkApiImpl.java | 30 ++++++++++++++ .../module/asset/dao/CommandSnippetDAO.java | 14 +++++++ .../module/asset/dao/PathBookmarkDAO.java | 14 +++++++ .../asset/service/CommandSnippetService.java | 24 +++++++---- .../asset/service/PathBookmarkService.java | 24 +++++++---- .../impl/CommandSnippetServiceImpl.java | 35 ++++++++-------- .../service/impl/PathBookmarkServiceImpl.java | 19 +++++---- .../service/impl/SystemUserServiceImpl.java | 13 +++++- sql/init-4-data.sql | 17 ++++---- 24 files changed, 223 insertions(+), 164 deletions(-) create mode 100644 orion-visor-module-asset/orion-visor-module-asset-provider/src/main/java/com/orion/visor/module/infra/api/CommandSnippetApi.java create mode 100644 orion-visor-module-asset/orion-visor-module-asset-provider/src/main/java/com/orion/visor/module/infra/api/PathBookmarkApi.java create mode 100644 orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/api/impl/CommandSnippetApiImpl.java create mode 100644 orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/api/impl/PathBookmarkApiImpl.java diff --git a/README.md b/README.md index 11d7e122..9a50c424 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ git clone https://github.com/lijiahangmax/orion-visor cd orion-visor # 启动 docker compose up -d +# 等待后端服务启动后 (2min±) 访问 http://localhost:1081/ ``` ## 项目文档 diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/CustomFileFilter.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/CustomFileFilter.java index 3ce3b9c6..78e65056 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/CustomFileFilter.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/CustomFileFilter.java @@ -62,10 +62,6 @@ public class CustomFileFilter { if (!table.isEnableCache()) { files.removeIf(file -> isServerCacheFile(file.getTemplatePath())); } - // 不生成导出文件 - if (!table.isEnableExport()) { - files.removeIf(file -> isExportFile(file.getTemplatePath())); - } // 不生成操作日志文件 if (!table.isEnableOperatorLog()) { files.removeIf(file -> isOperatorLogFile(file.getTemplatePath())); diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/ServerTemplate.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/ServerTemplate.java index c1b74336..3d664ced 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/ServerTemplate.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/ServerTemplate.java @@ -73,16 +73,6 @@ public class ServerTemplate extends Template { return this; } - // /** - // * 生成导出 - // * - // * @return this - // */ - // public ServerTemplate enableExport() { - // table.enableExport = true; - // return this; - // } - /** * 不生成单元测试 * diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/Table.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/Table.java index 1d659c7b..7538a5ce 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/Table.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/Table.java @@ -43,11 +43,6 @@ public class Table { */ protected boolean enableUnitTest; - /** - * 是否生成导出 - */ - protected boolean enableExport; - /** * 是否可缓存 */ diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-controller.http.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-controller.http.vm index 64401343..11dfd87b 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-controller.http.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-controller.http.vm @@ -68,19 +68,5 @@ Authorization: {{token}} ${httpComment} ${apiComment.batchDelete} DELETE {{baseUrl}}/${package.ModuleName}/${typeHyphen}/batch-delete?idList=1,2,3 Authorization: {{token}} -#if($meta.enableExport) - - -${httpComment} ${apiComment.export} -POST {{baseUrl}}/${package.ModuleName}/${typeHyphen}/export -Content-Type: application/json -Authorization: {{token}} - -{ - #foreach($field in ${table.fields}) - "${field.propertyName}": ""#if($foreach.hasNext),#end - #end -} -#end ${httpComment} diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-controller.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-controller.java.vm index e24ac874..3f8e6958 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-controller.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-controller.java.vm @@ -141,19 +141,6 @@ public class ${table.controllerName} { public Integer batchDelete${type}(@RequestParam("idList") List idList) { return ${typeLower}Service.delete${type}ByIdList(idList); } - #if($meta.enableExport) - - #if($meta.enableOperatorLog) - @OperatorLog(${type}OperatorType.EXPORT) - #end - @PostMapping("/export") - @Operation(summary = "${apiComment.export}") - @PreAuthorize("@ss.hasPermission('${package.ModuleName}:${typeHyphen}:export')") - public void export${type}(@Validated @RequestBody ${type}QueryRequest request, - HttpServletResponse response) throws IOException { - ${typeLower}Service.export${type}(request, response); - } - #end } diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-convert.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-convert.java.vm index f4fb8c3a..e08ef6ab 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-convert.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-convert.java.vm @@ -28,10 +28,6 @@ public interface ${type}Convert { ${type}DO to(${type}QueryRequest request); ${type}VO to(${type}DO domain); - #if($meta.enableExport) - - ${type}Export toExport(${type}DO domain); - #end List<${type}VO> to(List<${type}DO> list); diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-operator-key-define.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-operator-key-define.java.vm index be7d053a..0283219b 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-operator-key-define.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-operator-key-define.java.vm @@ -21,10 +21,6 @@ public class ${type}OperatorType extends InitializingOperatorTypes { public static final String UPDATE = "${typeHyphen}:update"; public static final String DELETE = "${typeHyphen}:delete"; - #if($meta.enableExport) - - public static final String EXPORT = "${typeHyphen}:export"; - #end @Override public OperatorType[] types() { @@ -32,9 +28,6 @@ public class ${type}OperatorType extends InitializingOperatorTypes { new OperatorType(L, CREATE, "创建$!{table.comment}"), new OperatorType(M, UPDATE, "更新$!{table.comment}"), new OperatorType(H, DELETE, "删除$!{table.comment}"), - #if($meta.enableExport) - new OperatorType(M, EXPORT, "导出$!{table.comment}"), - #end }; } diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-service-impl.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-service-impl.java.vm index ba458048..bf096cb0 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-service-impl.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-service-impl.java.vm @@ -5,13 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.orion.lang.define.wrapper.DataGrid; import com.orion.lang.utils.Strings; import com.orion.lang.utils.collect.Lists; -#if($meta.enableExport) -import com.orion.office.excel.writer.exporting.ExcelExport; -#end import com.orion.visor.framework.common.constant.ErrorMessage; -#if($meta.enableExport) -import com.orion.visor.framework.common.utils.FileNames; -#end import com.orion.visor.framework.common.utils.Valid; #if($meta.enableCache) import com.orion.visor.framework.redis.core.utils.RedisMaps; @@ -23,18 +17,11 @@ import ${pkg}.*; import ${package.Entity}.${entity}; import ${package.Mapper}.${table.mapperName}; import ${package.Service}.${table.serviceName}; -#if($meta.enableExport) -import com.orion.web.servlet.web.Servlets; -#end import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; -#if($meta.enableExport) -import javax.servlet.http.HttpServletResponse; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -#end import java.util.Comparator; import java.util.List; import java.util.stream.Collectors; @@ -54,6 +41,7 @@ public class ${table.serviceImplName} implements ${table.serviceName} { private ${type}DAO ${typeLower}DAO; @Override + @Transactional(rollbackFor = Exception.class) public Long create${type}(${type}CreateRequest request) { log.info("${type}Service-create${type} request: {}", JSON.toJSONString(request)); // 转换 @@ -72,6 +60,7 @@ public class ${table.serviceImplName} implements ${table.serviceName} { } @Override + @Transactional(rollbackFor = Exception.class) public Integer update${type}ById(${type}UpdateRequest request) { Long id = Valid.notNull(request.getId(), ErrorMessage.ID_MISSING); log.info("${type}Service-update${type}ById id: {}, request: {}", id, JSON.toJSONString(request)); @@ -93,6 +82,7 @@ public class ${table.serviceImplName} implements ${table.serviceName} { } @Override + @Transactional(rollbackFor = Exception.class) public Integer update${type}(${type}QueryRequest query, ${type}UpdateRequest update) { log.info("${type}Service.update${type} query: {}, update: {}", JSON.toJSONString(query), JSON.toJSONString(update)); // 条件 @@ -179,6 +169,7 @@ public class ${table.serviceImplName} implements ${table.serviceName} { } @Override + @Transactional(rollbackFor = Exception.class) public Integer delete${type}ById(Long id) { log.info("${type}Service-delete${type}ById id: {}", id); // 检查数据是否存在 @@ -195,6 +186,7 @@ public class ${table.serviceImplName} implements ${table.serviceName} { } @Override + @Transactional(rollbackFor = Exception.class) public Integer delete${type}ByIdList(List idList) { log.info("${type}Service-delete${type}ByIdList idList: {}", idList); int effect = ${typeLower}DAO.deleteBatchIds(idList); @@ -207,6 +199,7 @@ public class ${table.serviceImplName} implements ${table.serviceName} { } @Override + @Transactional(rollbackFor = Exception.class) public Integer delete${type}(${type}QueryRequest request) { log.info("${type}Service.delete${type} request: {}", JSON.toJSONString(request)); // 条件 @@ -220,26 +213,6 @@ public class ${table.serviceImplName} implements ${table.serviceName} { #end return effect; } - #if($meta.enableExport) - - @Override - public void export${type}(${type}QueryRequest request, HttpServletResponse response) throws IOException { - log.info("${type}Service.export${type} request: {}", JSON.toJSONString(request)); - // 条件 - LambdaQueryWrapper<${type}DO> wrapper = this.buildQueryWrapper(request); - // 查询 - List<${type}Export> rows = ${typeLower}DAO.of(wrapper).list(${type}Convert.MAPPER::toExport); - log.info("${type}Service.export${type} size: {}", rows.size()); - // 导出 - ByteArrayOutputStream out = new ByteArrayOutputStream(); - ExcelExport.create(${type}Export.class) - .addRows(rows) - .write(out) - .close(); - // 传输 - Servlets.transfer(response, out.toByteArray(), FileNames.exportName(${type}Export.TITLE)); - } - #end /** * 检查对象是否存在 diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-service.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-service.java.vm index 09325bf2..d5293f74 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-service.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-service.java.vm @@ -115,16 +115,5 @@ public interface ${table.serviceName} { * @return effect */ Integer delete${type}(${type}QueryRequest request); - #if($meta.enableExport) - - /** - * ${apiComment.export} - * - * @param request request - * @param response response - * @throws IOException IOException - */ - void export${type}(${type}QueryRequest request, HttpServletResponse response) throws IOException; - #end } diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-sql-dict.sql.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-sql-dict.sql.vm index d9c5ae93..a6779d46 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-sql-dict.sql.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-sql-dict.sql.vm @@ -14,12 +14,7 @@ VALUES (@MODULE_KEY_ID, 'operatorLogModule', '${package.ModuleName}:${typeHyphen}', '$!{table.comment}', '{}', @MODULE_KEY_MAX_SORT + 10, now(), now(), '1', '1', 0), (@TYPE_KEY_ID, 'operatorLogType', '${typeHyphen}:create', '创建$!{table.comment}', '{}', 10, now(), now(), '1', '1', 0), (@TYPE_KEY_ID, 'operatorLogType', '${typeHyphen}:update', '更新$!{table.comment}', '{}', 20, now(), now(), '1', '1', 0), - #if($meta.enableExport) - (@TYPE_KEY_ID, 'operatorLogType', '${typeHyphen}:delete', '删除$!{table.comment}', '{}', 30, now(), now(), '1', '1', 0), - (@TYPE_KEY_ID, 'operatorLogType', '${typeHyphen}:export', '导出$!{table.comment}', '{}', 40, now(), now(), '1', '1', 0); - #else (@TYPE_KEY_ID, 'operatorLogType', '${typeHyphen}:delete', '删除$!{table.comment}', '{}', 30, now(), now(), '1', '1', 0); - #end #end #if($dictMap.entrySet().size() > 0) diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-api.ts.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-api.ts.vm index e3b199a4..5d815a25 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-api.ts.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-api.ts.vm @@ -133,12 +133,4 @@ export function batchDelete${vue.featureEntity}(idList: Array) { } }); } -#if($meta.enableExport) -/** - * $apiComment.export - */ -export function export${vue.featureEntity}(request: ${vue.featureEntity}QueryRequest) { - return axios.post('/${package.ModuleName}/${typeHyphen}/export', request); -} -#end diff --git a/orion-visor-module-asset/orion-visor-module-asset-provider/src/main/java/com/orion/visor/module/infra/api/CommandSnippetApi.java b/orion-visor-module-asset/orion-visor-module-asset-provider/src/main/java/com/orion/visor/module/infra/api/CommandSnippetApi.java new file mode 100644 index 00000000..584e62b1 --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-provider/src/main/java/com/orion/visor/module/infra/api/CommandSnippetApi.java @@ -0,0 +1,22 @@ +package com.orion.visor.module.infra.api; + +import java.util.List; + +/** + * 命令片段 对外服务类 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2024/6/3 11:07 + */ +public interface CommandSnippetApi { + + /** + * 通过 userId 删除 + * + * @param userIdList userIdList + * @return effect + */ + Integer deleteByUserIdList(List userIdList); + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-provider/src/main/java/com/orion/visor/module/infra/api/PathBookmarkApi.java b/orion-visor-module-asset/orion-visor-module-asset-provider/src/main/java/com/orion/visor/module/infra/api/PathBookmarkApi.java new file mode 100644 index 00000000..f0649f7f --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-provider/src/main/java/com/orion/visor/module/infra/api/PathBookmarkApi.java @@ -0,0 +1,22 @@ +package com.orion.visor.module.infra.api; + +import java.util.List; + +/** + * 路径标签 对外服务类 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2024/6/3 11:07 + */ +public interface PathBookmarkApi { + + /** + * 通过 userId 删除 + * + * @param userIdList userIdList + * @return effect + */ + Integer deleteByUserIdList(List userIdList); + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/api/impl/CommandSnippetApiImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/api/impl/CommandSnippetApiImpl.java new file mode 100644 index 00000000..316c9a0e --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/api/impl/CommandSnippetApiImpl.java @@ -0,0 +1,30 @@ +package com.orion.visor.module.asset.api.impl; + +import com.orion.visor.module.asset.service.CommandSnippetService; +import com.orion.visor.module.infra.api.CommandSnippetApi; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 命令片段 对外服务实现类 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2024/6/3 11:11 + */ +@Slf4j +@Service +public class CommandSnippetApiImpl implements CommandSnippetApi { + + @Resource + private CommandSnippetService commandSnippetService; + + @Override + public Integer deleteByUserIdList(List userIdList) { + return commandSnippetService.deleteByUserIdList(userIdList); + } + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/api/impl/PathBookmarkApiImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/api/impl/PathBookmarkApiImpl.java new file mode 100644 index 00000000..d11a2b33 --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/api/impl/PathBookmarkApiImpl.java @@ -0,0 +1,30 @@ +package com.orion.visor.module.asset.api.impl; + +import com.orion.visor.module.asset.service.PathBookmarkService; +import com.orion.visor.module.infra.api.PathBookmarkApi; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 路径标签 对外服务实现类 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2024/6/3 11:11 + */ +@Slf4j +@Service +public class PathBookmarkApiImpl implements PathBookmarkApi { + + @Resource + private PathBookmarkService pathBookmarkService; + + @Override + public Integer deleteByUserIdList(List userIdList) { + return pathBookmarkService.deleteByUserIdList(userIdList); + } + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/CommandSnippetDAO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/CommandSnippetDAO.java index 1ad015da..66b22123 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/CommandSnippetDAO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/CommandSnippetDAO.java @@ -7,6 +7,8 @@ import com.orion.visor.framework.mybatis.core.mapper.IMapper; import com.orion.visor.module.asset.entity.domain.CommandSnippetDO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 命令片段 Mapper 接口 * @@ -42,4 +44,16 @@ public interface CommandSnippetDAO extends IMapper { return this.delete(wrapper); } + /** + * 通过 userId 删除 + * + * @param userIdList userIdList + * @return effect + */ + default int deleteByUserIdList(List userIdList) { + LambdaQueryWrapper wrapper = this.lambda() + .in(CommandSnippetDO::getUserId, userIdList); + return this.delete(wrapper); + } + } diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/PathBookmarkDAO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/PathBookmarkDAO.java index 17eeb699..870b3176 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/PathBookmarkDAO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/PathBookmarkDAO.java @@ -7,6 +7,8 @@ import com.orion.visor.framework.mybatis.core.mapper.IMapper; import com.orion.visor.module.asset.entity.domain.PathBookmarkDO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 路径标签 Mapper 接口 * @@ -42,4 +44,16 @@ public interface PathBookmarkDAO extends IMapper { return this.delete(wrapper); } + /** + * 通过 userId 删除 + * + * @param userIdList userIdList + * @return effect + */ + default int deleteByUserIdList(List userIdList) { + LambdaQueryWrapper wrapper = this.lambda() + .in(PathBookmarkDO::getUserId, userIdList); + return this.delete(wrapper); + } + } diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/CommandSnippetService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/CommandSnippetService.java index b445b57c..1caaead8 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/CommandSnippetService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/CommandSnippetService.java @@ -46,14 +46,6 @@ public interface CommandSnippetService { */ List getCommandSnippetList(); - /** - * 删除命令片段 - * - * @param id id - * @return effect - */ - Integer deleteCommandSnippetById(Long id); - /** * 设置分组为 null * @@ -63,6 +55,14 @@ public interface CommandSnippetService { */ Integer setGroupNull(Long userId, Long groupId); + /** + * 删除命令片段 + * + * @param id id + * @return effect + */ + Integer deleteCommandSnippetById(Long id); + /** * 通过 groupId 删除 * @@ -72,4 +72,12 @@ public interface CommandSnippetService { */ Integer deleteByGroupId(Long userId, Long groupId); + /** + * 通过 userId 删除 + * + * @param userIdList userIdList + * @return effect + */ + Integer deleteByUserIdList(List userIdList); + } diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/PathBookmarkService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/PathBookmarkService.java index 4f6e4689..07904847 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/PathBookmarkService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/PathBookmarkService.java @@ -46,14 +46,6 @@ public interface PathBookmarkService { */ List getPathBookmarkList(); - /** - * 删除路径标签 - * - * @param id id - * @return effect - */ - Integer deletePathBookmarkById(Long id); - /** * 设置分组为 null * @@ -63,6 +55,14 @@ public interface PathBookmarkService { */ Integer setGroupNull(Long userId, Long groupId); + /** + * 删除路径标签 + * + * @param id id + * @return effect + */ + Integer deletePathBookmarkById(Long id); + /** * 通过 groupId 删除 * @@ -72,4 +72,12 @@ public interface PathBookmarkService { */ Integer deleteByGroupId(Long userId, Long groupId); + /** + * 通过 userId 删除 + * + * @param userIdList userIdList + * @return effect + */ + Integer deleteByUserIdList(List userIdList); + } diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/CommandSnippetServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/CommandSnippetServiceImpl.java index da2a3070..cda262ca 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/CommandSnippetServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/CommandSnippetServiceImpl.java @@ -23,7 +23,6 @@ import com.orion.visor.module.asset.service.CommandSnippetGroupService; import com.orion.visor.module.asset.service.CommandSnippetService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.Comparator; @@ -52,7 +51,7 @@ public class CommandSnippetServiceImpl implements CommandSnippetService { @Override public Long createCommandSnippet(CommandSnippetCreateRequest request) { Long userId = SecurityUtils.getLoginUserId(); - log.info("CommandSnippetService-createCommandSnippet request: {}", JSON.toJSONString(request)); + log.info("CommandSnippetService-createCommandSnippet request: {}" , JSON.toJSONString(request)); // 转换 CommandSnippetDO record = CommandSnippetConvert.MAPPER.to(request); record.setUserId(userId); @@ -61,7 +60,7 @@ public class CommandSnippetServiceImpl implements CommandSnippetService { // 插入 int effect = commandSnippetDAO.insert(record); Long id = record.getId(); - log.info("CommandSnippetService-createCommandSnippet id: {}, effect: {}", id, effect); + log.info("CommandSnippetService-createCommandSnippet id: {}, effect: {}" , id, effect); // 删除缓存 RedisMaps.delete(CommandSnippetCacheKeyDefine.SNIPPET.format(userId)); return id; @@ -71,7 +70,7 @@ public class CommandSnippetServiceImpl implements CommandSnippetService { public Integer updateCommandSnippetById(CommandSnippetUpdateRequest request) { Long id = Valid.notNull(request.getId(), ErrorMessage.ID_MISSING); Long userId = SecurityUtils.getLoginUserId(); - log.info("CommandSnippetService-updateCommandSnippetById id: {}, request: {}", id, JSON.toJSONString(request)); + log.info("CommandSnippetService-updateCommandSnippetById id: {}, request: {}" , id, JSON.toJSONString(request)); // 查询 CommandSnippetDO record = commandSnippetDAO.selectById(id); Valid.notNull(record, ErrorMessage.DATA_ABSENT); @@ -86,7 +85,7 @@ public class CommandSnippetServiceImpl implements CommandSnippetService { .eq(CommandSnippetDO::getId, id) .eq(CommandSnippetDO::getUserId, userId); int effect = commandSnippetDAO.update(null, update); - log.info("CommandSnippetService-updateCommandSnippetById effect: {}", effect); + log.info("CommandSnippetService-updateCommandSnippetById effect: {}" , effect); // 删除缓存 RedisMaps.delete(CommandSnippetCacheKeyDefine.SNIPPET.format(userId)); return effect; @@ -145,29 +144,28 @@ public class CommandSnippetServiceImpl implements CommandSnippetService { } @Override - @Transactional(rollbackFor = Exception.class) + public Integer setGroupNull(Long userId, Long groupId) { + int effect = commandSnippetDAO.setGroupIdWithNull(groupId); + // 删除缓存 + RedisMaps.delete(CommandSnippetCacheKeyDefine.SNIPPET.format(userId)); + return effect; + } + + @Override public Integer deleteCommandSnippetById(Long id) { Long userId = SecurityUtils.getLoginUserId(); - log.info("CommandSnippetService-deleteCommandSnippetById id: {}", id); + log.info("CommandSnippetService-deleteCommandSnippetById id: {}" , id); // 检查数据是否存在 CommandSnippetDO record = commandSnippetDAO.selectById(id); Valid.notNull(record, ErrorMessage.DATA_ABSENT); // 删除 int effect = commandSnippetDAO.deleteById(id); - log.info("CommandSnippetService-deleteCommandSnippetById id: {}, effect: {}", id, effect); + log.info("CommandSnippetService-deleteCommandSnippetById id: {}, effect: {}" , id, effect); // 删除缓存 RedisMaps.delete(CommandSnippetCacheKeyDefine.SNIPPET.format(userId), id); return effect; } - @Override - public Integer setGroupNull(Long userId, Long groupId) { - int effect = commandSnippetDAO.setGroupIdWithNull(groupId); - // 删除缓存 - RedisMaps.delete(CommandSnippetCacheKeyDefine.SNIPPET.format(userId)); - return effect; - } - @Override public Integer deleteByGroupId(Long userId, Long groupId) { int effect = commandSnippetDAO.deleteByGroupId(groupId); @@ -176,6 +174,11 @@ public class CommandSnippetServiceImpl implements CommandSnippetService { return effect; } + @Override + public Integer deleteByUserIdList(List userIdList) { + return commandSnippetDAO.deleteByUserIdList(userIdList); + } + /** * 检查对象是否存在 * diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/PathBookmarkServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/PathBookmarkServiceImpl.java index 407810ce..e507fc4c 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/PathBookmarkServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/PathBookmarkServiceImpl.java @@ -143,6 +143,14 @@ public class PathBookmarkServiceImpl implements PathBookmarkService { .collect(Collectors.toList()); } + @Override + public Integer setGroupNull(Long userId, Long groupId) { + int effect = pathBookmarkDAO.setGroupIdWithNull(groupId); + // 删除缓存 + RedisMaps.delete(PathBookmarkCacheKeyDefine.PATH_BOOKMARK.format(userId)); + return effect; + } + @Override public Integer deletePathBookmarkById(Long id) { Long userId = SecurityUtils.getLoginUserId(); @@ -159,19 +167,16 @@ public class PathBookmarkServiceImpl implements PathBookmarkService { } @Override - public Integer setGroupNull(Long userId, Long groupId) { - int effect = pathBookmarkDAO.setGroupIdWithNull(groupId); + public Integer deleteByGroupId(Long userId, Long groupId) { + int effect = pathBookmarkDAO.deleteByGroupId(groupId); // 删除缓存 RedisMaps.delete(PathBookmarkCacheKeyDefine.PATH_BOOKMARK.format(userId)); return effect; } @Override - public Integer deleteByGroupId(Long userId, Long groupId) { - int effect = pathBookmarkDAO.deleteByGroupId(groupId); - // 删除缓存 - RedisMaps.delete(PathBookmarkCacheKeyDefine.PATH_BOOKMARK.format(userId)); - return effect; + public Integer deleteByUserIdList(List userIdList) { + return pathBookmarkDAO.deleteByUserIdList(userIdList); } /** diff --git a/orion-visor-module-infra/orion-visor-module-infra-service/src/main/java/com/orion/visor/module/infra/service/impl/SystemUserServiceImpl.java b/orion-visor-module-infra/orion-visor-module-infra-service/src/main/java/com/orion/visor/module/infra/service/impl/SystemUserServiceImpl.java index 1f20cd6a..c4e952f6 100644 --- a/orion-visor-module-infra/orion-visor-module-infra-service/src/main/java/com/orion/visor/module/infra/service/impl/SystemUserServiceImpl.java +++ b/orion-visor-module-infra/orion-visor-module-infra-service/src/main/java/com/orion/visor/module/infra/service/impl/SystemUserServiceImpl.java @@ -17,6 +17,8 @@ import com.orion.visor.framework.redis.core.utils.RedisStrings; import com.orion.visor.framework.redis.core.utils.RedisUtils; import com.orion.visor.framework.redis.core.utils.barrier.CacheBarriers; import com.orion.visor.framework.security.core.utils.SecurityUtils; +import com.orion.visor.module.infra.api.CommandSnippetApi; +import com.orion.visor.module.infra.api.PathBookmarkApi; import com.orion.visor.module.infra.convert.SystemRoleConvert; import com.orion.visor.module.infra.convert.SystemUserConvert; import com.orion.visor.module.infra.dao.OperatorLogDAO; @@ -86,6 +88,12 @@ public class SystemUserServiceImpl implements SystemUserService { @Resource private DataGroupService dataGroupService; + @Resource + private CommandSnippetApi commandSnippetApi; + + @Resource + private PathBookmarkApi pathBookmarkApi; + @Override public Long createSystemUser(SystemUserCreateRequest request) { // 转换 @@ -264,7 +272,10 @@ public class SystemUserServiceImpl implements SystemUserService { dataExtraService.deleteByUserIdList(idList); // 删除分组数据 dataGroupService.deleteDataGroupByUserIdList(idList); - // TODO snippet + // 删除命令片段 + commandSnippetApi.deleteByUserIdList(idList); + // 删除路径标签 + pathBookmarkApi.deleteByUserIdList(idList); } @Override diff --git a/sql/init-4-data.sql b/sql/init-4-data.sql index 31f7c498..8cdd91e1 100644 --- a/sql/init-4-data.sql +++ b/sql/init-4-data.sql @@ -43,8 +43,8 @@ INSERT INTO `dict_key` VALUES (39, 'pathBookmarkType', 'STRING', '[]', '路径 INSERT INTO `dict_key` VALUES (40, 'sftpTransferStatus', 'STRING', '[{\"name\": \"status\", \"type\": \"STRING\"}, {\"name\": \"color\", \"type\": \"COLOR\"}, {\"name\": \"icon\", \"type\": \"STRING\"}]', 'SFTP 传输状态', '2024-05-06 11:54:49', '2024-05-06 11:54:49', '1', '1', 0); INSERT INTO `dict_key` VALUES (41, 'uploadTaskStatus', 'STRING', '[{\"name\": \"color\", \"type\": \"COLOR\"}]', '上传任务状态', '2024-05-07 22:18:48', '2024-05-08 22:06:23', '1', '1', 0); INSERT INTO `dict_key` VALUES (42, 'uploadTaskFileStatus', 'STRING', '[{\"name\": \"status\", \"type\": \"STRING\"}]', '上传任务文件状态', '2024-05-08 10:30:29', '2024-05-10 17:34:13', '1', '1', 0); -INSERT INTO `dict_key` VALUES (43, 'messageType', 'STRING', '[{\"name\": \"tagLabel\", \"type\": \"STRING\"}, {\"name\": \"tagVisible\", \"type\": \"STRING\"}, {\"name\": \"tagColor\", \"type\": \"STRING\"}, {\"name\": \"redirectComponent\", \"type\": \"STRING\"}]', '消息类型', '2024-05-13 12:07:56', '2024-05-14 14:48:28', '1', '1', 0); -INSERT INTO `dict_key` VALUES (44, 'messageClassify', 'STRING', '[]', '消息分类', '2024-05-13 15:06:27', '2024-05-13 15:06:27', '1', '1', 0); +INSERT INTO `dict_key` VALUES (43, 'messageType', 'STRING', '[{\"name\": \"tagLabel\", \"type\": \"STRING\"}, {\"name\": \"tagVisible\", \"type\": \"STRING\"}, {\"name\": \"tagColor\", \"type\": \"STRING\"}, {\"name\": \"redirectComponent\", \"type\": \"STRING\"}]', '消息类型', '2024-05-13 12:07:56', '2024-05-31 17:31:37', '1', '1', 0); +INSERT INTO `dict_key` VALUES (44, 'messageClassify', 'STRING', '[]', '消息分类', '2024-05-13 15:06:27', '2024-05-31 17:31:37', '1', '1', 0); -- 字典值 INSERT INTO `dict_value` VALUES (3, 4, 'systemMenuType', '1', '父菜单', '{}', 10, '2023-10-26 15:58:59', '2023-10-26 15:58:59', '1', '1', 0); @@ -169,7 +169,7 @@ INSERT INTO `dict_value` VALUES (170, 25, 'hostNewConnectionType', 'list', '列 INSERT INTO `dict_value` VALUES (171, 25, 'hostNewConnectionType', 'favorite', '收藏', '{}', 30, '2023-12-14 17:25:00', '2024-01-31 23:39:19', '1', '1', 0); INSERT INTO `dict_value` VALUES (172, 25, 'hostNewConnectionType', 'latest', '最近连接', '{}', 40, '2023-12-14 17:25:10', '2024-01-31 23:39:19', '1', '1', 0); INSERT INTO `dict_value` VALUES (173, 26, 'hostExtraSshAuthType', 'DEFAULT', '主机默认配置', '{}', 10, '2023-12-25 15:48:26', '2023-12-25 15:48:26', '1', '1', 0); -INSERT INTO `dict_value` VALUES (174, 26, 'hostExtraSshAuthType', 'CUSTOM_KEY', '自定义', '{}', 20, '2023-12-25 15:48:42', '2024-05-17 12:49:13', '1', '1', 0); +INSERT INTO `dict_value` VALUES (174, 26, 'hostExtraSshAuthType', 'CUSTOM_KEY', '自定义密钥', '{}', 20, '2023-12-25 15:48:42', '2024-05-31 18:05:35', '1', '1', 0); INSERT INTO `dict_value` VALUES (175, 26, 'hostExtraSshAuthType', 'CUSTOM_IDENTITY', '自定义身份', '{}', 30, '2023-12-25 15:48:52', '2023-12-25 16:05:31', '1', '1', 0); INSERT INTO `dict_value` VALUES (176, 27, 'hostConnectType', 'SSH', 'SSH', '{\"color\": \"arcoblue\"}', 10, '2023-12-26 23:23:18', '2024-04-24 16:38:28', '1', '1', 0); INSERT INTO `dict_value` VALUES (177, 28, 'hostConnectStatus', 'CONNECTING', '连接中', '{\"color\": \"rgb(var(--green-6))\"}', 10, '2023-12-26 23:29:00', '2023-12-26 23:29:00', '1', '1', 0); @@ -285,17 +285,16 @@ INSERT INTO `dict_value` VALUES (291, 2, 'operatorLogType', 'upload-task:cancel' INSERT INTO `dict_value` VALUES (292, 2, 'operatorLogType', 'upload-task:delete', '删除上传记录', '{}', 30, '2024-05-08 22:23:44', '2024-05-08 22:23:44', '1', '1', 0); INSERT INTO `dict_value` VALUES (293, 2, 'operatorLogType', 'upload-task:clear', '清理上传记录', '{}', 40, '2024-05-08 22:23:59', '2024-05-08 22:23:59', '1', '1', 0); INSERT INTO `dict_value` VALUES (294, 41, 'uploadTaskStatus', 'FAILED', '已失败', '{\"color\": \"red\"}', 40, '2024-05-10 11:29:17', '2024-05-10 11:29:17', '1', '1', 0); -INSERT INTO `dict_value` VALUES (295, 43, 'messageType', 'EXEC_FAILED', '执行失败', '{\"tagColor\": \"red\", \"tagLabel\": \"部分失败\", \"tagVisible\": \"true\", \"redirectComponent\": \"execCommand\"}', 10, '2024-05-13 12:07:56', '2024-05-14 15:19:19', '1', '1', 0); -INSERT INTO `dict_value` VALUES (296, 43, 'messageType', 'UPLOAD_FAILED', '上传失败', '{\"tagColor\": \"red\", \"tagLabel\": \"部分失败\", \"tagVisible\": \"true\", \"redirectComponent\": \"batchUpload\"}', 20, '2024-05-13 12:07:56', '2024-05-14 15:11:21', '1', '1', 0); -INSERT INTO `dict_value` VALUES (297, 44, 'messageClassify', 'NOTICE', '通知', '{}', 10, '2024-05-13 15:06:27', '2024-05-13 15:06:27', '1', '1', 0); -INSERT INTO `dict_value` VALUES (298, 44, 'messageClassify', 'TODO', '待办', '{}', 20, '2024-05-13 15:06:27', '2024-05-13 15:06:27', '1', '1', 0); +INSERT INTO `dict_value` VALUES (295, 43, 'messageType', 'EXEC_FAILED', '执行失败', '{\"tagColor\": \"red\", \"tagLabel\": \"部分失败\", \"tagVisible\": \"true\", \"redirectComponent\": \"execCommand\"}', 10, '2024-05-13 12:07:56', '2024-05-31 17:31:18', '1', '1', 0); +INSERT INTO `dict_value` VALUES (296, 43, 'messageType', 'UPLOAD_FAILED', '上传失败', '{\"tagColor\": \"red\", \"tagLabel\": \"部分失败\", \"tagVisible\": \"true\", \"redirectComponent\": \"batchUpload\"}', 20, '2024-05-13 12:07:56', '2024-05-31 17:31:18', '1', '1', 0); +INSERT INTO `dict_value` VALUES (297, 44, 'messageClassify', 'NOTICE', '通知', '{}', 10, '2024-05-13 15:06:27', '2024-05-31 17:31:18', '1', '1', 0); +INSERT INTO `dict_value` VALUES (298, 44, 'messageClassify', 'TODO', '待办', '{}', 20, '2024-05-13 15:06:27', '2024-05-31 17:31:18', '1', '1', 0); -- 菜单配置 INSERT INTO `system_menu` VALUES (1, 0, '工作台', NULL, 1, 10, 1, 1, 1, 0, 'IconComputer', NULL, 'workplace', '2023-07-28 10:51:50', '2023-09-11 15:27:52', '1', '1', 0); INSERT INTO `system_menu` VALUES (5, 0, '用户设置', NULL, 1, 700, 1, 1, 1, 0, 'icon-user', NULL, 'userModule', '2023-07-28 10:55:38', '2024-04-03 00:56:30', '1', '1', 0); -INSERT INTO `system_menu` VALUES (8, 0, '项目地址 github', NULL, 1, 1000, 1, 1, 1, 0, 'icon-github', 'https://github.com/lijiahangmax/orion-visor', '', '2023-07-28 11:04:59', '2024-05-17 12:57:19', '1', '1', 0); +INSERT INTO `system_menu` VALUES (8, 0, '项目地址', NULL, 1, 1000, 1, 1, 1, 0, 'icon-link', 'https://lijiahangmax.github.io/open-orion/orion-visor', '', '2023-07-28 11:04:59', '2024-05-31 17:13:12', '1', '1', 0); INSERT INTO `system_menu` VALUES (10, 5, '角色管理', NULL, 2, 10, 1, 1, 1, 0, 'IconUserGroup', '', 'role', '2023-07-28 10:55:52', '2024-03-07 19:10:13', '1', '1', 0); -INSERT INTO `system_menu` VALUES (11, 0, '项目地址 gitee', NULL, 1, 1010, 1, 1, 1, 0, 'icon-gitlab', 'https://gitee.com/lijiahangmax/orion-visor', '', '2023-08-02 18:08:07', '2024-05-17 12:57:26', '1', '1', 0); INSERT INTO `system_menu` VALUES (12, 0, '系统设置', NULL, 1, 800, 1, 1, 1, 0, 'icon-tool', NULL, 'systemModule', '2023-08-02 18:24:24', '2024-04-03 00:56:17', '1', '1', 0); INSERT INTO `system_menu` VALUES (13, 12, '系统菜单', '', 2, 10, 1, 1, 1, 0, 'icon-menu', NULL, 'systemMenu', '2023-08-02 18:29:01', '2024-03-07 22:25:00', '1', '1', 0); INSERT INTO `system_menu` VALUES (20, 10, '创建角色', 'infra:system-role:create', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-15 16:36:54', '2023-10-27 01:20:46', '1', '1', 0);