1. 合并base改包代码
This commit is contained in:
@@ -126,6 +126,13 @@
|
||||
<artifactId>zt-spring-boot-starter-biz-business</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- LiteFlow 规则引擎相关 -->
|
||||
<dependency>
|
||||
<groupId>com.yomahub</groupId>
|
||||
<artifactId>liteflow-spring-boot-starter</artifactId>
|
||||
<version>2.15.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.zt.plat.module.rule.controller.admin.rule.vo;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 规则分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class RulePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "规则名称", example = "用户积分规则")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "规则类型:1-原子规则 2-链式规则", example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "规则状态:0-禁用 1-启用", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "规则链ID", example = "userPointsChain")
|
||||
private String chainId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
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;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 规则 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class RuleRespVO extends RuleBaseVO {
|
||||
|
||||
@Schema(description = "规则ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
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;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - 规则更新 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class RuleUpdateReqVO extends RuleBaseVO {
|
||||
|
||||
@Schema(description = "规则ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "规则ID不能为空")
|
||||
private Long id;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.zt.plat.module.rule.convert.rule;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.rule.controller.admin.rule.vo.*;
|
||||
import com.zt.plat.module.rule.dal.dataobject.rule.RuleDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 规则 Convert
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface RuleConvert {
|
||||
|
||||
RuleConvert INSTANCE = Mappers.getMapper(RuleConvert.class);
|
||||
|
||||
RuleDO convert(RuleCreateReqVO bean);
|
||||
|
||||
RuleDO convert(RuleUpdateReqVO bean);
|
||||
|
||||
RuleRespVO convert(RuleDO bean);
|
||||
|
||||
List<RuleRespVO> convertList(List<RuleDO> list);
|
||||
|
||||
PageResult<RuleRespVO> convertPage(PageResult<RuleDO> page);
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user