lyf666 2017-02-16 17:13:15 +08:00
parent 36dfd630f7
commit 36f91bf5e4
1 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ public class Controller extends com.jfinal.core.Controller{
String[] keysToUnset = getParaValues("keys"); String[] keysToUnset = getParaValues("keys");
List<Bson> ops = new ArrayList<>(); List<Bson> ops = new ArrayList<>();
if (action.equals("unset")) { if ("unset".equals(action)) {
for (String key : keysToUnset) { for (String key : keysToUnset) {
if (key.equals("id")) continue; if (key.equals("id")) continue;
ops.add(Updates.unset(key)); ops.add(Updates.unset(key));
@ -84,7 +84,7 @@ public class Controller extends com.jfinal.core.Controller{
Map<String, String[]> paraMap = getParaMap(); Map<String, String[]> paraMap = getParaMap();
paraMap.forEach((key, arr) -> { paraMap.forEach((key, arr) -> {
if (!key.equals("id")) { if (!"id".equals(key) && !"action".equals(key)) {
ops.add(Updates.set(key, arr[0])); ops.add(Updates.set(key, arr[0]));
} }
}); });