【fix sonar】CustomDemoConverter文件
This commit is contained in:
+6
-1
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user