From a6470c4de7867f5478197c390c158ad730ff5bae Mon Sep 17 00:00:00 2001
From: lrj <386002446@qq.com>
Date: 星期五, 25 十月 2024 14:51:21 +0800
Subject: [PATCH] bug

---
 src/test/java/org/example/Builder.java |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/test/java/org/example/Builder.java b/src/test/java/org/example/Builder.java
index 778273b..156ccaf 100644
--- a/src/test/java/org/example/Builder.java
+++ b/src/test/java/org/example/Builder.java
@@ -2,6 +2,7 @@
 
 import com.ycl.scheme.AbstractSchemeRunner;
 import com.ycl.scheme.BlockText;
+import com.ycl.scheme.Parameter;
 import com.ycl.scheme.entity.BlockCode;
 import com.ycl.scheme.entity.Scheme;
 import com.ycl.scheme.SchemeRunnerBuilder;
@@ -12,6 +13,8 @@
 import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
 
 @SpringBootTest
 public class Builder {
@@ -27,8 +30,8 @@
 
     @Test
     public  void build(){
-        BlockText blockText = new BlockText();
-        String text = "鏁版嵁婧� : 璀︽儏閫氭姤 \n 鏉′欢:鏃堕棿鑼冨洿(鏈�杩�5澶�)   骞朵笖  璀︽儏鍐呭 鍖呭惈  '鎶㈠ず'  骞朵笖 妗堝彂鍦� 鍖呭惈  '閲戠墰澶ч亾'\n 缁撴灉: 璁℃暟 > 2  \n and 鏁版嵁婧�:妗堜欢绯荤粺 \n 鏉′欢:鏃堕棿鑼冨洿(鏈�杩�5澶�)   骞朵笖  璀︽儏鍐呭 鍖呭惈  '鍛芥'  骞朵笖 妗堝彂鍦� 鍖呭惈  '閲戠墰澶ч亾'\n 缁撴灉: 璁℃暟>=2 \n";
+
+        String text = "鏁版嵁婧� : 璀︽儏閫氭姤 \n 鏉′欢:鏃堕棿鑼冨洿(鏈�杩�5澶�)   骞朵笖  璀︽儏鍐呭 鍖呭惈  '鎶㈠ず'  骞朵笖 妗堝彂鍦� 鍖呭惈  '閲戠墰澶ч亾'\n 缁撴灉: 璁℃暟 > 2  \n and 鏁版嵁婧�:妗堜欢绯荤粺 \n 鏉′欢:鏃堕棿鑼冨洿(鏈�杩�5澶�)   骞朵笖  璀︽儏鍐呭 鍖呭惈  '璇堥獥'  骞朵笖 妗堝彂鍦� 鍖呭惈  '閾剁墰澶ч亾'\n 缁撴灉: 鍚堣(娑夋閲戦)>=100000 \n";
         Scheme scheme =new Scheme();
         scheme.setId(1);
         scheme.setName("绱ф�ラ�氭姤");
@@ -43,8 +46,13 @@
         String code =scheme.getOutCode();
 
         AbstractSchemeRunner runner = scheme.getRunner();
-
-        runner.run(service);
+        Map<String, Parameter> pars= new HashMap<>();
+        Parameter p = new Parameter();
+        p.setName("rowId");
+        p.setScript(1);
+        p.setTypeName("Integer");
+        pars.put("rowId",p);
+        runner.run(pars,service);
 
         System.out.println(code);
 

--
Gitblit v1.8.0