【依赖】mybatis-plus from 3.5.5 to 3.5.7

This commit is contained in:
YunaiV
2024-07-13 22:42:54 +08:00
parent 40deb00a00
commit 2b39b434fa
21 changed files with 90 additions and 519 deletions

View File

@ -17,6 +17,8 @@ import com.baomidou.mybatisplus.extension.handlers.AbstractJsonTypeHandler;
import com.fasterxml.jackson.core.type.TypeReference;
import lombok.*;
import java.lang.reflect.Field;
/**
* 文件配置表
*
@ -65,8 +67,16 @@ public class FileConfigDO extends BaseDO {
public static class FileClientConfigTypeHandler extends AbstractJsonTypeHandler<Object> {
public FileClientConfigTypeHandler(Class<?> type) {
super(type);
}
public FileClientConfigTypeHandler(Class<?> type, Field field) {
super(type, field);
}
@Override
protected Object parse(String json) {
public Object parse(String json) {
FileClientConfig config = JsonUtils.parseObjectQuietly(json, new TypeReference<>() {});
if (config != null) {
return config;
@ -92,7 +102,7 @@ public class FileConfigDO extends BaseDO {
}
@Override
protected String toJson(Object obj) {
public String toJson(Object obj) {
return JsonUtils.toJsonString(obj);
}