1.规范增量 SQL 文件命名
2.新增数据总线模块(未完成) 3.新增规则模块(未完成) 4.新增组织编码与外部系统组织编码映射关系表 5.补全 e 办单点登录回调逻辑
This commit is contained in:
@@ -3,16 +3,10 @@ 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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,24 @@
|
||||
package com.zt.plat.module.rule.controller.admin.business.vo;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RuleBusinessBindPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "业务标识")
|
||||
private String business;
|
||||
|
||||
@Schema(description = "继承策略")
|
||||
private Integer overrideStrategy;
|
||||
|
||||
@Schema(description = "是否锁定")
|
||||
private Boolean locked;
|
||||
|
||||
private LocalDateTime[] createTime;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.zt.plat.module.rule.controller.admin.business.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class RuleBusinessBindRespVO {
|
||||
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "业务标识")
|
||||
private String business;
|
||||
|
||||
@Schema(description = "链ID")
|
||||
private Long ruleChainId;
|
||||
|
||||
@Schema(description = "链编码")
|
||||
private String ruleChainCode;
|
||||
|
||||
@Schema(description = "链名称")
|
||||
private String ruleChainName;
|
||||
|
||||
private Integer overrideStrategy;
|
||||
|
||||
private Boolean locked;
|
||||
|
||||
private String effectiveVersion;
|
||||
|
||||
private String remark;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.zt.plat.module.rule.controller.admin.business.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RuleBusinessBindSaveReqVO {
|
||||
|
||||
@Schema(description = "业务标识", example = "order.create")
|
||||
@NotBlank(message = "业务标识不能为空")
|
||||
private String business;
|
||||
|
||||
@Schema(description = "链ID", example = "1001")
|
||||
@NotNull(message = "链ID不能为空")
|
||||
private Long ruleChainId;
|
||||
|
||||
@Schema(description = "继承策略", example = "1")
|
||||
private Integer overrideStrategy;
|
||||
|
||||
@Schema(description = "是否锁定")
|
||||
private Boolean locked;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.zt.plat.module.rule.controller.admin.business.vo;
|
||||
|
||||
import com.zt.plat.module.rule.controller.admin.chain.vo.RuleChainStructureVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RuleBusinessChainViewRespVO {
|
||||
|
||||
@Schema(description = "业务标识")
|
||||
private String business;
|
||||
|
||||
@Schema(description = "版本号")
|
||||
private String version;
|
||||
|
||||
@Schema(description = "链ID")
|
||||
private String chainId;
|
||||
|
||||
@Schema(description = "LiteFlow DSL")
|
||||
private String liteflowDsl;
|
||||
|
||||
private RuleChainStructureVO structure;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.zt.plat.module.rule.controller.admin.business.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RuleBusinessRelationSaveReqVO {
|
||||
|
||||
@Schema(description = "父业务标识")
|
||||
@NotBlank(message = "父业务不能为空")
|
||||
private String parentBusiness;
|
||||
|
||||
@Schema(description = "子业务标识")
|
||||
@NotBlank(message = "子业务不能为空")
|
||||
private String childBusiness;
|
||||
|
||||
@Schema(description = "顺序")
|
||||
private Integer sort;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.zt.plat.module.rule.controller.admin.business.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class RuleBusinessTreeNodeRespVO {
|
||||
|
||||
@Schema(description = "业务标识")
|
||||
private String business;
|
||||
|
||||
@Schema(description = "链编码")
|
||||
private String chainCode;
|
||||
|
||||
@Schema(description = "链名称")
|
||||
private String chainName;
|
||||
|
||||
@Schema(description = "子节点")
|
||||
private List<RuleBusinessTreeNodeRespVO> children = new ArrayList<>();
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.zt.plat.module.rule.controller.admin.chain;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.rule.controller.admin.chain.vo.RuleChainCreateReqVO;
|
||||
import com.zt.plat.module.rule.controller.admin.chain.vo.RuleChainPageReqVO;
|
||||
import com.zt.plat.module.rule.controller.admin.chain.vo.RuleChainRespVO;
|
||||
import com.zt.plat.module.rule.controller.admin.chain.vo.RuleChainStructureVO;
|
||||
import com.zt.plat.module.rule.controller.admin.chain.vo.RuleChainUpdateReqVO;
|
||||
import com.zt.plat.module.rule.convert.chain.RuleChainConvert;
|
||||
import com.zt.plat.module.rule.dal.dataobject.chain.RuleChainDO;
|
||||
import com.zt.plat.module.rule.service.chain.RuleChainService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 规则链")
|
||||
@RestController
|
||||
@RequestMapping("/admin/rule/chain")
|
||||
@Validated
|
||||
public class RuleChainController {
|
||||
|
||||
@Resource
|
||||
private RuleChainService ruleChainService;
|
||||
@Resource
|
||||
private RuleChainConvert ruleChainConvert;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建规则链")
|
||||
@PreAuthorize("@ss.hasPermission('rule:chain:create')")
|
||||
public CommonResult<Long> createChain(@Valid @RequestBody RuleChainCreateReqVO reqVO) {
|
||||
return success(ruleChainService.createChain(reqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新规则链")
|
||||
@PreAuthorize("@ss.hasPermission('rule:chain:update')")
|
||||
public CommonResult<Boolean> updateChain(@Valid @RequestBody RuleChainUpdateReqVO reqVO) {
|
||||
ruleChainService.updateChain(reqVO);
|
||||
return success(Boolean.TRUE);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除规则链")
|
||||
@Parameter(name = "id", description = "规则链编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('rule:chain:delete')")
|
||||
public CommonResult<Boolean> deleteChain(@RequestParam("id") Long id) {
|
||||
ruleChainService.deleteChain(id);
|
||||
return success(Boolean.TRUE);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获取规则链详情")
|
||||
@Parameter(name = "id", description = "规则链编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('rule:chain:query')")
|
||||
public CommonResult<RuleChainRespVO> getChain(@RequestParam("id") Long id) {
|
||||
RuleChainDO chain = ruleChainService.getChain(id);
|
||||
return success(chain != null ? ruleChainConvert.convert(chain) : null);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "分页查询规则链")
|
||||
@PreAuthorize("@ss.hasPermission('rule:chain:query')")
|
||||
public CommonResult<PageResult<RuleChainRespVO>> getChainPage(@Valid RuleChainPageReqVO reqVO) {
|
||||
PageResult<RuleChainDO> pageResult = ruleChainService.getChainPage(reqVO);
|
||||
return success(ruleChainConvert.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/structure")
|
||||
@Operation(summary = "获取规则链结构")
|
||||
@Parameter(name = "id", description = "规则链编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('rule:chain:query')")
|
||||
public CommonResult<RuleChainStructureVO> getChainStructure(@RequestParam("id") Long id) {
|
||||
return success(ruleChainService.getChainStructure(id));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.zt.plat.module.rule.controller.admin.chain.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Base VO for rule chain operations.
|
||||
*/
|
||||
@Data
|
||||
public class RuleChainBaseVO {
|
||||
|
||||
@Schema(description = "链编码", example = "order_main_flow")
|
||||
@NotBlank(message = "链编码不能为空")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "链名称", example = "订单主流程")
|
||||
@NotBlank(message = "链名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "链描述")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "链状态")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "链结构")
|
||||
@Valid
|
||||
private RuleChainStructureVO structure;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user