Compare commits
No commits in common. 'master' and 'zgl' have entirely different histories.
@ -0,0 +1,22 @@
|
||||
com.intellij.database.serialization.ImportException: RDBMS is not specified int the model file
|
||||
at com.intellij.database.serialization.ModelImporter.deserializeModel(ModelImporter.java:57)
|
||||
at com.intellij.database.serialization.ModelSerializerKt.deserialize(ModelSerializer.kt:37)
|
||||
at com.intellij.database.serialization.ModelSerializerKt.deserialize(ModelSerializer.kt:27)
|
||||
at com.intellij.database.dataSource.DataSourceStorage.readModel(DataSourceStorage.java:683)
|
||||
at com.intellij.database.dataSource.DataSourceStorage.readModel(DataSourceStorage.java:671)
|
||||
at com.intellij.database.dataSource.DataSourceStorage.loadModels(DataSourceStorage.java:488)
|
||||
at com.intellij.database.dataSource.DataSourceStorage.access$000(DataSourceStorage.java:90)
|
||||
at com.intellij.database.dataSource.DataSourceStorage$2.run(DataSourceStorage.java:398)
|
||||
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:736)
|
||||
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
|
||||
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580)
|
||||
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
|
||||
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
|
||||
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
|
||||
at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:395)
|
||||
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
|
||||
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
|
||||
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
|
||||
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
|
||||
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
|
||||
at java.lang.Thread.run(Thread.java:745)
|
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
||||
#n:gdms
|
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="zhai_">
|
||||
<words>
|
||||
<w>mariadb</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
|
||||
</project>
|
@ -1,10 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="lib">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib" recursive="false" />
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,23 +0,0 @@
|
||||
package core.process;
|
||||
|
||||
import dao.DBManagement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public abstract class C_FillInformation extends TempProcess {
|
||||
public String getJspURL(){
|
||||
return "/home/fill_Information.jsp";
|
||||
}
|
||||
public abstract List<String> getInputName();
|
||||
public List<String[]> search() throws Exception {
|
||||
List<String> columns = new ArrayList<>();
|
||||
columns.add("*");
|
||||
Map<String,String> limits = new HashMap<>();
|
||||
limits.put("id",getGraduationDesignId());
|
||||
List<String[]> ls = DBManagement.select(columns,"graduation_design_information",limits,0,10);
|
||||
return ls;
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package core.process;
|
||||
|
||||
public abstract class C_FillSbjMsg extends TempProcess {
|
||||
public String getJspURL(){
|
||||
return "/home/fillSbjMsg.jsp";
|
||||
}
|
||||
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
package core.process;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public abstract class C_Select extends TempProcess {
|
||||
public String getJspURL(){
|
||||
return "/home/select.jsp";
|
||||
}
|
||||
public abstract List<String[]> search(String id)throws Exception;
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package core.process;
|
||||
|
||||
import core.operation.Search;
|
||||
import error.GExcptInit;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class C_StudentSearchTeacher extends TempProcess{
|
||||
String teacherID;
|
||||
|
||||
protected static String buttonName = "";
|
||||
protected static String iconURL="";
|
||||
protected static String targetURL="";
|
||||
protected static String info = "";
|
||||
static String table = "teacher";
|
||||
|
||||
Map<String,String> TeacherInfo=new HashMap<String, String>();
|
||||
public Map<String,String> search() throws Exception {
|
||||
if(!check()) throw new GExcptInit("teacherID Attrs init error!");
|
||||
Search search = new Search() ;
|
||||
search.setOptions(new HashMap<>());
|
||||
search.addOptions("table",table);
|
||||
List<String> fields = new ArrayList<>();
|
||||
fields.add("*");
|
||||
search.addOptions("field",fields);
|
||||
Map<String,String> limits = new HashMap<>();
|
||||
limits.put("id",this.getTeacherID());
|
||||
search.addOptions("limits",limits);
|
||||
search.addOptions("start",0);
|
||||
search.addOptions("end",1);
|
||||
Map<String, Object> options = search.execute(null);
|
||||
List<String[]> result = (List<String[]>) options.get("result");
|
||||
String[] s = result.get(0);
|
||||
TeacherInfo.put("id",s[0]);
|
||||
TeacherInfo.put("name",s[2]);
|
||||
TeacherInfo.put("e_mail_location",s[3]);
|
||||
TeacherInfo.put("phone_number",s[4]);
|
||||
return TeacherInfo;
|
||||
}
|
||||
public List<Map<String,String>> _search() throws Exception{
|
||||
if(!check()) throw new GExcptInit("teacherId Attrs init error!");
|
||||
Search search = new Search() ;
|
||||
search.setOptions(new HashMap<>());
|
||||
search.addOptions("table",table);
|
||||
List<String> fields = new ArrayList<>();
|
||||
fields.add("*");
|
||||
search.addOptions("field",fields);
|
||||
Map<String,String> limits = new HashMap<>();
|
||||
limits.put("id",this.getTeacherID());
|
||||
search.addOptions("limits",limits);
|
||||
search.addOptions("start",0);
|
||||
search.addOptions("end",10);
|
||||
Map<String, Object> options = search.execute(null);
|
||||
List<String[]> result = (List<String[]>) options.get("result");
|
||||
List<Map<String,String>> teachersInfo = new ArrayList<>();
|
||||
core.process.Utils.formatResult(result, teachersInfo);
|
||||
return teachersInfo;
|
||||
}
|
||||
|
||||
protected boolean check() {
|
||||
if(this.getTeacherID()==null)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public String getTeacherID(){
|
||||
return teacherID;
|
||||
}
|
||||
public void setTeacherID(String teacherID){
|
||||
this.teacherID=teacherID;
|
||||
}
|
||||
@Override
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTargetURL() {
|
||||
return targetURL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIconURL() {
|
||||
return iconURL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getButtonName() {
|
||||
return buttonName;
|
||||
}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package core.process;
|
||||
|
||||
import core.operation.Search;
|
||||
import error.GExcptInit;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class C_TeacherSearchStudent extends TempProcess {
|
||||
String studentId;
|
||||
|
||||
protected static String buttonName = "";
|
||||
protected static String iconURL="";
|
||||
protected static String targetURL="";
|
||||
protected static String info = "";
|
||||
static String table="student";
|
||||
|
||||
public Map<String,String> search() throws Exception{
|
||||
if(!check()) throw new GExcptInit("studentId Attrs init error!");
|
||||
Map<String,String> studentInfo =new HashMap<>();
|
||||
Search search = new Search() ;
|
||||
search.setOptions(new HashMap<>());
|
||||
search.addOptions("table",table);
|
||||
List<String> fields = new ArrayList<>();
|
||||
fields.add("*");
|
||||
search.addOptions("field",fields);
|
||||
Map<String,String> limits = new HashMap<>();
|
||||
limits.put("id",this.getStudentId());
|
||||
search.addOptions("limits",limits);
|
||||
search.addOptions("start",0);
|
||||
search.addOptions("end",1);
|
||||
Map<String, Object> options = search.execute(null);
|
||||
List<String[]> result = (List<String[]>) options.get("result");
|
||||
String[] s = result.get(0);
|
||||
studentInfo.put("id",s[0]);
|
||||
studentInfo.put("name",s[2]);
|
||||
studentInfo.put("e_mail_location",s[3]);
|
||||
studentInfo.put("phone_number",s[4]);
|
||||
return studentInfo;
|
||||
}
|
||||
public List<Map<String,String>> _search() throws Exception{
|
||||
if(!check()) throw new GExcptInit("studentId Attrs init error!");
|
||||
Search search = new Search() ;
|
||||
search.setOptions(new HashMap<>());
|
||||
search.addOptions("table",table);
|
||||
List<String> fields = new ArrayList<>();
|
||||
fields.add("*");
|
||||
search.addOptions("field",fields);
|
||||
Map<String,String> limits = new HashMap<>();
|
||||
limits.put("id",this.getStudentId());
|
||||
search.addOptions("limits",limits);
|
||||
search.addOptions("start",0);
|
||||
search.addOptions("end",10);
|
||||
Map<String, Object> options = search.execute(null);
|
||||
List<String[]> result = (List<String[]>) options.get("result");
|
||||
List<Map<String,String>> studentsInfo = new ArrayList<>();
|
||||
core.process.Utils.formatResult(result, studentsInfo);
|
||||
return studentsInfo;
|
||||
}
|
||||
protected boolean check() {
|
||||
if(this.getStudentId()==null)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public String getStudentId(){
|
||||
return studentId;
|
||||
}
|
||||
public void setStudentId(String studentId){
|
||||
this.studentId=studentId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTargetURL() {
|
||||
return targetURL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIconURL() {
|
||||
return iconURL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getButtonName() {
|
||||
return buttonName;
|
||||
}
|
||||
}
|
@ -1,22 +1,18 @@
|
||||
package core.process;
|
||||
|
||||
import dao.DBManagement;
|
||||
import error.GExcptSQL;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface Utils {
|
||||
static void formatResult(List<String[]> result) {
|
||||
static void formatResult(List<String[]> result, List<Map<String, String>> studentsInfo) {
|
||||
for(String[] s:result){
|
||||
s[1] = null;
|
||||
Map<String,String> studentInfo = new HashMap<>();
|
||||
studentInfo.put("id",s[0]);
|
||||
studentInfo.put("name",s[2]);
|
||||
studentInfo.put("e_mail_location",s[3]);
|
||||
studentInfo.put("phone_number",s[4]);
|
||||
studentsInfo.add(studentInfo);
|
||||
}
|
||||
}
|
||||
|
||||
static void updateStatus(String id, String table, String field) throws GExcptSQL {
|
||||
Map<String,String> limits = new HashMap<>();
|
||||
limits.put("id",id);
|
||||
DBManagement.updateStatus(table,field,"2",limits);
|
||||
}
|
||||
}
|
||||
|
@ -1,45 +0,0 @@
|
||||
package dao;
|
||||
|
||||
public class SelectAll extends SQLStmt {
|
||||
static String fs = "SELECT";
|
||||
private int startRow;
|
||||
private int endRow;
|
||||
SelectAll(String table,int startRow, int endRow) {
|
||||
super(table);
|
||||
this.setStartRow(startRow);
|
||||
this.setEndRow(endRow);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSQL() {
|
||||
return getFs()+getTs()+getLs();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getFs() {
|
||||
return fs+" * ";
|
||||
}
|
||||
private String getTs(){
|
||||
return "FROM "+this.getTable()+" ";
|
||||
}
|
||||
private String getLs(){
|
||||
String sql="LIMIT "+this.getStartRow()+", "+this.getEndRow();
|
||||
return sql;
|
||||
}
|
||||
public int getStartRow() {
|
||||
return startRow;
|
||||
}
|
||||
|
||||
public void setStartRow(int startRow) {
|
||||
this.startRow = startRow;
|
||||
}
|
||||
|
||||
public int getEndRow() {
|
||||
return endRow;
|
||||
}
|
||||
|
||||
public void setEndRow(int endRow) {
|
||||
this.endRow = endRow;
|
||||
}
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
package dao;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class UpdateStatus extends SQLStmt {
|
||||
static String fs = "UPDATE ";
|
||||
String field;
|
||||
String increment;
|
||||
Map<String,String> limits;
|
||||
public UpdateStatus(String table, String field, String increment, Map<String, String> limits) {
|
||||
super(table);
|
||||
this.setField(field);
|
||||
this.setIncrement(increment);
|
||||
this.setLimits(limits);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSQL() {
|
||||
return getFs()+getUs()+getLs();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFs() {
|
||||
return fs+this.getTable()+" ";
|
||||
}
|
||||
private String getLs(){
|
||||
return dao.Utils.whereAnd(this.getLimits());
|
||||
}
|
||||
public String getUs(){
|
||||
String us = "SET ";
|
||||
us+=this.getField()+" = "+this.getField()+" + "+this.getIncrement()+" ";
|
||||
return us;
|
||||
}
|
||||
|
||||
public String getField() {
|
||||
return field;
|
||||
}
|
||||
|
||||
public void setField(String field) {
|
||||
this.field = field;
|
||||
}
|
||||
|
||||
public String getIncrement() {
|
||||
return increment;
|
||||
}
|
||||
|
||||
public void setIncrement(String increment) {
|
||||
this.increment = increment;
|
||||
}
|
||||
|
||||
public Map<String, String> getLimits() {
|
||||
return limits;
|
||||
}
|
||||
|
||||
public void setLimits(Map<String, String> limits) {
|
||||
this.limits = limits;
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
package error;
|
||||
|
||||
public class GExcptFileIO extends GExcpt {
|
||||
public GExcptFileIO(String info) {
|
||||
super(info);
|
||||
}
|
||||
}
|
@ -1,105 +0,0 @@
|
||||
package filter;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.annotation.WebFilter;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletRequestWrapper;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebFilter(urlPatterns = "/*")
|
||||
public class CharSet implements Filter {
|
||||
public void destroy() {
|
||||
}
|
||||
|
||||
public void doFilter(ServletRequest req, ServletResponse resp,
|
||||
FilterChain chain) throws ServletException, IOException {
|
||||
HttpServletRequest httpServletRequest = (HttpServletRequest) req;
|
||||
// 对request包装增强
|
||||
HttpServletRequest myrequest = new MyRequest(httpServletRequest);
|
||||
((HttpServletResponse)resp).setContentType("text/html;charset=utf-8");
|
||||
chain.doFilter(myrequest, resp);
|
||||
|
||||
}
|
||||
|
||||
public void init(FilterConfig config) throws ServletException {
|
||||
|
||||
}
|
||||
}
|
||||
class MyRequest extends HttpServletRequestWrapper {
|
||||
|
||||
private HttpServletRequest request;
|
||||
|
||||
private boolean hasEncode;
|
||||
|
||||
public MyRequest(HttpServletRequest request) {
|
||||
super(request);
|
||||
this.request = request;
|
||||
}
|
||||
|
||||
// 对需要增强方法 进行覆盖
|
||||
@Override
|
||||
public Map<String, String[]> getParameterMap() {
|
||||
// 先获得请求方式
|
||||
String method = request.getMethod();
|
||||
if (method.equalsIgnoreCase("post")) {
|
||||
// post请求
|
||||
try {
|
||||
// 处理post乱码
|
||||
request.setCharacterEncoding("utf-8");
|
||||
return request.getParameterMap();
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else if (method.equalsIgnoreCase("get")) {
|
||||
// get请求
|
||||
Map<String, String[]> parameterMap = request.getParameterMap();
|
||||
if (!hasEncode) { // 确保get手动编码逻辑只运行一次
|
||||
for (String parameterName : parameterMap.keySet()) {
|
||||
String[] values = parameterMap.get(parameterName);
|
||||
if (values != null) {
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
try {
|
||||
// 处理get乱码
|
||||
values[i] = new String(values[i].getBytes("ISO-8859-1"), "utf-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
hasEncode = true;
|
||||
}
|
||||
return parameterMap;
|
||||
}
|
||||
|
||||
return super.getParameterMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParameter(String name) {
|
||||
Map<String, String[]> parameterMap = getParameterMap();
|
||||
String[] values = parameterMap.get(name);
|
||||
if (values == null) {
|
||||
return null;
|
||||
}
|
||||
return values[0]; // 取回参数的第一个值
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getParameterValues(String name) {
|
||||
Map<String, String[]> parameterMap = getParameterMap();
|
||||
String[] values = parameterMap.get(name);
|
||||
return values;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,13 +1,10 @@
|
||||
package gdms;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
public interface Configuration {
|
||||
//file
|
||||
String filePath = "C:/Users/zhai_/Desktop/gdms/";
|
||||
String filePath = "C:/Users/zhai_/Desktop/";
|
||||
//database
|
||||
String dbUrl="jdbc:mariadb://localhost:3306/gdms";
|
||||
String dbUsername="gdms";
|
||||
String dbPassword="GDMS";
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"teacher_choose_student_start_date":"",
|
||||
"student_choose_teacher_start_date": "",
|
||||
"choose_end_date": "",
|
||||
"opening_report_opinion_deadline_date": "",
|
||||
"finished_product_deadline_date": "",
|
||||
"finished_product_review_deadline_date": "",
|
||||
"reply_opinion_deadline_date": ""
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 816 KiB After Width: | Height: | Size: 650 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 6.0 KiB |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue