Skip to content

Commit

Permalink
refactor(基础模块): 优化菜单ID生成策略.
Browse files Browse the repository at this point in the history
  • Loading branch information
PengyuDeng committed Aug 19, 2024
1 parent 65e5ac9 commit c053d28
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import org.hswebframework.web.api.crud.entity.RecordCreationEntity;
import org.hswebframework.web.crud.annotation.EnableEntityEvent;
import org.hswebframework.web.crud.generator.Generators;
import org.hswebframework.web.utils.DigestUtils;
import org.hswebframework.web.id.IDGenerator;
import org.hswebframework.web.validator.CreateGroup;

import javax.persistence.Column;
Expand Down Expand Up @@ -131,12 +131,7 @@ public String getId() {
}

public void generateId() {
String id = generateHexId(code, owner);
setId(id);
}

public static String generateHexId(String boardId, String owner) {
return DigestUtils.md5Hex(String.join(boardId, "|", owner));
setId(IDGenerator.SNOW_FLAKE_STRING.generate());
}

public boolean isSupportDataAccess() {
Expand Down

0 comments on commit c053d28

Please sign in to comment.