feat: 新增编码预览功能

- 后端新增 /rpc-api/base/code-gen/preview 接口
- SequenceAllocator.preview 查询序号但不消耗
- 前端操作列新增预览按钮,弹窗展示下一个编码
This commit is contained in:
zhouz
2026-07-15 18:14:40 +08:00
parent f3ef75f990
commit fbc5554c6a
7 changed files with 125 additions and 3 deletions

View File

@@ -9,6 +9,8 @@ import jakarta.validation.Valid;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
* RPC 服务 - 编码生成
@@ -31,4 +33,8 @@ public interface CodeGenApi {
@Operation(summary = "生成编码")
CommonResult<String> generate(@Valid @RequestBody CodeGenerateReqDTO reqDTO);
@GetMapping(PREFIX + "/preview")
@Operation(summary = "预览下一个编码(不消耗序号)")
CommonResult<String> preview(@RequestParam("ruleCode") String ruleCode);
}