lyf666 2017-02-17 15:21:01 +08:00
parent 6ab0d64546
commit a488f167bd
1 changed files with 10 additions and 1 deletions

View File

@ -101,7 +101,16 @@ public class Controller extends com.jfinal.core.Controller {
paraMap.forEach((key, arr) -> { paraMap.forEach((key, arr) -> {
if (!"id".equals(key) && !"action".equals(key)) { if (!"id".equals(key) && !"action".equals(key)) {
if (arr.length == 1) {
ops.add(Updates.set(key, arr[0])); ops.add(Updates.set(key, arr[0]));
} else if (arr.length > 1) {
List<String> s = new ArrayList<>();
for (String s1 : arr) {
s.add(s1);
}
ops.add(Updates.set(key, s));
}
} }
}); });
} }