【fix sonar】ForeseeConvert文件
This commit is contained in:
+11
-10
@@ -1,17 +1,19 @@
|
||||
package com.jero.generater.modules.online.cgform.converter.convert;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.jero.common.system.vo.DictModel;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.generater.modules.online.cgform.converter.FieldCommentConverter;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class ForeseeConvert implements FieldCommentConverter {
|
||||
protected String a;
|
||||
protected List<DictModel> b;
|
||||
|
||||
public ForeseeConvert() {
|
||||
// do other
|
||||
}
|
||||
|
||||
public String getFiled() {
|
||||
@@ -30,12 +32,11 @@ public class ForeseeConvert implements FieldCommentConverter {
|
||||
this.b = dictList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String converterToVal(String txt) {
|
||||
if (oConvertUtils.isNotEmpty(txt)) {
|
||||
Iterator var2 = this.b.iterator();
|
||||
|
||||
while(var2.hasNext()) {
|
||||
DictModel var3 = (DictModel)var2.next();
|
||||
for (DictModel var3 : this.b) {
|
||||
if (var3.getText().equals(txt)) {
|
||||
return var3.getValue();
|
||||
}
|
||||
@@ -45,12 +46,11 @@ public class ForeseeConvert implements FieldCommentConverter {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String converterToTxt(String val) {
|
||||
if (oConvertUtils.isNotEmpty(val)) {
|
||||
Iterator var2 = this.b.iterator();
|
||||
|
||||
while(var2.hasNext()) {
|
||||
DictModel var3 = (DictModel)var2.next();
|
||||
for (DictModel var3 : this.b) {
|
||||
if (var3.getValue().equals(val)) {
|
||||
return var3.getText();
|
||||
}
|
||||
@@ -60,7 +60,8 @@ public class ForeseeConvert implements FieldCommentConverter {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getConfig() {
|
||||
return null;
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user