1. 统一包名修改

This commit is contained in:
chenbowen
2025-09-22 11:55:27 +08:00
parent a001fc8f16
commit 0d46897482
2739 changed files with 512 additions and 512 deletions

24
zt-module-rule/pom.xml Normal file
View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>zt</artifactId>
<groupId>com.zt.plat</groupId>
<version>${revision}</version>
</parent>
<modules>
<module>zt-module-rule-api</module>
<module>zt-module-rule-server</module>
</modules>
<modelVersion>4.0.0</modelVersion>
<artifactId>zt-module-rule</artifactId>
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<description>
Rule 模块。
</description>
</project>

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>zt-module-rule</artifactId>
<groupId>com.zt.plat</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>zt-module-rule-api</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>
暴露给其它模块调用
</description>
<dependencies>
<dependency>
<groupId>com.zt.plat</groupId>
<artifactId>zt-common</artifactId>
</dependency>
<!-- Web 相关 -->
<dependency>
<groupId>org.springdoc</groupId> <!-- 接口文档:使用最新版本的 Swagger 模型 -->
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- 参数校验 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<optional>true</optional>
</dependency>
<!-- RPC 远程调用相关 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,17 @@
package com.zt.plat.module.rule.enums;
import com.zt.plat.framework.common.exception.ErrorCode;
/**
* rule 错误码枚举类
*
* rule 系统,使用 1-xxx-xxx-xxx 段
*
* @author ZT
*/
public interface ErrorCodeConstants {
// ========== 示例模块 1-001-000-000 ==========
ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,18 @@
package com.zt.plat.module.rule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* Rule 模块的启动类
*
* @author ZT
*/
@SpringBootApplication
public class RuleServerApplication {
public static void main(String[] args) {
SpringApplication.run(RuleServerApplication.class, args);
}
}

View File

@@ -0,0 +1,44 @@
package com.zt.plat.module.rule.controller.admin.rule.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* 规则 Base VO提供给添加、修改、详细的子 VO 使用
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
*/
@Data
public class RuleBaseVO {
@Schema(description = "规则名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "用户积分计算规则")
@NotBlank(message = "规则名称不能为空")
private String name;
@Schema(description = "规则描述", example = "根据用户行为计算积分奖励")
private String description;
@Schema(description = "规则类型1-原子规则 2-链式规则", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "规则类型不能为空")
private Integer type;
@Schema(description = "规则状态0-禁用 1-启用", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "规则状态不能为空")
private Integer status;
@Schema(description = "规则配置JSON格式", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "规则配置不能为空")
private String config;
@Schema(description = "LiteFlow规则链ID", example = "userPointsChain")
private String chainId;
@Schema(description = "规则版本", example = "1.0.0")
private String version;
@Schema(description = "排序", example = "1")
private Integer sort;
}

View File

@@ -0,0 +1,14 @@
package com.zt.plat.module.rule.controller.admin.rule.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@Schema(description = "管理后台 - 规则创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class RuleCreateReqVO extends RuleBaseVO {
}

View File

@@ -0,0 +1,59 @@
package com.zt.plat.module.rule.controller.admin.rule.vo;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.Map;
/**
* 规则执行结果 VO
*/
@Data
public class RuleExecuteRespVO {
/**
* 执行是否成功
*/
private Boolean success;
/**
* 错误消息
*/
private String errorMessage;
/**
* 执行结果数据
*/
private Map<String, Object> resultData;
/**
* 执行耗时(毫秒)
*/
private Long executionTime;
/**
* 执行开始时间
*/
private LocalDateTime startTime;
/**
* 执行结束时间
*/
private LocalDateTime endTime;
/**
* 执行的规则链ID
*/
private String chainId;
/**
* 执行的节点列表
*/
private String executedNodes;
/**
* 执行上下文快照
*/
private Map<String, Object> contextSnapshot;
}

Some files were not shown because too many files have changed in this diff Show More