菜单优化
This commit is contained in:
+4
-3
@@ -1,4 +1,4 @@
|
||||
package com.example.workutils.menu.handler;
|
||||
package com.example.workutils.biz.git.menu;
|
||||
|
||||
import com.example.workutils.biz.git.service.GitService;
|
||||
import com.example.workutils.biz.git.util.GitCommandExecutor;
|
||||
@@ -13,12 +13,13 @@ import java.util.Scanner;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Git仓库健康检测工具
|
||||
* Git仓库健康检测菜单
|
||||
* 仅负责菜单展示和用户交互,业务逻辑委托给GitService
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class GitHealthHandler extends AbstractTool {
|
||||
public class GitMenu extends AbstractTool {
|
||||
|
||||
private static final String[] MENU_OPTIONS = {
|
||||
"1. 检测所有仓库健康状态",
|
||||
+4
-3
@@ -1,4 +1,4 @@
|
||||
package com.example.workutils.menu.handler;
|
||||
package com.example.workutils.biz.mybatis.menu;
|
||||
|
||||
import com.example.workutils.biz.mybatis.generator.MyBatisGeneratorService;
|
||||
import com.example.workutils.tool.AbstractTool;
|
||||
@@ -11,12 +11,13 @@ import java.util.List;
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* MyBatis逆向工程工具
|
||||
* MyBatis逆向工程菜单
|
||||
* 仅负责菜单展示和用户交互,业务逻辑委托给MyBatisGeneratorService
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class MyBatisGeneratorHandler extends AbstractTool {
|
||||
public class MyBatisGeneratorMenu extends AbstractTool {
|
||||
|
||||
private static final String[] MENU_OPTIONS = {
|
||||
"1. 根据表名生成(单表)",
|
||||
+4
-3
@@ -1,4 +1,4 @@
|
||||
package com.example.workutils.menu.handler;
|
||||
package com.example.workutils.biz.mybatis.menu;
|
||||
|
||||
import com.example.workutils.biz.mybatis.export.MyBatisExportService;
|
||||
import com.example.workutils.tool.AbstractTool;
|
||||
@@ -10,12 +10,13 @@ import java.util.Arrays;
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* MyBatis导出功能工具
|
||||
* MyBatis SQL导出菜单
|
||||
* 仅负责菜单展示和用户交互,业务逻辑委托给MyBatisExportService
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class MyBatisHandler extends AbstractTool {
|
||||
public class MyBatisMenu extends AbstractTool {
|
||||
|
||||
private static final String[] MENU_OPTIONS = {
|
||||
"1. 导出所有SQL",
|
||||
+4
-3
@@ -1,4 +1,4 @@
|
||||
package com.example.workutils.menu.handler;
|
||||
package com.example.workutils.biz.output.menu;
|
||||
|
||||
import com.example.workutils.biz.mybatis.export.MyBatisExportService;
|
||||
import com.example.workutils.biz.scanner.service.ScanService;
|
||||
@@ -12,12 +12,13 @@ import java.util.List;
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* 批量处理功能工具
|
||||
* 批量处理菜单
|
||||
* 仅负责菜单展示和用户交互,业务逻辑委托给各Service
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class BatchHandler extends AbstractTool {
|
||||
public class BatchMenu extends AbstractTool {
|
||||
|
||||
@FunctionalInterface
|
||||
public interface ExceptionRunnable {
|
||||
+4
-6
@@ -1,4 +1,4 @@
|
||||
package com.example.workutils.menu.handler;
|
||||
package com.example.workutils.biz.scanner.menu;
|
||||
|
||||
import com.example.workutils.biz.scanner.service.ScanService;
|
||||
import com.example.workutils.tool.AbstractTool;
|
||||
@@ -9,12 +9,13 @@ import org.springframework.stereotype.Component;
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* 扫描功能工具
|
||||
* 扫描功能菜单
|
||||
* 仅负责菜单展示和用户交互,业务逻辑委托给ScanService
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class ScanHandler extends AbstractTool {
|
||||
public class ScanMenu extends AbstractTool {
|
||||
|
||||
private static final String[] MENU_OPTIONS = {
|
||||
"1. 关键词扫描",
|
||||
@@ -50,9 +51,6 @@ public class ScanHandler extends AbstractTool {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 关键词扫描
|
||||
*/
|
||||
private void scanByKeyword(Scanner scanner) throws Exception {
|
||||
printMenuTitle("关键词扫描");
|
||||
info("开始关键词扫描");
|
||||
Reference in New Issue
Block a user