diff --git a/.idea/libraries/Maven__cn_dev33_sa_token_core_1_31_0.xml b/.idea/libraries/Maven__cn_dev33_sa_token_core_1_31_0.xml new file mode 100644 index 0000000..954bf73 --- /dev/null +++ b/.idea/libraries/Maven__cn_dev33_sa_token_core_1_31_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__cn_dev33_sa_token_jwt_1_31_0.xml b/.idea/libraries/Maven__cn_dev33_sa_token_jwt_1_31_0.xml new file mode 100644 index 0000000..b8bf8ca --- /dev/null +++ b/.idea/libraries/Maven__cn_dev33_sa_token_jwt_1_31_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__cn_dev33_sa_token_servlet_1_31_0.xml b/.idea/libraries/Maven__cn_dev33_sa_token_servlet_1_31_0.xml new file mode 100644 index 0000000..c69b76c --- /dev/null +++ b/.idea/libraries/Maven__cn_dev33_sa_token_servlet_1_31_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__cn_dev33_sa_token_spring_boot_starter_1_31_0.xml b/.idea/libraries/Maven__cn_dev33_sa_token_spring_boot_starter_1_31_0.xml new file mode 100644 index 0000000..57699ef --- /dev/null +++ b/.idea/libraries/Maven__cn_dev33_sa_token_spring_boot_starter_1_31_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__cn_hutool_hutool_core_5_8_11.xml b/.idea/libraries/Maven__cn_hutool_hutool_core_5_8_11.xml new file mode 100644 index 0000000..dd0e554 --- /dev/null +++ b/.idea/libraries/Maven__cn_hutool_hutool_core_5_8_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__cn_hutool_hutool_crypto_5_8_5.xml b/.idea/libraries/Maven__cn_hutool_hutool_crypto_5_8_5.xml new file mode 100644 index 0000000..e4ede7f --- /dev/null +++ b/.idea/libraries/Maven__cn_hutool_hutool_crypto_5_8_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__cn_hutool_hutool_json_5_8_5.xml b/.idea/libraries/Maven__cn_hutool_hutool_json_5_8_5.xml new file mode 100644 index 0000000..49f05ce --- /dev/null +++ b/.idea/libraries/Maven__cn_hutool_hutool_json_5_8_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__cn_hutool_hutool_jwt_5_8_5.xml b/.idea/libraries/Maven__cn_hutool_hutool_jwt_5_8_5.xml new file mode 100644 index 0000000..3c74c13 --- /dev/null +++ b/.idea/libraries/Maven__cn_hutool_hutool_jwt_5_8_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_alibaba_QLExpress_3_3_1.xml b/.idea/libraries/Maven__com_alibaba_QLExpress_3_3_1.xml new file mode 100644 index 0000000..b76a574 --- /dev/null +++ b/.idea/libraries/Maven__com_alibaba_QLExpress_3_3_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_alibaba_transmittable_thread_local_2_12_3.xml b/.idea/libraries/Maven__com_alibaba_transmittable_thread_local_2_12_3.xml new file mode 100644 index 0000000..e707955 --- /dev/null +++ b/.idea/libraries/Maven__com_alibaba_transmittable_thread_local_2_12_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_baomidou_mybatis_plus_3_4_0.xml b/.idea/libraries/Maven__com_baomidou_mybatis_plus_3_4_0.xml new file mode 100644 index 0000000..927e366 --- /dev/null +++ b/.idea/libraries/Maven__com_baomidou_mybatis_plus_3_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_baomidou_mybatis_plus_annotation_3_4_0.xml b/.idea/libraries/Maven__com_baomidou_mybatis_plus_annotation_3_4_0.xml new file mode 100644 index 0000000..4a76cc4 --- /dev/null +++ b/.idea/libraries/Maven__com_baomidou_mybatis_plus_annotation_3_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_baomidou_mybatis_plus_boot_starter_3_4_0.xml b/.idea/libraries/Maven__com_baomidou_mybatis_plus_boot_starter_3_4_0.xml new file mode 100644 index 0000000..e324603 --- /dev/null +++ b/.idea/libraries/Maven__com_baomidou_mybatis_plus_boot_starter_3_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_baomidou_mybatis_plus_core_3_4_0.xml b/.idea/libraries/Maven__com_baomidou_mybatis_plus_core_3_4_0.xml new file mode 100644 index 0000000..74d761a --- /dev/null +++ b/.idea/libraries/Maven__com_baomidou_mybatis_plus_core_3_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_baomidou_mybatis_plus_extension_3_4_0.xml b/.idea/libraries/Maven__com_baomidou_mybatis_plus_extension_3_4_0.xml new file mode 100644 index 0000000..48e3894 --- /dev/null +++ b/.idea/libraries/Maven__com_baomidou_mybatis_plus_extension_3_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_baomidou_mybatis_plus_generator_3_4_0.xml b/.idea/libraries/Maven__com_baomidou_mybatis_plus_generator_3_4_0.xml new file mode 100644 index 0000000..a4cfa72 --- /dev/null +++ b/.idea/libraries/Maven__com_baomidou_mybatis_plus_generator_3_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_jsqlparser_jsqlparser_2_0.xml b/.idea/libraries/Maven__com_github_jsqlparser_jsqlparser_2_0.xml new file mode 100644 index 0000000..93b26b4 --- /dev/null +++ b/.idea/libraries/Maven__com_github_jsqlparser_jsqlparser_2_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_pagehelper_pagehelper_5_1_10.xml b/.idea/libraries/Maven__com_github_pagehelper_pagehelper_5_1_10.xml new file mode 100644 index 0000000..1d21d3a --- /dev/null +++ b/.idea/libraries/Maven__com_github_pagehelper_pagehelper_5_1_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_pagehelper_pagehelper_spring_boot_autoconfigure_1_2_12.xml b/.idea/libraries/Maven__com_github_pagehelper_pagehelper_spring_boot_autoconfigure_1_2_12.xml new file mode 100644 index 0000000..494d628 --- /dev/null +++ b/.idea/libraries/Maven__com_github_pagehelper_pagehelper_spring_boot_autoconfigure_1_2_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_pagehelper_pagehelper_spring_boot_starter_1_2_12.xml b/.idea/libraries/Maven__com_github_pagehelper_pagehelper_spring_boot_starter_1_2_12.xml new file mode 100644 index 0000000..eda485f --- /dev/null +++ b/.idea/libraries/Maven__com_github_pagehelper_pagehelper_spring_boot_starter_1_2_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_google_guava_guava_20_0.xml b/.idea/libraries/Maven__com_google_guava_guava_20_0.xml new file mode 100644 index 0000000..c5bd322 --- /dev/null +++ b/.idea/libraries/Maven__com_google_guava_guava_20_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_yomahub_liteflow_core_2_10_3.xml b/.idea/libraries/Maven__com_yomahub_liteflow_core_2_10_3.xml new file mode 100644 index 0000000..faacc6e --- /dev/null +++ b/.idea/libraries/Maven__com_yomahub_liteflow_core_2_10_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_yomahub_liteflow_spring_2_10_3.xml b/.idea/libraries/Maven__com_yomahub_liteflow_spring_2_10_3.xml new file mode 100644 index 0000000..202e92b --- /dev/null +++ b/.idea/libraries/Maven__com_yomahub_liteflow_spring_2_10_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_yomahub_liteflow_spring_boot_starter_2_10_3.xml b/.idea/libraries/Maven__com_yomahub_liteflow_spring_boot_starter_2_10_3.xml new file mode 100644 index 0000000..496b83e --- /dev/null +++ b/.idea/libraries/Maven__com_yomahub_liteflow_spring_boot_starter_2_10_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_beanutils_commons_beanutils_1_9_4.xml b/.idea/libraries/Maven__commons_beanutils_commons_beanutils_1_9_4.xml new file mode 100644 index 0000000..84eb115 --- /dev/null +++ b/.idea/libraries/Maven__commons_beanutils_commons_beanutils_1_9_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml b/.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml new file mode 100644 index 0000000..13afda2 --- /dev/null +++ b/.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_io_commons_io_2_11_0.xml b/.idea/libraries/Maven__commons_io_commons_io_2_11_0.xml new file mode 100644 index 0000000..f94fc5a --- /dev/null +++ b/.idea/libraries/Maven__commons_io_commons_io_2_11_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_lang_commons_lang_2_4.xml b/.idea/libraries/Maven__commons_lang_commons_lang_2_4.xml new file mode 100644 index 0000000..5e8b8d3 --- /dev/null +++ b/.idea/libraries/Maven__commons_lang_commons_lang_2_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml b/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml new file mode 100644 index 0000000..eab40b3 --- /dev/null +++ b/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_12_0.xml b/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_12_0.xml new file mode 100644 index 0000000..28b8682 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_12_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_velocity_velocity_engine_core_2_3.xml b/.idea/libraries/Maven__org_apache_velocity_velocity_engine_core_2_3.xml new file mode 100644 index 0000000..ea2816e --- /dev/null +++ b/.idea/libraries/Maven__org_apache_velocity_velocity_engine_core_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_dom4j_dom4j_2_1_3.xml b/.idea/libraries/Maven__org_dom4j_dom4j_2_1_3.xml new file mode 100644 index 0000000..10fb46a --- /dev/null +++ b/.idea/libraries/Maven__org_dom4j_dom4j_2_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_mybatis_mybatis_3_5_5.xml b/.idea/libraries/Maven__org_mybatis_mybatis_3_5_5.xml new file mode 100644 index 0000000..c6b7334 --- /dev/null +++ b/.idea/libraries/Maven__org_mybatis_mybatis_3_5_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_mybatis_mybatis_spring_2_0_1.xml b/.idea/libraries/Maven__org_mybatis_mybatis_spring_2_0_1.xml new file mode 100644 index 0000000..f49fd3a --- /dev/null +++ b/.idea/libraries/Maven__org_mybatis_mybatis_spring_2_0_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_2_0_1.xml b/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_2_0_1.xml new file mode 100644 index 0000000..800ec1d --- /dev/null +++ b/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_2_0_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_2_0_1.xml b/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_2_0_1.xml new file mode 100644 index 0000000..fd255a3 --- /dev/null +++ b/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_2_0_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 3711abc..3686137 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -11,4 +11,11 @@ + + + \ No newline at end of file diff --git a/transactional-demo/pom.xml b/transactional-demo/pom.xml index 6faa6d7..f3089ce 100644 --- a/transactional-demo/pom.xml +++ b/transactional-demo/pom.xml @@ -30,6 +30,11 @@ com.alibaba fastjson + + com.yomahub + liteflow-spring-boot-starter + 2.10.3 + com.google.guava guava @@ -58,6 +63,44 @@ spring-boot-starter-test test + + + cn.dev33 + sa-token-spring-boot-starter + 1.31.0 + + + com.github.pagehelper + pagehelper-spring-boot-starter + 1.2.12 + + + org.mybatis + mybatis + + + + + com.baomidou + mybatis-plus-boot-starter + 3.4.0 + + + com.baomidou + mybatis-plus-generator + 3.4.0 + + + org.apache.velocity + velocity-engine-core + 2.3 + + + + cn.dev33 + sa-token-jwt + 1.31.0 + diff --git a/transactional-demo/src/main/java/nl/org/transactionaldemo/StartApplication.java b/transactional-demo/src/main/java/nl/org/transactionaldemo/StartApplication.java index 16c0215..e82bbbd 100644 --- a/transactional-demo/src/main/java/nl/org/transactionaldemo/StartApplication.java +++ b/transactional-demo/src/main/java/nl/org/transactionaldemo/StartApplication.java @@ -1,9 +1,11 @@ package nl.org.transactionaldemo; +import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication +@MapperScan("nl.org.transactionaldemo.server.源码阅读.db.dao.mapper") public class StartApplication { public static void main(String[] args) { diff --git a/transactional-demo/src/main/java/nl/org/transactionaldemo/config/SaTokenConfigure.java b/transactional-demo/src/main/java/nl/org/transactionaldemo/config/SaTokenConfigure.java new file mode 100644 index 0000000..3a9091e --- /dev/null +++ b/transactional-demo/src/main/java/nl/org/transactionaldemo/config/SaTokenConfigure.java @@ -0,0 +1,36 @@ +package nl.org.transactionaldemo.config; + +import cn.dev33.satoken.interceptor.SaInterceptor; +import cn.dev33.satoken.jwt.StpLogicJwtForSimple; +import cn.dev33.satoken.stp.StpLogic; +import cn.dev33.satoken.stp.StpUtil; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * @author: lyd + * @description: sa-token的配置路由拦截 + * @Date: 2022-09-20 + */ +@Configuration +public class SaTokenConfigure implements WebMvcConfigurer { + static { + System.out.println("加载SaTokenConfigure"); + } + + // Sa-Token 整合 jwt (Simple 简单模式) + @Bean + public StpLogic getStpLogicJwt() { + return new StpLogicJwtForSimple(); + } + + // 注册 Sa-Token 拦截器,打开注解式鉴权功能 + @Override + public void addInterceptors(InterceptorRegistry registry) { + registry.addInterceptor(new SaInterceptor(handle -> StpUtil.checkLogin())) + .addPathPatterns("/**"); + } + +} diff --git a/transactional-demo/src/main/java/nl/org/transactionaldemo/server/JDK新特性/CompletableFuture/CompletableDemo.java b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/JDK新特性/CompletableFuture/CompletableDemo.java new file mode 100644 index 0000000..17630f0 --- /dev/null +++ b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/JDK新特性/CompletableFuture/CompletableDemo.java @@ -0,0 +1,51 @@ +package nl.org.transactionaldemo.server.JDK新特性.CompletableFuture; + +import com.alibaba.fastjson.JSON; +import com.google.common.collect.Lists; +import org.springframework.util.CollectionUtils; + +import java.util.*; +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +/* + * 异步编程工具 + * @Date 2023/5/6 15:24 + */ +public class CompletableDemo { + public static void main(String[] args) { + ThreadPoolExecutor executor = new ThreadPoolExecutor(4, 8, 30L, TimeUnit.SECONDS, new ArrayBlockingQueue<>(50)); + ArrayList datas = new ArrayList(); + for (int i = 0; i < 1000; i++) { + Map map = new HashMap<>(); + map.put("NO:"+i, UUID.randomUUID().toString()); + datas.add(map); + } + List> partition = Lists.partition(datas, 200); + //没有返回值的异步操作 + runasync(executor, partition); + supplyAsync(executor, partition); + } + + private static void runasync(ThreadPoolExecutor executor, List> partition) { + long res = partition.stream().map(item -> CompletableFuture.runAsync(() -> { + for (Map data : item) { + System.out.println(Thread.currentThread().getName()+"____"+data.keySet().toString()); + } + }, executor)).parallel().map(CompletableFuture::join).count();//join.get会等待全部线程返回结果 + } + + private static void supplyAsync(ThreadPoolExecutor executor, List> partition) { + + List collect = partition.stream().map(item -> CompletableFuture.supplyAsync(() -> Thread.currentThread().getName()+"____"+item.stream().map(a->a.keySet().toString()).collect(Collectors.toList()).size(), executor)).parallel().map(CompletableFuture::join).collect(Collectors.toList()); + System.out.println(collect.toString()); + } + +} + diff --git a/transactional-demo/src/main/java/nl/org/transactionaldemo/server/流程引擎/controller/FlowController.java b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/流程引擎/controller/FlowController.java new file mode 100644 index 0000000..3c8f239 --- /dev/null +++ b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/流程引擎/controller/FlowController.java @@ -0,0 +1,32 @@ +package nl.org.transactionaldemo.server.流程引擎.controller; + +import com.alibaba.fastjson.JSONObject; +import com.yomahub.liteflow.core.FlowExecutor; +import com.yomahub.liteflow.flow.LiteflowResponse; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.concurrent.Future; + +/* + * @author ZZQ + * @Date 2023/5/6 18:21 + */ +@RestController +@RequestMapping("/flow") +public class FlowController { + + @Resource + FlowExecutor flowExecutor; + + @RequestMapping("/demo") + public String flow(@RequestParam("way") Boolean way){ + JSONObject param = new JSONObject(); + param.put("way",way); + Future fullflow = flowExecutor.execute2Future("fullflow", param); + return "sucess"; + } +} diff --git a/transactional-demo/src/main/java/nl/org/transactionaldemo/server/流程引擎/gateway/专机网关.java b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/流程引擎/gateway/专机网关.java new file mode 100644 index 0000000..caec45d --- /dev/null +++ b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/流程引擎/gateway/专机网关.java @@ -0,0 +1,19 @@ +package nl.org.transactionaldemo.server.流程引擎.gateway; + +import com.alibaba.fastjson.JSONObject; +import com.yomahub.liteflow.core.NodeIfComponent; +import org.springframework.stereotype.Component; + +/* + * @author ZZQ + * @Date 2023/5/6 17:56 + */ +@Component() +public class 专机网关 extends NodeIfComponent { + @Override //x就是IF组件,为真,执行a,为假,执行b: + public boolean processIf() throws Exception { + System.out.println("执行网关"); + JSONObject data = (JSONObject)this.getRequestData(); + return data.getBoolean("way"); + } +} diff --git a/transactional-demo/src/main/java/nl/org/transactionaldemo/server/流程引擎/nodes/推弯一体.java b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/流程引擎/nodes/推弯一体.java new file mode 100644 index 0000000..d724566 --- /dev/null +++ b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/流程引擎/nodes/推弯一体.java @@ -0,0 +1,16 @@ +package nl.org.transactionaldemo.server.流程引擎.nodes; + +import com.yomahub.liteflow.core.NodeComponent; +import org.springframework.stereotype.Component; + +/* + * @author ZZQ + * @Date 2023/5/6 17:54 + */ +@Component +public class 推弯一体 extends NodeComponent { + @Override + public void process() throws Exception { + System.out.println("推弯一体"); + } +} diff --git a/transactional-demo/src/main/java/nl/org/transactionaldemo/server/流程引擎/nodes/深坑储料仓.java b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/流程引擎/nodes/深坑储料仓.java new file mode 100644 index 0000000..b99f094 --- /dev/null +++ b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/流程引擎/nodes/深坑储料仓.java @@ -0,0 +1,16 @@ +package nl.org.transactionaldemo.server.流程引擎.nodes; + +import com.yomahub.liteflow.core.NodeComponent; +import org.springframework.stereotype.Component; + +/* + * @author ZZQ + * @Date 2023/5/6 17:54 + */ +@Component +public class 深坑储料仓 extends NodeComponent { + @Override + public void process() throws Exception { + System.out.println("深坑储料仓"); + } +} diff --git a/transactional-demo/src/main/java/nl/org/transactionaldemo/server/流程引擎/nodes/激光下料机.java b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/流程引擎/nodes/激光下料机.java new file mode 100644 index 0000000..0522a94 --- /dev/null +++ b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/流程引擎/nodes/激光下料机.java @@ -0,0 +1,16 @@ +package nl.org.transactionaldemo.server.流程引擎.nodes; + +import com.yomahub.liteflow.core.NodeComponent; +import org.springframework.stereotype.Component; + +/* + * @author ZZQ + * @Date 2023/5/6 17:54 + */ +@Component +public class 激光下料机 extends NodeComponent { + @Override + public void process() throws Exception { + System.out.println("激光下料机"); + } +} diff --git a/transactional-demo/src/main/java/nl/org/transactionaldemo/server/流程引擎/nodes/缓存线.java b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/流程引擎/nodes/缓存线.java new file mode 100644 index 0000000..9e92327 --- /dev/null +++ b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/流程引擎/nodes/缓存线.java @@ -0,0 +1,16 @@ +package nl.org.transactionaldemo.server.流程引擎.nodes; + +import com.yomahub.liteflow.core.NodeComponent; +import org.springframework.stereotype.Component; + +/* + * @author ZZQ + * @Date 2023/5/6 17:54 + */ +@Component +public class 缓存线 extends NodeComponent { + @Override + public void process() throws Exception { + System.out.println("激光下料机"); + } +} diff --git a/transactional-demo/src/main/java/nl/org/transactionaldemo/server/源码阅读/ErrorDemo.java b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/源码阅读/ErrorDemo.java new file mode 100644 index 0000000..b115d53 --- /dev/null +++ b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/源码阅读/ErrorDemo.java @@ -0,0 +1,29 @@ +package nl.org.transactionaldemo.server.流程引擎.controller; + +import com.alibaba.fastjson.JSONObject; +import com.yomahub.liteflow.core.FlowExecutor; +import com.yomahub.liteflow.flow.LiteflowResponse; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; +import java.util.concurrent.Future; + +/* + * @author ZZQ + * @Date 2023/5/6 18:21 + */ +@RestController +@RequestMapping("/sourcecode") +public class ErrorDemo { + + @RequestMapping("/demo") + public String flow(@RequestParam("list") List way){ + way.forEach(a-> + Integer.valueOf(a)); + return "sucess"; + } +} diff --git a/transactional-demo/src/main/java/nl/org/transactionaldemo/server/源码阅读/PageHelperDemoo.java b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/源码阅读/PageHelperDemoo.java new file mode 100644 index 0000000..2cefee8 --- /dev/null +++ b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/源码阅读/PageHelperDemoo.java @@ -0,0 +1,31 @@ +package nl.org.transactionaldemo.server.源码阅读; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import nl.org.transactionaldemo.server.源码阅读.db.ISchProcessRouteService; +import nl.org.transactionaldemo.server.源码阅读.db.dao.SchProcessRoute; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +/* + * @author ZZQ + * @Date 2023/5/6 18:21 + */ +@RestController +@RequestMapping("/page") +public class PageHelperDemoo { + + @Resource + ISchProcessRouteService routeService; + + @RequestMapping("/demo") + public String flow(@RequestParam("list") List way){ + Page page = PageHelper.startPage(1, 2); + List list = routeService.list(); + return "sucess"; + } +} diff --git a/transactional-demo/src/main/java/nl/org/transactionaldemo/server/源码阅读/db/ISchProcessRouteService.java b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/源码阅读/db/ISchProcessRouteService.java new file mode 100644 index 0000000..30b99c9 --- /dev/null +++ b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/源码阅读/db/ISchProcessRouteService.java @@ -0,0 +1,18 @@ +package nl.org.transactionaldemo.server.源码阅读.db; + + +import com.baomidou.mybatisplus.extension.service.IService; +import nl.org.transactionaldemo.server.源码阅读.db.dao.SchProcessRoute; + +/** + *

+ * 物料系列调度线路配置表 服务类 + *

+ * + * @author generator + * @since 2023-05-23 + */ +public interface ISchProcessRouteService extends IService { + + +} diff --git a/transactional-demo/src/main/java/nl/org/transactionaldemo/server/源码阅读/db/SchProcessRouteServiceImpl.java b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/源码阅读/db/SchProcessRouteServiceImpl.java new file mode 100644 index 0000000..da6aee6 --- /dev/null +++ b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/源码阅读/db/SchProcessRouteServiceImpl.java @@ -0,0 +1,20 @@ +package nl.org.transactionaldemo.server.源码阅读.db; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import nl.org.transactionaldemo.server.源码阅读.db.dao.SchProcessRoute; +import nl.org.transactionaldemo.server.源码阅读.db.dao.mapper.SchProcessRouteMapper; +import org.springframework.stereotype.Service; + +/** + *

+ * 物料系列调度线路配置表 服务实现类 + *

+ * + * @author generator + * @since 2023-05-23 + */ +@Service +public class SchProcessRouteServiceImpl extends ServiceImpl implements ISchProcessRouteService { + + +} diff --git a/transactional-demo/src/main/java/nl/org/transactionaldemo/server/源码阅读/db/dao/SchProcessRoute.java b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/源码阅读/db/dao/SchProcessRoute.java new file mode 100644 index 0000000..2470881 --- /dev/null +++ b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/源码阅读/db/dao/SchProcessRoute.java @@ -0,0 +1,57 @@ +package nl.org.transactionaldemo.server.源码阅读.db.dao; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; + +/** + *

+ * 物料系列调度线路配置表 + *

+ * + * @author generator + * @since 2023-05-23 + */ +@TableName("sch_process_route") +public class SchProcessRoute implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 规则(物料系列/区域) + */ + @TableId(value ="rule_code" ) + private String rule_code; + + /** + * 袋唯一标识 + */ + private String process_id; + + private String process_name; + + + public String getRule_code() { + return rule_code; + } + + public void setRule_code(String rule_code) { + this.rule_code = rule_code; + } + + public String getProcess_id() { + return process_id; + } + + public void setProcess_id(String process_id) { + this.process_id = process_id; + } + + public String getProcess_name() { + return process_name; + } + + public void setProcess_name(String process_name) { + this.process_name = process_name; + } +} diff --git a/transactional-demo/src/main/java/nl/org/transactionaldemo/server/源码阅读/db/dao/mapper/SchProcessRouteMapper.java b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/源码阅读/db/dao/mapper/SchProcessRouteMapper.java new file mode 100644 index 0000000..26421d0 --- /dev/null +++ b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/源码阅读/db/dao/mapper/SchProcessRouteMapper.java @@ -0,0 +1,16 @@ +package nl.org.transactionaldemo.server.源码阅读.db.dao.mapper; + + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import nl.org.transactionaldemo.server.源码阅读.db.dao.*; +/** + *

+ * 物料系列调度线路配置表 Mapper 接口 + *

+ * + * @author generator + * @since 2023-05-23 + */ +public interface SchProcessRouteMapper extends BaseMapper { + +} diff --git a/transactional-demo/src/main/java/nl/org/transactionaldemo/server/锁/service/PointService.java b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/锁/service/PointService.java new file mode 100644 index 0000000..cae8294 --- /dev/null +++ b/transactional-demo/src/main/java/nl/org/transactionaldemo/server/锁/service/PointService.java @@ -0,0 +1,15 @@ +package nl.org.transactionaldemo.server.锁.service; + +import org.springframework.stereotype.Service; + +/* + * @author ZZQ + * @Date 2023/12/5 14:45 + */ +@Service +public class PointService { + + public String findPoint(){ + return ""; + }; +} diff --git a/transactional-demo/src/main/resources/flow.xml b/transactional-demo/src/main/resources/flow.xml new file mode 100644 index 0000000..8e75f46 --- /dev/null +++ b/transactional-demo/src/main/resources/flow.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + THEN(激光下料机, + IF(专机网关,缓存线, + THEN(推弯一体, + IF(专机网关,缓存线, 深坑储料仓) + ) + ) + ); + +