From c42614978ff12013a1eabebd0289b27169a5784f Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期二, 06 五月 2025 17:25:56 +0800 Subject: [PATCH] 1、实现万功能token(0000-0000-1234-9876-5); 2、web端单独实现命令结果等待器,并相应修改相关部分; 3、web端实现透传命令; 4、修改一些不当注释; 5、优化一些代码。 --- pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/config/KaptchaMathOneTextCreator.java | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/config/KaptchaMathOneTextCreator.java b/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/config/KaptchaMathOneTextCreator.java new file mode 100644 index 0000000..7ed46e2 --- /dev/null +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/config/KaptchaMathOneTextCreator.java @@ -0,0 +1,25 @@ +package com.dy.pipIrrApp.config; + +import com.dy.pipIrrApp.util.CaptchaUtil; +import com.google.code.kaptcha.text.impl.DefaultTextCreator; + +import java.security.SecureRandom; +import java.util.Map; +import java.util.Random; + +/** + * @author ZhuBaoMin + * @date 2024-09-11 15:51 + * @LastEditTime 2024-09-11 15:51 + * @Description + */ + +public class KaptchaMathOneTextCreator extends DefaultTextCreator { + @Override + public String getText() { + Random random = new SecureRandom(); + // 鐢熸垚涓や釜闅忔満鏁帮紝闅忔満鏁拌寖鍥达細[0,10)锛屽苟杩斿洖缁撴灉 + Map<String, String> result = CaptchaUtil.mathTextCreator(random.nextInt(10), random.nextInt(10)); + return result.get("resultString"); + } +} -- Gitblit v1.8.0