diff --git a/.idea/artifacts/gdms_Web_exploded.xml b/.idea/artifacts/gdms_Web_exploded.xml deleted file mode 100644 index 00e9edf..0000000 --- a/.idea/artifacts/gdms_Web_exploded.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - $PROJECT_DIR$/out/artifacts/gdms_Web_exploded - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/core/operation/Delete.java b/src/core/operation/Delete.java index f9e7acd..678aeaf 100644 --- a/src/core/operation/Delete.java +++ b/src/core/operation/Delete.java @@ -12,9 +12,7 @@ public class Delete extends Operation { public Map execute(User subject) throws GExcptSQL { Map map = new HashMap<>(); map.put("id",(String)this.getOptions().get("id")); - for(String table:DBManagement.graduationDesignTables){ - DBManagement.delete(table,map); - } + //todo return this.getOptions(); } } diff --git a/src/core/operation/Select.java b/src/core/operation/Select.java index 9d09797..7b5b6ab 100644 --- a/src/core/operation/Select.java +++ b/src/core/operation/Select.java @@ -12,17 +12,15 @@ public class Select extends Operation { @Override public Map execute(User subject) throws GExcptSQL { Map vMap = new HashMap<>(); + Map limits = new HashMap<>(); String id = (String)this.getOptions().get("student_id"); String teacher_id = (String)this.getOptions().get("teacher_id"); - vMap.put("id",id); + limits.put("id",id); vMap.put("student_id",id); vMap.put("teacher_id",teacher_id); - DBManagement.insert("graduation_design", vMap); + DBManagement.update("graduation_design", vMap,limits); vMap.remove("student_id"); vMap.remove("teacher_id"); - for(int i=1;i entry:DBManagement.allStatus.entrySet()){ - + Map vMap = new HashMap<>(); + vMap.put("id",id); + vMap.put(entry.getValue(),defaultStatus); + DBManagement.insert(entry.getKey(),vMap); } } }