🆕 编码位数
All checks were successful
Release / Release (push) Successful in 39s

This commit is contained in:
my_ong
2025-03-19 16:42:03 +08:00
parent 06470796c2
commit 7422bec2e3
2 changed files with 72 additions and 1 deletions

View File

@@ -140,7 +140,8 @@ public class MaterialController {
private String getCode() {
String code;
while (true) {
code = String.valueOf(R.random(1000, 9999));
code = String.valueOf(R.random(10000, 99999));
// 需要和前端scan-form.vue中的autoInsertOneRow方法的切割联动修改
try {
// 如果代码已经存在,继续循环
if (Strings.isBlank(cache.get(code))) {