【fix sonar】CustomDemoConverter文件

This commit is contained in:
梁琦涛
2023-03-13 17:41:10 +08:00
parent 2e9afb05e4
commit 6ddb685152
@@ -1,18 +1,22 @@
package com.jero.generater.modules.online.cgform.converter;
import java.util.Collections;
import java.util.Map;
import org.springframework.stereotype.Component;
@Component("customDemoConverter")
public class CustomDemoConverter implements FieldCommentConverter {
public CustomDemoConverter() {
// do other
}
@Override
public String converterToVal(String txt) {
return txt != null && txt.equals("管理员1") ? "admin" : txt;
}
@Override
public String converterToTxt(String val) {
if (val != null) {
if (val.equals("admin")) {
@@ -27,7 +31,8 @@ public class CustomDemoConverter implements FieldCommentConverter {
return val;
}
@Override
public Map<String, String> getConfig() {
return null;
return Collections.emptyMap();
}
}