Skip to content

Commit

Permalink
♻️ refactor: 重构代码和调整项目结构,优化导入和删除未使用代码
Browse files Browse the repository at this point in the history
  • Loading branch information
vnobo committed Jun 4, 2024
1 parent 151d15d commit ff8477d
Show file tree
Hide file tree
Showing 24 changed files with 148 additions and 630 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.platform.boot.commons.base;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.platform.boot.commons.query.CriteriaUtils;
import com.platform.boot.commons.utils.ContextUtils;
import com.platform.boot.commons.utils.Ulid;
import com.platform.boot.commons.utils.query.CriteriaUtils;
import org.springframework.data.domain.Persistable;
import org.springframework.data.relational.core.query.Criteria;
import org.springframework.util.ObjectUtils;
Expand Down Expand Up @@ -34,7 +34,7 @@ default void setCode(String code) {
default boolean isNew() {
boolean isNew = ObjectUtils.isEmpty(getId());
if (isNew) {
setCode(ContextUtils.nextId());
setCode(Ulid.random());
}
return isNew;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
@EqualsAndHashCode(callSuper = true)
public class RestServerException extends RuntimeException implements Serializable {

protected Object msg;
protected int code;
private Object msg;
private int code;

public RestServerException(int code, String message, Object msg) {
super(message);
Expand All @@ -23,7 +23,7 @@ public RestServerException(int code, String message, Object msg) {
}

public static RestServerException withMsg(String message, Object msg) {
return withMsg(5000, message, msg);
return withMsg(500, message, msg);
}

public static RestServerException withMsg(int code, String message, Object msg) {
Expand Down
Loading

0 comments on commit ff8477d

Please sign in to comment.