diff --git a/WebRoot/WEB-INF/jsp/sunvote/instantpaper1/instantpaper1_edit.jsp b/WebRoot/WEB-INF/jsp/sunvote/instantpaper1/instantpaper1_edit.jsp
new file mode 100644
index 0000000..14cda40
--- /dev/null
+++ b/WebRoot/WEB-INF/jsp/sunvote/instantpaper1/instantpaper1_edit.jsp
@@ -0,0 +1,234 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
+<%
+ String path = request.getContextPath();
+ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
+%>
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/top.jsp"%>
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/foot.jsp"%>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/WEB-INF/jsp/sunvote/instantpaper1/instantpaper1_list.jsp b/WebRoot/WEB-INF/jsp/sunvote/instantpaper1/instantpaper1_list.jsp
new file mode 100644
index 0000000..92d2e09
--- /dev/null
+++ b/WebRoot/WEB-INF/jsp/sunvote/instantpaper1/instantpaper1_list.jsp
@@ -0,0 +1,386 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%
+ String path = request.getContextPath();
+ String basePath = request.getScheme() + "://"
+ + request.getServerName() + ":" + request.getServerPort()
+ + path + "/";
+%>
+
+
+
+
+
+
+
+<%@ include file="../../system/index/top.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/foot.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/WEB-INF/jsp/sunvote/instantpaper1content/instantpaper1content_edit.jsp b/WebRoot/WEB-INF/jsp/sunvote/instantpaper1content/instantpaper1content_edit.jsp
new file mode 100644
index 0000000..2be8d22
--- /dev/null
+++ b/WebRoot/WEB-INF/jsp/sunvote/instantpaper1content/instantpaper1content_edit.jsp
@@ -0,0 +1,164 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
+<%
+ String path = request.getContextPath();
+ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
+%>
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/top.jsp"%>
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/foot.jsp"%>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/WEB-INF/jsp/sunvote/instantpaper1content/instantpaper1content_list.jsp b/WebRoot/WEB-INF/jsp/sunvote/instantpaper1content/instantpaper1content_list.jsp
new file mode 100644
index 0000000..4343153
--- /dev/null
+++ b/WebRoot/WEB-INF/jsp/sunvote/instantpaper1content/instantpaper1content_list.jsp
@@ -0,0 +1,374 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%
+ String path = request.getContextPath();
+ String basePath = request.getScheme() + "://"
+ + request.getServerName() + ":" + request.getServerPort()
+ + path + "/";
+%>
+
+
+
+
+
+
+
+<%@ include file="../../system/index/top.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/foot.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/WEB-INF/jsp/sunvote/instantquestiondatasource1/instantquestiondatasource1_edit.jsp b/WebRoot/WEB-INF/jsp/sunvote/instantquestiondatasource1/instantquestiondatasource1_edit.jsp
new file mode 100644
index 0000000..fd894c2
--- /dev/null
+++ b/WebRoot/WEB-INF/jsp/sunvote/instantquestiondatasource1/instantquestiondatasource1_edit.jsp
@@ -0,0 +1,248 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
+<%
+ String path = request.getContextPath();
+ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
+%>
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/top.jsp"%>
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/foot.jsp"%>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/WEB-INF/jsp/sunvote/instantquestiondatasource1/instantquestiondatasource1_list.jsp b/WebRoot/WEB-INF/jsp/sunvote/instantquestiondatasource1/instantquestiondatasource1_list.jsp
new file mode 100644
index 0000000..6c965d1
--- /dev/null
+++ b/WebRoot/WEB-INF/jsp/sunvote/instantquestiondatasource1/instantquestiondatasource1_list.jsp
@@ -0,0 +1,386 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%
+ String path = request.getContextPath();
+ String basePath = request.getScheme() + "://"
+ + request.getServerName() + ":" + request.getServerPort()
+ + path + "/";
+%>
+
+
+
+
+
+
+
+<%@ include file="../../system/index/top.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/foot.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/WEB-INF/jsp/sunvote/paperanswer1/paperanswer1_edit.jsp b/WebRoot/WEB-INF/jsp/sunvote/paperanswer1/paperanswer1_edit.jsp
new file mode 100644
index 0000000..c682a66
--- /dev/null
+++ b/WebRoot/WEB-INF/jsp/sunvote/paperanswer1/paperanswer1_edit.jsp
@@ -0,0 +1,234 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
+<%
+ String path = request.getContextPath();
+ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
+%>
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/top.jsp"%>
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/foot.jsp"%>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/WEB-INF/jsp/sunvote/paperanswer1/paperanswer1_list.jsp b/WebRoot/WEB-INF/jsp/sunvote/paperanswer1/paperanswer1_list.jsp
new file mode 100644
index 0000000..157d6fb
--- /dev/null
+++ b/WebRoot/WEB-INF/jsp/sunvote/paperanswer1/paperanswer1_list.jsp
@@ -0,0 +1,384 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%
+ String path = request.getContextPath();
+ String basePath = request.getScheme() + "://"
+ + request.getServerName() + ":" + request.getServerPort()
+ + path + "/";
+%>
+
+
+
+
+
+
+
+<%@ include file="../../system/index/top.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/foot.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/WEB-INF/jsp/sunvote/studentanswer1/studentanswer1_edit.jsp b/WebRoot/WEB-INF/jsp/sunvote/studentanswer1/studentanswer1_edit.jsp
new file mode 100644
index 0000000..8b2c8d1
--- /dev/null
+++ b/WebRoot/WEB-INF/jsp/sunvote/studentanswer1/studentanswer1_edit.jsp
@@ -0,0 +1,220 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
+<%
+ String path = request.getContextPath();
+ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
+%>
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/top.jsp"%>
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/foot.jsp"%>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/WEB-INF/jsp/sunvote/studentanswer1/studentanswer1_list.jsp b/WebRoot/WEB-INF/jsp/sunvote/studentanswer1/studentanswer1_list.jsp
new file mode 100644
index 0000000..854f2c9
--- /dev/null
+++ b/WebRoot/WEB-INF/jsp/sunvote/studentanswer1/studentanswer1_list.jsp
@@ -0,0 +1,382 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%
+ String path = request.getContextPath();
+ String basePath = request.getScheme() + "://"
+ + request.getServerName() + ":" + request.getServerPort()
+ + path + "/";
+%>
+
+
+
+
+
+
+
+<%@ include file="../../system/index/top.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/foot.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/mybatis1/sunvote/InstantPaper1ContentMapper.xml b/resources/mybatis1/sunvote/InstantPaper1ContentMapper.xml
new file mode 100644
index 0000000..429ecdb
--- /dev/null
+++ b/resources/mybatis1/sunvote/InstantPaper1ContentMapper.xml
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+ SV_INSTANTPAPER1CONTENT
+
+
+
+
+ PAPER_ID,
+ QUESTION_ID,
+ RANK,
+ TITLE,
+ SCORE,
+ REMARK,
+ INSTANTPAPER1CONTENT_ID
+
+
+
+
+ #{PAPER_ID},
+ #{QUESTION_ID},
+ #{RANK},
+ #{TITLE},
+ #{SCORE},
+ #{REMARK},
+ #{INSTANTPAPER1CONTENT_ID}
+
+
+
+
+ insert into
+
+ (
+
+ ) values (
+
+ )
+
+
+
+
+ delete from
+
+ where
+ INSTANTPAPER1CONTENT_ID = #{INSTANTPAPER1CONTENT_ID}
+
+
+
+
+ update
+
+ set
+ PAPER_ID = #{PAPER_ID},
+ QUESTION_ID = #{QUESTION_ID},
+ RANK = #{RANK},
+ TITLE = #{TITLE},
+ SCORE = #{SCORE},
+ REMARK = #{REMARK},
+ INSTANTPAPER1CONTENT_ID = INSTANTPAPER1CONTENT_ID
+ where
+ INSTANTPAPER1CONTENT_ID = #{INSTANTPAPER1CONTENT_ID}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ delete from
+
+ where
+ INSTANTPAPER1CONTENT_ID in
+
+ #{item}
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/mybatis1/sunvote/InstantPaper1Mapper.xml b/resources/mybatis1/sunvote/InstantPaper1Mapper.xml
new file mode 100644
index 0000000..d106f4c
--- /dev/null
+++ b/resources/mybatis1/sunvote/InstantPaper1Mapper.xml
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+ SV_INSTANTPAPER1
+
+
+
+
+ PAPER_NAME,
+ TAG,
+ PERMISSION,
+ SUBJECT_ID,
+ GRADE_ID,
+ CLASS_ID,
+ SCHOOL_ID,
+ COMBINATION,
+ PAPER_SCORE,
+ USER_ID,
+ CREATE_TIME,
+ COUNT,
+ INSTANTPAPER1_ID
+
+
+
+
+ #{PAPER_NAME},
+ #{TAG},
+ #{PERMISSION},
+ #{SUBJECT_ID},
+ #{GRADE_ID},
+ #{CLASS_ID},
+ #{SCHOOL_ID},
+ #{COMBINATION},
+ #{PAPER_SCORE},
+ #{USER_ID},
+ #{CREATE_TIME},
+ #{COUNT},
+ #{INSTANTPAPER1_ID}
+
+
+
+
+ insert into
+
+ (
+
+ ) values (
+
+ )
+
+
+
+
+ delete from
+
+ where
+ INSTANTPAPER1_ID = #{INSTANTPAPER1_ID}
+
+
+
+
+ update
+
+ set
+ PAPER_NAME = #{PAPER_NAME},
+ TAG = #{TAG},
+ PERMISSION = #{PERMISSION},
+ SUBJECT_ID = #{SUBJECT_ID},
+ GRADE_ID = #{GRADE_ID},
+ CLASS_ID = #{CLASS_ID},
+ SCHOOL_ID = #{SCHOOL_ID},
+ COMBINATION = #{COMBINATION},
+ PAPER_SCORE = #{PAPER_SCORE},
+ USER_ID = #{USER_ID},
+ COUNT = #{COUNT},
+ INSTANTPAPER1_ID = INSTANTPAPER1_ID
+ where
+ INSTANTPAPER1_ID = #{INSTANTPAPER1_ID}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ delete from
+
+ where
+ INSTANTPAPER1_ID in
+
+ #{item}
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/mybatis1/sunvote/InstantQuestionDataSource1Mapper.xml b/resources/mybatis1/sunvote/InstantQuestionDataSource1Mapper.xml
new file mode 100644
index 0000000..befe19d
--- /dev/null
+++ b/resources/mybatis1/sunvote/InstantQuestionDataSource1Mapper.xml
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+ SV_INSTANTQUESTIONDATASOURCE1
+
+
+
+
+ IMAGE_URL,
+ SCORE,
+ ANSWER_CONTENT,
+ RIGHT_ANSWER,
+ TAG,
+ PERMISSION,
+ SUBJECT_ID,
+ GRADE_ID,
+ SCHOOL_ID,
+ USER_ID,
+ 创建时间,
+ CLASS_ID,
+ INSTANTQUESTIONDATASOURCE1_ID
+
+
+
+
+ #{IMAGE_URL},
+ #{SCORE},
+ #{ANSWER_CONTENT},
+ #{RIGHT_ANSWER},
+ #{TAG},
+ #{PERMISSION},
+ #{SUBJECT_ID},
+ #{GRADE_ID},
+ #{SCHOOL_ID},
+ #{USER_ID},
+ #{创建时间},
+ #{CLASS_ID},
+ #{INSTANTQUESTIONDATASOURCE1_ID}
+
+
+
+
+ insert into
+
+ (
+
+ ) values (
+
+ )
+
+
+
+
+ delete from
+
+ where
+ INSTANTQUESTIONDATASOURCE1_ID = #{INSTANTQUESTIONDATASOURCE1_ID}
+
+
+
+
+ update
+
+ set
+ IMAGE_URL = #{IMAGE_URL},
+ SCORE = #{SCORE},
+ ANSWER_CONTENT = #{ANSWER_CONTENT},
+ RIGHT_ANSWER = #{RIGHT_ANSWER},
+ TAG = #{TAG},
+ PERMISSION = #{PERMISSION},
+ SUBJECT_ID = #{SUBJECT_ID},
+ GRADE_ID = #{GRADE_ID},
+ SCHOOL_ID = #{SCHOOL_ID},
+ USER_ID = #{USER_ID},
+ 创建时间 = #{创建时间},
+ CLASS_ID = #{CLASS_ID},
+ INSTANTQUESTIONDATASOURCE1_ID = INSTANTQUESTIONDATASOURCE1_ID
+ where
+ INSTANTQUESTIONDATASOURCE1_ID = #{INSTANTQUESTIONDATASOURCE1_ID}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ delete from
+
+ where
+ INSTANTQUESTIONDATASOURCE1_ID in
+
+ #{item}
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/mybatis1/sunvote/PaperAnswer1Mapper.xml b/resources/mybatis1/sunvote/PaperAnswer1Mapper.xml
new file mode 100644
index 0000000..466c609
--- /dev/null
+++ b/resources/mybatis1/sunvote/PaperAnswer1Mapper.xml
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+ SV_PAPERANSWER1
+
+
+
+
+ PAPER_ID,
+ PAPER_NAME,
+ SUBJECT_ID,
+ CLASS_ID,
+ GRADE_ID,
+ SCHOOL_ID,
+ USER_ID,
+ CREATE_DATE,
+ AVG_SCORE,
+ HIGHT_SCORE,
+ REMARK,
+ PAPERANSWER1_ID
+
+
+
+
+ #{PAPER_ID},
+ #{PAPER_NAME},
+ #{SUBJECT_ID},
+ #{CLASS_ID},
+ #{GRADE_ID},
+ #{SCHOOL_ID},
+ #{USER_ID},
+ #{CREATE_DATE},
+ #{AVG_SCORE},
+ #{HIGHT_SCORE},
+ #{REMARK},
+ #{PAPERANSWER1_ID}
+
+
+
+
+ insert into
+
+ (
+
+ ) values (
+
+ )
+
+
+
+
+ delete from
+
+ where
+ PAPERANSWER1_ID = #{PAPERANSWER1_ID}
+
+
+
+
+ update
+
+ set
+ PAPER_ID = #{PAPER_ID},
+ PAPER_NAME = #{PAPER_NAME},
+ SUBJECT_ID = #{SUBJECT_ID},
+ CLASS_ID = #{CLASS_ID},
+ GRADE_ID = #{GRADE_ID},
+ SCHOOL_ID = #{SCHOOL_ID},
+ USER_ID = #{USER_ID},
+ CREATE_DATE = #{CREATE_DATE},
+ AVG_SCORE = #{AVG_SCORE},
+ HIGHT_SCORE = #{HIGHT_SCORE},
+ REMARK = #{REMARK},
+ PAPERANSWER1_ID = PAPERANSWER1_ID
+ where
+ PAPERANSWER1_ID = #{PAPERANSWER1_ID}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ delete from
+
+ where
+ PAPERANSWER1_ID in
+
+ #{item}
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/mybatis1/sunvote/StudentAnswer1Mapper.xml b/resources/mybatis1/sunvote/StudentAnswer1Mapper.xml
new file mode 100644
index 0000000..da59474
--- /dev/null
+++ b/resources/mybatis1/sunvote/StudentAnswer1Mapper.xml
@@ -0,0 +1,128 @@
+
+
+
+
+
+
+ SV_STUDENTANSWER1
+
+
+
+
+ STUDENT_ID,
+ STUDENT_NAME,
+ STUDENT_NO,
+ CONTENT,
+ GET_SCORE,
+ PAPER_ID,
+ ANSWER_ID,
+ CLASS_ID,
+ GRADE_ID,
+ SCHOOL_ID,
+ STUDENTANSWER1_ID
+
+
+
+
+ #{STUDENT_ID},
+ #{STUDENT_NAME},
+ #{STUDENT_NO},
+ #{CONTENT},
+ #{GET_SCORE},
+ #{PAPER_ID},
+ #{ANSWER_ID},
+ #{CLASS_ID},
+ #{GRADE_ID},
+ #{SCHOOL_ID},
+ #{STUDENTANSWER1_ID}
+
+
+
+
+ insert into
+
+ (
+
+ ) values (
+
+ )
+
+
+
+
+ delete from
+
+ where
+ STUDENTANSWER1_ID = #{STUDENTANSWER1_ID}
+
+
+
+
+ update
+
+ set
+ STUDENT_ID = #{STUDENT_ID},
+ STUDENT_NAME = #{STUDENT_NAME},
+ STUDENT_NO = #{STUDENT_NO},
+ CONTENT = #{CONTENT},
+ GET_SCORE = #{GET_SCORE},
+ PAPER_ID = #{PAPER_ID},
+ ANSWER_ID = #{ANSWER_ID},
+ CLASS_ID = #{CLASS_ID},
+ GRADE_ID = #{GRADE_ID},
+ SCHOOL_ID = #{SCHOOL_ID},
+ STUDENTANSWER1_ID = STUDENTANSWER1_ID
+ where
+ STUDENTANSWER1_ID = #{STUDENTANSWER1_ID}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ delete from
+
+ where
+ STUDENTANSWER1_ID in
+
+ #{item}
+
+
+
+
+
\ No newline at end of file
diff --git a/src/com/fh/controller/base/BaseController.java b/src/com/fh/controller/base/BaseController.java
index 64d15e7..510cc91 100644
--- a/src/com/fh/controller/base/BaseController.java
+++ b/src/com/fh/controller/base/BaseController.java
@@ -203,9 +203,9 @@ public class BaseController {
String lang = getCookieLanguage();
if (lang == null) {
lang = getRequest().getLocale().getLanguage();
+ Cookie cookies = new Cookie("lang", lang);
+ getResponse().addCookie(cookies);
}
- Cookie cookies = new Cookie("lang", lang);
- getResponse().addCookie(cookies);
return lang;
}
diff --git a/src/com/fh/controller/sunvote/instantpaper1/InstantPaper1Controller.java b/src/com/fh/controller/sunvote/instantpaper1/InstantPaper1Controller.java
new file mode 100644
index 0000000..217b0e2
--- /dev/null
+++ b/src/com/fh/controller/sunvote/instantpaper1/InstantPaper1Controller.java
@@ -0,0 +1,228 @@
+package com.fh.controller.sunvote.instantpaper1;
+
+import java.io.PrintWriter;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Resource;
+import org.springframework.beans.propertyeditors.CustomDateEditor;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.WebDataBinder;
+import org.springframework.web.bind.annotation.InitBinder;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+import com.fh.controller.base.BaseController;
+import com.fh.entity.Page;
+import com.fh.util.AppUtil;
+import com.fh.util.ObjectExcelView;
+import com.fh.util.PageData;
+import com.fh.util.Jurisdiction;
+import com.fh.util.Tools;
+import com.fh.service.sunvote.instantpaper1.InstantPaper1Manager;
+
+/**
+ * 说明:即时测1试卷
+ * 创建人:FH Q313596790
+ * 创建时间:2019-05-29
+ */
+@Controller
+@RequestMapping(value="/instantpaper1")
+public class InstantPaper1Controller extends BaseController {
+
+ String menuUrl = "instantpaper1/list.do"; //菜单地址(权限用)
+ @Resource(name="instantpaper1Service")
+ private InstantPaper1Manager instantpaper1Service;
+
+ /**保存
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/save")
+ public ModelAndView save() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"新增InstantPaper1");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ pd.put("INSTANTPAPER1_ID", this.get32UUID()); //主键
+ pd.put("CREATE_TIME", Tools.date2Str(new Date())); //创建时间
+ instantpaper1Service.save(pd);
+ mv.addObject("msg","success");
+ mv.setViewName("save_result");
+ return mv;
+ }
+
+ /**删除
+ * @param out
+ * @throws Exception
+ */
+ @RequestMapping(value="/delete")
+ public void delete(PrintWriter out) throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"删除InstantPaper1");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ instantpaper1Service.delete(pd);
+ out.write("success");
+ out.close();
+ }
+
+ /**修改
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/edit")
+ public ModelAndView edit() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"修改InstantPaper1");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ instantpaper1Service.edit(pd);
+ mv.addObject("msg","success");
+ mv.setViewName("save_result");
+ return mv;
+ }
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ @RequestMapping(value="/list")
+ public ModelAndView list(Page page) throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"列表InstantPaper1");
+ //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码)
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ String keywords = pd.getString("keywords"); //关键词检索条件
+ if(null != keywords && !"".equals(keywords)){
+ pd.put("keywords", keywords.trim());
+ }
+ page.setPd(pd);
+ List varList = instantpaper1Service.list(page); //列出InstantPaper1列表
+ mv.setViewName("sunvote/instantpaper1/instantpaper1_list");
+ mv.addObject("varList", varList);
+ mv.addObject("pd", pd);
+ mv.addObject("QX",Jurisdiction.getHC()); //按钮权限
+ return mv;
+ }
+
+ /**去新增页面
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/goAdd")
+ public ModelAndView goAdd()throws Exception{
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ mv.setViewName("sunvote/instantpaper1/instantpaper1_edit");
+ mv.addObject("msg", "save");
+ mv.addObject("pd", pd);
+ return mv;
+ }
+
+ /**去修改页面
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/goEdit")
+ public ModelAndView goEdit()throws Exception{
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ pd = instantpaper1Service.findById(pd); //根据ID读取
+ mv.setViewName("sunvote/instantpaper1/instantpaper1_edit");
+ mv.addObject("msg", "edit");
+ mv.addObject("pd", pd);
+ return mv;
+ }
+
+ /**批量删除
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/deleteAll")
+ @ResponseBody
+ public Object deleteAll() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"批量删除InstantPaper1");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限
+ PageData pd = new PageData();
+ Map map = new HashMap();
+ pd = this.getPageData();
+ List pdList = new ArrayList();
+ String DATA_IDS = pd.getString("DATA_IDS");
+ if(null != DATA_IDS && !"".equals(DATA_IDS)){
+ String ArrayDATA_IDS[] = DATA_IDS.split(",");
+ instantpaper1Service.deleteAll(ArrayDATA_IDS);
+ pd.put("msg", "ok");
+ }else{
+ pd.put("msg", "no");
+ }
+ pdList.add(pd);
+ map.put("list", pdList);
+ return AppUtil.returnObject(pd, map);
+ }
+
+ /**导出到excel
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/excel")
+ public ModelAndView exportExcel() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"导出InstantPaper1到excel");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;}
+ ModelAndView mv = new ModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ Map dataMap = new HashMap();
+ List titles = new ArrayList();
+ titles.add("试卷名称"); //1
+ titles.add("标签"); //2
+ titles.add("权限"); //3
+ titles.add("科目"); //4
+ titles.add("年级"); //5
+ titles.add("班级"); //6
+ titles.add("学校"); //7
+ titles.add("是否组合试卷"); //8
+ titles.add("试卷总分"); //9
+ titles.add("用户"); //10
+ titles.add("创建时间"); //11
+ titles.add("考试次数"); //12
+ dataMap.put("titles", titles);
+ List varOList = instantpaper1Service.listAll(pd);
+ List varList = new ArrayList();
+ for(int i=0;i varList = instantpaper1contentService.list(page); //列出InstantPaper1Content列表
+ mv.setViewName("sunvote/instantpaper1content/instantpaper1content_list");
+ mv.addObject("varList", varList);
+ mv.addObject("pd", pd);
+ mv.addObject("QX",Jurisdiction.getHC()); //按钮权限
+ return mv;
+ }
+
+ /**去新增页面
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/goAdd")
+ public ModelAndView goAdd()throws Exception{
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ mv.setViewName("sunvote/instantpaper1content/instantpaper1content_edit");
+ mv.addObject("msg", "save");
+ mv.addObject("pd", pd);
+ return mv;
+ }
+
+ /**去修改页面
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/goEdit")
+ public ModelAndView goEdit()throws Exception{
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ pd = instantpaper1contentService.findById(pd); //根据ID读取
+ mv.setViewName("sunvote/instantpaper1content/instantpaper1content_edit");
+ mv.addObject("msg", "edit");
+ mv.addObject("pd", pd);
+ return mv;
+ }
+
+ /**批量删除
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/deleteAll")
+ @ResponseBody
+ public Object deleteAll() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"批量删除InstantPaper1Content");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限
+ PageData pd = new PageData();
+ Map map = new HashMap();
+ pd = this.getPageData();
+ List pdList = new ArrayList();
+ String DATA_IDS = pd.getString("DATA_IDS");
+ if(null != DATA_IDS && !"".equals(DATA_IDS)){
+ String ArrayDATA_IDS[] = DATA_IDS.split(",");
+ instantpaper1contentService.deleteAll(ArrayDATA_IDS);
+ pd.put("msg", "ok");
+ }else{
+ pd.put("msg", "no");
+ }
+ pdList.add(pd);
+ map.put("list", pdList);
+ return AppUtil.returnObject(pd, map);
+ }
+
+ /**导出到excel
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/excel")
+ public ModelAndView exportExcel() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"导出InstantPaper1Content到excel");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;}
+ ModelAndView mv = new ModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ Map dataMap = new HashMap();
+ List titles = new ArrayList();
+ titles.add("试卷"); //1
+ titles.add("试题"); //2
+ titles.add("排序"); //3
+ titles.add("题号"); //4
+ titles.add("分数"); //5
+ titles.add("说明"); //6
+ dataMap.put("titles", titles);
+ List varOList = instantpaper1contentService.listAll(pd);
+ List varList = new ArrayList();
+ for(int i=0;i varList = instantquestiondatasource1Service.list(page); //列出InstantQuestionDataSource1列表
+ mv.setViewName("sunvote/instantquestiondatasource1/instantquestiondatasource1_list");
+ mv.addObject("varList", varList);
+ mv.addObject("pd", pd);
+ mv.addObject("QX",Jurisdiction.getHC()); //按钮权限
+ return mv;
+ }
+
+ /**去新增页面
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/goAdd")
+ public ModelAndView goAdd()throws Exception{
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ mv.setViewName("sunvote/instantquestiondatasource1/instantquestiondatasource1_edit");
+ mv.addObject("msg", "save");
+ mv.addObject("pd", pd);
+ return mv;
+ }
+
+ /**去修改页面
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/goEdit")
+ public ModelAndView goEdit()throws Exception{
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ pd = instantquestiondatasource1Service.findById(pd); //根据ID读取
+ mv.setViewName("sunvote/instantquestiondatasource1/instantquestiondatasource1_edit");
+ mv.addObject("msg", "edit");
+ mv.addObject("pd", pd);
+ return mv;
+ }
+
+ /**批量删除
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/deleteAll")
+ @ResponseBody
+ public Object deleteAll() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"批量删除InstantQuestionDataSource1");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限
+ PageData pd = new PageData();
+ Map map = new HashMap();
+ pd = this.getPageData();
+ List pdList = new ArrayList();
+ String DATA_IDS = pd.getString("DATA_IDS");
+ if(null != DATA_IDS && !"".equals(DATA_IDS)){
+ String ArrayDATA_IDS[] = DATA_IDS.split(",");
+ instantquestiondatasource1Service.deleteAll(ArrayDATA_IDS);
+ pd.put("msg", "ok");
+ }else{
+ pd.put("msg", "no");
+ }
+ pdList.add(pd);
+ map.put("list", pdList);
+ return AppUtil.returnObject(pd, map);
+ }
+
+ /**导出到excel
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/excel")
+ public ModelAndView exportExcel() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"导出InstantQuestionDataSource1到excel");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;}
+ ModelAndView mv = new ModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ Map dataMap = new HashMap();
+ List titles = new ArrayList();
+ titles.add("图片路径"); //1
+ titles.add("分数"); //2
+ titles.add("答案内容"); //3
+ titles.add("标准答案"); //4
+ titles.add("标签"); //5
+ titles.add("权限"); //6
+ titles.add("科目"); //7
+ titles.add("年级"); //8
+ titles.add("学校"); //9
+ titles.add("用户ID"); //10
+ titles.add("create_time"); //11
+ titles.add("班级"); //12
+ dataMap.put("titles", titles);
+ List varOList = instantquestiondatasource1Service.listAll(pd);
+ List varList = new ArrayList();
+ for(int i=0;i varList = paperanswer1Service.list(page); //列出PaperAnswer1列表
+ mv.setViewName("sunvote/paperanswer1/paperanswer1_list");
+ mv.addObject("varList", varList);
+ mv.addObject("pd", pd);
+ mv.addObject("QX",Jurisdiction.getHC()); //按钮权限
+ return mv;
+ }
+
+ /**去新增页面
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/goAdd")
+ public ModelAndView goAdd()throws Exception{
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ mv.setViewName("sunvote/paperanswer1/paperanswer1_edit");
+ mv.addObject("msg", "save");
+ mv.addObject("pd", pd);
+ return mv;
+ }
+
+ /**去修改页面
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/goEdit")
+ public ModelAndView goEdit()throws Exception{
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ pd = paperanswer1Service.findById(pd); //根据ID读取
+ mv.setViewName("sunvote/paperanswer1/paperanswer1_edit");
+ mv.addObject("msg", "edit");
+ mv.addObject("pd", pd);
+ return mv;
+ }
+
+ /**批量删除
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/deleteAll")
+ @ResponseBody
+ public Object deleteAll() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"批量删除PaperAnswer1");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限
+ PageData pd = new PageData();
+ Map map = new HashMap();
+ pd = this.getPageData();
+ List pdList = new ArrayList();
+ String DATA_IDS = pd.getString("DATA_IDS");
+ if(null != DATA_IDS && !"".equals(DATA_IDS)){
+ String ArrayDATA_IDS[] = DATA_IDS.split(",");
+ paperanswer1Service.deleteAll(ArrayDATA_IDS);
+ pd.put("msg", "ok");
+ }else{
+ pd.put("msg", "no");
+ }
+ pdList.add(pd);
+ map.put("list", pdList);
+ return AppUtil.returnObject(pd, map);
+ }
+
+ /**导出到excel
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/excel")
+ public ModelAndView exportExcel() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"导出PaperAnswer1到excel");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;}
+ ModelAndView mv = new ModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ Map dataMap = new HashMap();
+ List titles = new ArrayList();
+ titles.add("试卷"); //1
+ titles.add("试卷名称"); //2
+ titles.add("科目"); //3
+ titles.add("班级ID"); //4
+ titles.add("年级"); //5
+ titles.add("学校"); //6
+ titles.add("创建者"); //7
+ titles.add("考试时间"); //8
+ titles.add("平均分"); //9
+ titles.add("最高分"); //10
+ titles.add("备注"); //11
+ dataMap.put("titles", titles);
+ List varOList = paperanswer1Service.listAll(pd);
+ List varList = new ArrayList();
+ for(int i=0;i varList = studentanswer1Service.list(page); //列出StudentAnswer1列表
+ mv.setViewName("sunvote/studentanswer1/studentanswer1_list");
+ mv.addObject("varList", varList);
+ mv.addObject("pd", pd);
+ mv.addObject("QX",Jurisdiction.getHC()); //按钮权限
+ return mv;
+ }
+
+ /**去新增页面
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/goAdd")
+ public ModelAndView goAdd()throws Exception{
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ mv.setViewName("sunvote/studentanswer1/studentanswer1_edit");
+ mv.addObject("msg", "save");
+ mv.addObject("pd", pd);
+ return mv;
+ }
+
+ /**去修改页面
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/goEdit")
+ public ModelAndView goEdit()throws Exception{
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ pd = studentanswer1Service.findById(pd); //根据ID读取
+ mv.setViewName("sunvote/studentanswer1/studentanswer1_edit");
+ mv.addObject("msg", "edit");
+ mv.addObject("pd", pd);
+ return mv;
+ }
+
+ /**批量删除
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/deleteAll")
+ @ResponseBody
+ public Object deleteAll() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"批量删除StudentAnswer1");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限
+ PageData pd = new PageData();
+ Map map = new HashMap();
+ pd = this.getPageData();
+ List pdList = new ArrayList();
+ String DATA_IDS = pd.getString("DATA_IDS");
+ if(null != DATA_IDS && !"".equals(DATA_IDS)){
+ String ArrayDATA_IDS[] = DATA_IDS.split(",");
+ studentanswer1Service.deleteAll(ArrayDATA_IDS);
+ pd.put("msg", "ok");
+ }else{
+ pd.put("msg", "no");
+ }
+ pdList.add(pd);
+ map.put("list", pdList);
+ return AppUtil.returnObject(pd, map);
+ }
+
+ /**导出到excel
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/excel")
+ public ModelAndView exportExcel() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"导出StudentAnswer1到excel");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;}
+ ModelAndView mv = new ModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ Map dataMap = new HashMap();
+ List titles = new ArrayList();
+ titles.add("学生"); //1
+ titles.add("学生姓名"); //2
+ titles.add("学生学号"); //3
+ titles.add("答案内容(正确与否)"); //4
+ titles.add("学生得分"); //5
+ titles.add("试卷"); //6
+ titles.add("答卷ID"); //7
+ titles.add("班级ID"); //8
+ titles.add("年级ID"); //9
+ titles.add("学校ID"); //10
+ dataMap.put("titles", titles);
+ List varOList = studentanswer1Service.listAll(pd);
+ List varList = new ArrayList();
+ for(int i=0;i list = new ArrayList();
+
+ public TestClient(int port) throws UnknownHostException {
+ super(new InetSocketAddress(port));
+ }
+
+ public TestClient(InetSocketAddress address) {
+ super(address);
+ }
+
+ /**
+ * 触发连接事件
+ */
+ @Override
+ public void onOpen( WebSocket conn, ClientHandshake handshake ) {
+ //this.sendToAll( "new connection: " + handshake.getResourceDescriptor() );
+ //System.out.println("===" + conn.getRemoteSocketAddress().getAddress().getHostAddress());
+ list.add(conn);
+ }
+
+ /**
+ * 触发关闭事件
+ */
+ @Override
+ public void onClose( WebSocket conn, int code, String reason, boolean remote ) {
+ list.remove(conn);
+ }
+
+ /**
+ * 客户端发送消息到服务器时触发事件
+ */
+ @Override
+ public void onMessage(WebSocket conn, String message){
+ for(WebSocket w:list){
+ if(w != conn){
+ w.send(message);
+ }
+ }
+ }
+
+ public void onFragment( WebSocket conn, Framedata fragment ) {
+ }
+
+ /**
+ * 触发异常事件
+ */
+ @Override
+ public void onError( WebSocket conn, Exception ex ) {
+ try{
+ conn.close(0);
+ }catch(Exception e){}
+ list.remove(conn);
+ }
+
+
+ /**
+ * 用户加入处理
+ * @param user
+ */
+ public void userjoin(String user, WebSocket conn){
+ JSONObject result = new JSONObject();
+ result.element("type", "user_join");
+ result.element("user", ""+user+"");
+ ChatServerPool.sendMessage(result.toString()); //把当前用户加入到所有在线用户列表中
+ String joinMsg = "{\"from\":\"[系统]\",\"content\":\""+user+"上线了\",\"timestamp\":"+new Date().getTime()+",\"type\":\"message\"}";
+ ChatServerPool.sendMessage(joinMsg); //向所有在线用户推送当前用户上线的消息
+ result = new JSONObject();
+ result.element("type", "get_online_user");
+ ChatServerPool.addUser(user,conn); //向连接池添加当前的连接对象
+ result.element("list", ChatServerPool.getOnlineUser());
+ ChatServerPool.sendMessageToUser(conn, result.toString()); //向当前连接发送当前在线用户的列表
+ }
+
+ /**
+ * 用户下线处理
+ * @param user
+ */
+ public void userLeave(WebSocket conn){
+// String user = ChatServerPool.getUserByKey(conn);
+ boolean b = ChatServerPool.removeUser(conn); //在连接池中移除连接
+// if(b){
+// JSONObject result = new JSONObject();
+// result.element("type", "user_leave");
+// result.element("user", ""+user+"");
+// ChatServerPool.sendMessage(result.toString()); //把当前用户从所有在线用户列表中删除
+// String joinMsg = "{\"from\":\"[系统]\",\"content\":\""+user+"下线了\",\"timestamp\":"+new Date().getTime()+",\"type\":\"message\"}";
+// ChatServerPool.sendMessage(joinMsg); //向在线用户发送当前用户退出的消息
+// }
+ }
+ public static void main( String[] args ) throws Exception {
+// WebSocketImpl.DEBUG = false;
+// int port = 8887; //端口
+// ChatServer s = new ChatServer(port);
+// s.start();
+ //System.out.println( "服务器的端口" + s.getPort() );
+ testClient();
+ Scanner scanner = new Scanner(System.in);
+ while(true){
+ String text = scanner.next();
+ if("close".equals(text.toLowerCase())){
+ try{
+ client.close();
+ }catch(Exception ex){
+
+ }
+ break;
+ }
+ if("1".equals(text)){
+ System.out.println("{\"from\":\"assistant1\",\"role\":\"assistant\",\"to\": \"server\",\"cmd\": \"login\",\"msg\": {}}");
+ client.send("{\"from\":\"assistant1\",\"role\":\"assistant\",\"to\": \"server\",\"cmd\": \"login\",\"msg\": {}}");
+ }else if("2".equals(text)){
+ System.out.println("{\"from\":\"assistant1\",\"role\":\"assistant\",\"to\": \"server\",\"cmd\": \"attend\",\"msg\":{\"list\": ['yw']}}");
+ client.send("{\"from\":\"assistant1\",\"role\":\"assistant\",\"to\": \"server\",\"cmd\": \"attend\",\"msg\":{\"list\": ['yw']}}");
+ }else if("3".equals(text)){
+ System.out.println("{\"from\":\"assistant1\",\"role\":\"assistant\",\"to\": \"teacher1\",\"cmd\": \"attend\",\"msg\":{\"list\": ['yw']}}");
+ client.send("{\"from\":\"assistant1\",\"role\":\"assistant\",\"to\": \"teacher1\",\"cmd\": \"attend\",\"msg\":{\"list\": ['yw']}}");
+ }else{
+ System.out.println(text);
+ client.send(text);
+ }
+ }
+ }
+
+ public static WebSocketClient client;
+
+ public static void testClient() throws Exception{
+ client = new WebSocketClient(new URI("ws://120.78.57.84:8888/stw/echo"),new Draft_17()) {
+ @Override
+ public void onOpen(ServerHandshake arg0) {
+ System.out.println("{\"from\":\"assistant1\",\"role\":\"assistant\",\"to\": \"server\",\"cmd\": \"login\",\"msg\": {}}");
+ client.send("{\"from\":\"assistant1\",\"role\":\"assistant\",\"to\": \"server\",\"cmd\": \"login\",\"msg\": {}}");
+ }
+
+ @Override
+ public void onMessage(String arg0) {
+ System.out.println(arg0);
+ }
+
+ @Override
+ public void onError(Exception arg0) {
+ arg0.printStackTrace();
+ System.out.println("发生错误已关闭");
+ }
+
+ @Override
+ public void onClose(int arg0, String arg1, boolean arg2) {
+ System.out.println("链接已关闭");
+ }
+
+ @Override
+ public void onMessage(ByteBuffer bytes) {
+ try {
+ System.out.println(new String(bytes.array(),"utf-8"));
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ }
+ }
+ };
+
+ client.connect();
+
+ }
+
+ public static void send(byte[] bytes){
+ client.send(bytes);
+ }
+
+}
+
diff --git a/src/com/fh/service/sunvote/instantpaper1/InstantPaper1Manager.java b/src/com/fh/service/sunvote/instantpaper1/InstantPaper1Manager.java
new file mode 100644
index 0000000..df60a18
--- /dev/null
+++ b/src/com/fh/service/sunvote/instantpaper1/InstantPaper1Manager.java
@@ -0,0 +1,58 @@
+package com.fh.service.sunvote.instantpaper1;
+
+import java.util.List;
+import com.fh.entity.Page;
+import com.fh.util.PageData;
+
+/**
+ * 说明: 即时测1试卷接口
+ * 创建人:FH Q313596790
+ * 创建时间:2019-05-29
+ * @version
+ */
+public interface InstantPaper1Manager{
+
+ /**新增
+ * @param pd
+ * @throws Exception
+ */
+ public void save(PageData pd)throws Exception;
+
+ /**删除
+ * @param pd
+ * @throws Exception
+ */
+ public void delete(PageData pd)throws Exception;
+
+ /**修改
+ * @param pd
+ * @throws Exception
+ */
+ public void edit(PageData pd)throws Exception;
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ public List list(Page page)throws Exception;
+
+ /**列表(全部)
+ * @param pd
+ * @throws Exception
+ */
+ public List listAll(PageData pd)throws Exception;
+
+ /**通过id获取数据
+ * @param pd
+ * @throws Exception
+ */
+ public PageData findById(PageData pd)throws Exception;
+
+ /**批量删除
+ * @param ArrayDATA_IDS
+ * @throws Exception
+ */
+ public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
+
+}
+
diff --git a/src/com/fh/service/sunvote/instantpaper1/impl/InstantPaper1Service.java b/src/com/fh/service/sunvote/instantpaper1/impl/InstantPaper1Service.java
new file mode 100644
index 0000000..302ba90
--- /dev/null
+++ b/src/com/fh/service/sunvote/instantpaper1/impl/InstantPaper1Service.java
@@ -0,0 +1,82 @@
+package com.fh.service.sunvote.instantpaper1.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Service;
+import com.fh.dao.DaoSupport;
+import com.fh.entity.Page;
+import com.fh.util.PageData;
+import com.fh.service.sunvote.instantpaper1.InstantPaper1Manager;
+
+/**
+ * 说明: 即时测1试卷
+ * 创建人:FH Q313596790
+ * 创建时间:2019-05-29
+ * @version
+ */
+@Service("instantpaper1Service")
+public class InstantPaper1Service implements InstantPaper1Manager{
+
+ @Resource(name = "daoSupport")
+ private DaoSupport dao;
+
+ /**新增
+ * @param pd
+ * @throws Exception
+ */
+ public void save(PageData pd)throws Exception{
+ dao.save("InstantPaper1Mapper.save", pd);
+ }
+
+ /**删除
+ * @param pd
+ * @throws Exception
+ */
+ public void delete(PageData pd)throws Exception{
+ dao.delete("InstantPaper1Mapper.delete", pd);
+ }
+
+ /**修改
+ * @param pd
+ * @throws Exception
+ */
+ public void edit(PageData pd)throws Exception{
+ dao.update("InstantPaper1Mapper.edit", pd);
+ }
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List list(Page page)throws Exception{
+ return (List)dao.findForList("InstantPaper1Mapper.datalistPage", page);
+ }
+
+ /**列表(全部)
+ * @param pd
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List listAll(PageData pd)throws Exception{
+ return (List)dao.findForList("InstantPaper1Mapper.listAll", pd);
+ }
+
+ /**通过id获取数据
+ * @param pd
+ * @throws Exception
+ */
+ public PageData findById(PageData pd)throws Exception{
+ return (PageData)dao.findForObject("InstantPaper1Mapper.findById", pd);
+ }
+
+ /**批量删除
+ * @param ArrayDATA_IDS
+ * @throws Exception
+ */
+ public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
+ dao.delete("InstantPaper1Mapper.deleteAll", ArrayDATA_IDS);
+ }
+
+}
+
diff --git a/src/com/fh/service/sunvote/instantpaper1content/InstantPaper1ContentManager.java b/src/com/fh/service/sunvote/instantpaper1content/InstantPaper1ContentManager.java
new file mode 100644
index 0000000..5bfa542
--- /dev/null
+++ b/src/com/fh/service/sunvote/instantpaper1content/InstantPaper1ContentManager.java
@@ -0,0 +1,58 @@
+package com.fh.service.sunvote.instantpaper1content;
+
+import java.util.List;
+import com.fh.entity.Page;
+import com.fh.util.PageData;
+
+/**
+ * 说明: 即时测试卷内容接口
+ * 创建人:FH Q313596790
+ * 创建时间:2019-06-11
+ * @version
+ */
+public interface InstantPaper1ContentManager{
+
+ /**新增
+ * @param pd
+ * @throws Exception
+ */
+ public void save(PageData pd)throws Exception;
+
+ /**删除
+ * @param pd
+ * @throws Exception
+ */
+ public void delete(PageData pd)throws Exception;
+
+ /**修改
+ * @param pd
+ * @throws Exception
+ */
+ public void edit(PageData pd)throws Exception;
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ public List list(Page page)throws Exception;
+
+ /**列表(全部)
+ * @param pd
+ * @throws Exception
+ */
+ public List listAll(PageData pd)throws Exception;
+
+ /**通过id获取数据
+ * @param pd
+ * @throws Exception
+ */
+ public PageData findById(PageData pd)throws Exception;
+
+ /**批量删除
+ * @param ArrayDATA_IDS
+ * @throws Exception
+ */
+ public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
+
+}
+
diff --git a/src/com/fh/service/sunvote/instantpaper1content/impl/InstantPaper1ContentService.java b/src/com/fh/service/sunvote/instantpaper1content/impl/InstantPaper1ContentService.java
new file mode 100644
index 0000000..ab10af1
--- /dev/null
+++ b/src/com/fh/service/sunvote/instantpaper1content/impl/InstantPaper1ContentService.java
@@ -0,0 +1,82 @@
+package com.fh.service.sunvote.instantpaper1content.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Service;
+import com.fh.dao.DaoSupport;
+import com.fh.entity.Page;
+import com.fh.util.PageData;
+import com.fh.service.sunvote.instantpaper1content.InstantPaper1ContentManager;
+
+/**
+ * 说明: 即时测试卷内容
+ * 创建人:FH Q313596790
+ * 创建时间:2019-06-11
+ * @version
+ */
+@Service("instantpaper1contentService")
+public class InstantPaper1ContentService implements InstantPaper1ContentManager{
+
+ @Resource(name = "daoSupport")
+ private DaoSupport dao;
+
+ /**新增
+ * @param pd
+ * @throws Exception
+ */
+ public void save(PageData pd)throws Exception{
+ dao.save("InstantPaper1ContentMapper.save", pd);
+ }
+
+ /**删除
+ * @param pd
+ * @throws Exception
+ */
+ public void delete(PageData pd)throws Exception{
+ dao.delete("InstantPaper1ContentMapper.delete", pd);
+ }
+
+ /**修改
+ * @param pd
+ * @throws Exception
+ */
+ public void edit(PageData pd)throws Exception{
+ dao.update("InstantPaper1ContentMapper.edit", pd);
+ }
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List list(Page page)throws Exception{
+ return (List)dao.findForList("InstantPaper1ContentMapper.datalistPage", page);
+ }
+
+ /**列表(全部)
+ * @param pd
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List listAll(PageData pd)throws Exception{
+ return (List)dao.findForList("InstantPaper1ContentMapper.listAll", pd);
+ }
+
+ /**通过id获取数据
+ * @param pd
+ * @throws Exception
+ */
+ public PageData findById(PageData pd)throws Exception{
+ return (PageData)dao.findForObject("InstantPaper1ContentMapper.findById", pd);
+ }
+
+ /**批量删除
+ * @param ArrayDATA_IDS
+ * @throws Exception
+ */
+ public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
+ dao.delete("InstantPaper1ContentMapper.deleteAll", ArrayDATA_IDS);
+ }
+
+}
+
diff --git a/src/com/fh/service/sunvote/instantquestiondatasource1/InstantQuestionDataSource1Manager.java b/src/com/fh/service/sunvote/instantquestiondatasource1/InstantQuestionDataSource1Manager.java
new file mode 100644
index 0000000..847c75e
--- /dev/null
+++ b/src/com/fh/service/sunvote/instantquestiondatasource1/InstantQuestionDataSource1Manager.java
@@ -0,0 +1,58 @@
+package com.fh.service.sunvote.instantquestiondatasource1;
+
+import java.util.List;
+import com.fh.entity.Page;
+import com.fh.util.PageData;
+
+/**
+ * 说明: 即时测题库1接口
+ * 创建人:FH Q313596790
+ * 创建时间:2019-05-29
+ * @version
+ */
+public interface InstantQuestionDataSource1Manager{
+
+ /**新增
+ * @param pd
+ * @throws Exception
+ */
+ public void save(PageData pd)throws Exception;
+
+ /**删除
+ * @param pd
+ * @throws Exception
+ */
+ public void delete(PageData pd)throws Exception;
+
+ /**修改
+ * @param pd
+ * @throws Exception
+ */
+ public void edit(PageData pd)throws Exception;
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ public List list(Page page)throws Exception;
+
+ /**列表(全部)
+ * @param pd
+ * @throws Exception
+ */
+ public List listAll(PageData pd)throws Exception;
+
+ /**通过id获取数据
+ * @param pd
+ * @throws Exception
+ */
+ public PageData findById(PageData pd)throws Exception;
+
+ /**批量删除
+ * @param ArrayDATA_IDS
+ * @throws Exception
+ */
+ public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
+
+}
+
diff --git a/src/com/fh/service/sunvote/instantquestiondatasource1/impl/InstantQuestionDataSource1Service.java b/src/com/fh/service/sunvote/instantquestiondatasource1/impl/InstantQuestionDataSource1Service.java
new file mode 100644
index 0000000..f060e0e
--- /dev/null
+++ b/src/com/fh/service/sunvote/instantquestiondatasource1/impl/InstantQuestionDataSource1Service.java
@@ -0,0 +1,82 @@
+package com.fh.service.sunvote.instantquestiondatasource1.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Service;
+import com.fh.dao.DaoSupport;
+import com.fh.entity.Page;
+import com.fh.util.PageData;
+import com.fh.service.sunvote.instantquestiondatasource1.InstantQuestionDataSource1Manager;
+
+/**
+ * 说明: 即时测题库1
+ * 创建人:FH Q313596790
+ * 创建时间:2019-05-29
+ * @version
+ */
+@Service("instantquestiondatasource1Service")
+public class InstantQuestionDataSource1Service implements InstantQuestionDataSource1Manager{
+
+ @Resource(name = "daoSupport")
+ private DaoSupport dao;
+
+ /**新增
+ * @param pd
+ * @throws Exception
+ */
+ public void save(PageData pd)throws Exception{
+ dao.save("InstantQuestionDataSource1Mapper.save", pd);
+ }
+
+ /**删除
+ * @param pd
+ * @throws Exception
+ */
+ public void delete(PageData pd)throws Exception{
+ dao.delete("InstantQuestionDataSource1Mapper.delete", pd);
+ }
+
+ /**修改
+ * @param pd
+ * @throws Exception
+ */
+ public void edit(PageData pd)throws Exception{
+ dao.update("InstantQuestionDataSource1Mapper.edit", pd);
+ }
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List list(Page page)throws Exception{
+ return (List)dao.findForList("InstantQuestionDataSource1Mapper.datalistPage", page);
+ }
+
+ /**列表(全部)
+ * @param pd
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List listAll(PageData pd)throws Exception{
+ return (List)dao.findForList("InstantQuestionDataSource1Mapper.listAll", pd);
+ }
+
+ /**通过id获取数据
+ * @param pd
+ * @throws Exception
+ */
+ public PageData findById(PageData pd)throws Exception{
+ return (PageData)dao.findForObject("InstantQuestionDataSource1Mapper.findById", pd);
+ }
+
+ /**批量删除
+ * @param ArrayDATA_IDS
+ * @throws Exception
+ */
+ public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
+ dao.delete("InstantQuestionDataSource1Mapper.deleteAll", ArrayDATA_IDS);
+ }
+
+}
+
diff --git a/src/com/fh/service/sunvote/paperanswer1/PaperAnswer1Manager.java b/src/com/fh/service/sunvote/paperanswer1/PaperAnswer1Manager.java
new file mode 100644
index 0000000..fe668f8
--- /dev/null
+++ b/src/com/fh/service/sunvote/paperanswer1/PaperAnswer1Manager.java
@@ -0,0 +1,58 @@
+package com.fh.service.sunvote.paperanswer1;
+
+import java.util.List;
+import com.fh.entity.Page;
+import com.fh.util.PageData;
+
+/**
+ * 说明: 即时测试卷答题接口
+ * 创建人:FH Q313596790
+ * 创建时间:2019-06-11
+ * @version
+ */
+public interface PaperAnswer1Manager{
+
+ /**新增
+ * @param pd
+ * @throws Exception
+ */
+ public void save(PageData pd)throws Exception;
+
+ /**删除
+ * @param pd
+ * @throws Exception
+ */
+ public void delete(PageData pd)throws Exception;
+
+ /**修改
+ * @param pd
+ * @throws Exception
+ */
+ public void edit(PageData pd)throws Exception;
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ public List list(Page page)throws Exception;
+
+ /**列表(全部)
+ * @param pd
+ * @throws Exception
+ */
+ public List listAll(PageData pd)throws Exception;
+
+ /**通过id获取数据
+ * @param pd
+ * @throws Exception
+ */
+ public PageData findById(PageData pd)throws Exception;
+
+ /**批量删除
+ * @param ArrayDATA_IDS
+ * @throws Exception
+ */
+ public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
+
+}
+
diff --git a/src/com/fh/service/sunvote/paperanswer1/impl/PaperAnswer1Service.java b/src/com/fh/service/sunvote/paperanswer1/impl/PaperAnswer1Service.java
new file mode 100644
index 0000000..25072a9
--- /dev/null
+++ b/src/com/fh/service/sunvote/paperanswer1/impl/PaperAnswer1Service.java
@@ -0,0 +1,82 @@
+package com.fh.service.sunvote.paperanswer1.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Service;
+import com.fh.dao.DaoSupport;
+import com.fh.entity.Page;
+import com.fh.util.PageData;
+import com.fh.service.sunvote.paperanswer1.PaperAnswer1Manager;
+
+/**
+ * 说明: 即时测试卷答题
+ * 创建人:FH Q313596790
+ * 创建时间:2019-06-11
+ * @version
+ */
+@Service("paperanswer1Service")
+public class PaperAnswer1Service implements PaperAnswer1Manager{
+
+ @Resource(name = "daoSupport")
+ private DaoSupport dao;
+
+ /**新增
+ * @param pd
+ * @throws Exception
+ */
+ public void save(PageData pd)throws Exception{
+ dao.save("PaperAnswer1Mapper.save", pd);
+ }
+
+ /**删除
+ * @param pd
+ * @throws Exception
+ */
+ public void delete(PageData pd)throws Exception{
+ dao.delete("PaperAnswer1Mapper.delete", pd);
+ }
+
+ /**修改
+ * @param pd
+ * @throws Exception
+ */
+ public void edit(PageData pd)throws Exception{
+ dao.update("PaperAnswer1Mapper.edit", pd);
+ }
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List list(Page page)throws Exception{
+ return (List)dao.findForList("PaperAnswer1Mapper.datalistPage", page);
+ }
+
+ /**列表(全部)
+ * @param pd
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List listAll(PageData pd)throws Exception{
+ return (List)dao.findForList("PaperAnswer1Mapper.listAll", pd);
+ }
+
+ /**通过id获取数据
+ * @param pd
+ * @throws Exception
+ */
+ public PageData findById(PageData pd)throws Exception{
+ return (PageData)dao.findForObject("PaperAnswer1Mapper.findById", pd);
+ }
+
+ /**批量删除
+ * @param ArrayDATA_IDS
+ * @throws Exception
+ */
+ public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
+ dao.delete("PaperAnswer1Mapper.deleteAll", ArrayDATA_IDS);
+ }
+
+}
+
diff --git a/src/com/fh/service/sunvote/studentanswer1/StudentAnswer1Manager.java b/src/com/fh/service/sunvote/studentanswer1/StudentAnswer1Manager.java
new file mode 100644
index 0000000..045fe44
--- /dev/null
+++ b/src/com/fh/service/sunvote/studentanswer1/StudentAnswer1Manager.java
@@ -0,0 +1,58 @@
+package com.fh.service.sunvote.studentanswer1;
+
+import java.util.List;
+import com.fh.entity.Page;
+import com.fh.util.PageData;
+
+/**
+ * 说明: 学生答题表接口
+ * 创建人:FH Q313596790
+ * 创建时间:2019-06-11
+ * @version
+ */
+public interface StudentAnswer1Manager{
+
+ /**新增
+ * @param pd
+ * @throws Exception
+ */
+ public void save(PageData pd)throws Exception;
+
+ /**删除
+ * @param pd
+ * @throws Exception
+ */
+ public void delete(PageData pd)throws Exception;
+
+ /**修改
+ * @param pd
+ * @throws Exception
+ */
+ public void edit(PageData pd)throws Exception;
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ public List list(Page page)throws Exception;
+
+ /**列表(全部)
+ * @param pd
+ * @throws Exception
+ */
+ public List listAll(PageData pd)throws Exception;
+
+ /**通过id获取数据
+ * @param pd
+ * @throws Exception
+ */
+ public PageData findById(PageData pd)throws Exception;
+
+ /**批量删除
+ * @param ArrayDATA_IDS
+ * @throws Exception
+ */
+ public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
+
+}
+
diff --git a/src/com/fh/service/sunvote/studentanswer1/impl/StudentAnswer1Service.java b/src/com/fh/service/sunvote/studentanswer1/impl/StudentAnswer1Service.java
new file mode 100644
index 0000000..5d476f7
--- /dev/null
+++ b/src/com/fh/service/sunvote/studentanswer1/impl/StudentAnswer1Service.java
@@ -0,0 +1,82 @@
+package com.fh.service.sunvote.studentanswer1.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Service;
+import com.fh.dao.DaoSupport;
+import com.fh.entity.Page;
+import com.fh.util.PageData;
+import com.fh.service.sunvote.studentanswer1.StudentAnswer1Manager;
+
+/**
+ * 说明: 学生答题表
+ * 创建人:FH Q313596790
+ * 创建时间:2019-06-11
+ * @version
+ */
+@Service("studentanswer1Service")
+public class StudentAnswer1Service implements StudentAnswer1Manager{
+
+ @Resource(name = "daoSupport")
+ private DaoSupport dao;
+
+ /**新增
+ * @param pd
+ * @throws Exception
+ */
+ public void save(PageData pd)throws Exception{
+ dao.save("StudentAnswer1Mapper.save", pd);
+ }
+
+ /**删除
+ * @param pd
+ * @throws Exception
+ */
+ public void delete(PageData pd)throws Exception{
+ dao.delete("StudentAnswer1Mapper.delete", pd);
+ }
+
+ /**修改
+ * @param pd
+ * @throws Exception
+ */
+ public void edit(PageData pd)throws Exception{
+ dao.update("StudentAnswer1Mapper.edit", pd);
+ }
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List list(Page page)throws Exception{
+ return (List)dao.findForList("StudentAnswer1Mapper.datalistPage", page);
+ }
+
+ /**列表(全部)
+ * @param pd
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List listAll(PageData pd)throws Exception{
+ return (List)dao.findForList("StudentAnswer1Mapper.listAll", pd);
+ }
+
+ /**通过id获取数据
+ * @param pd
+ * @throws Exception
+ */
+ public PageData findById(PageData pd)throws Exception{
+ return (PageData)dao.findForObject("StudentAnswer1Mapper.findById", pd);
+ }
+
+ /**批量删除
+ * @param ArrayDATA_IDS
+ * @throws Exception
+ */
+ public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
+ dao.delete("StudentAnswer1Mapper.deleteAll", ArrayDATA_IDS);
+ }
+
+}
+
diff --git a/即时测2sql.sql b/即时测2sql.sql
new file mode 100644
index 0000000..2c6c707
--- /dev/null
+++ b/即时测2sql.sql
@@ -0,0 +1,106 @@
+
+SET FOREIGN_KEY_CHECKS=0;
+
+-- ----------------------------
+-- Table structure for `SV_INSTANTPAPER1`
+-- ----------------------------
+DROP TABLE IF EXISTS `SV_INSTANTPAPER1`;
+CREATE TABLE `SV_INSTANTPAPER1` (
+ `INSTANTPAPER1_ID` varchar(100) NOT NULL,
+ `PAPER_NAME` varchar(100) DEFAULT NULL COMMENT '试卷名称',
+ `TAG` varchar(300) DEFAULT NULL COMMENT '标签',
+ `PERMISSION` varchar(100) DEFAULT NULL COMMENT '权限',
+ `SUBJECT_ID` varchar(50) DEFAULT NULL COMMENT '科目',
+ `GRADE_ID` varchar(50) DEFAULT NULL COMMENT '年级',
+ `CLASS_ID` varchar(50) DEFAULT NULL COMMENT '班级',
+ `SCHOOL_ID` varchar(50) DEFAULT NULL COMMENT '学校',
+ `COMBINATION` int(1) NOT NULL COMMENT '是否组合试卷',
+ `PAPER_SCORE` varchar(10) DEFAULT NULL COMMENT '试卷总分',
+ `USER_ID` varchar(50) DEFAULT NULL COMMENT '用户',
+ `CREATE_TIME` varchar(32) DEFAULT NULL COMMENT '创建时间',
+ `COUNT` varchar(10) DEFAULT NULL COMMENT '考试次数',
+ PRIMARY KEY (`INSTANTPAPER1_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+SET FOREIGN_KEY_CHECKS=0;
+
+-- ----------------------------
+-- Table structure for `SV_INSTANTPAPER1CONTENT`
+-- ----------------------------
+DROP TABLE IF EXISTS `SV_INSTANTPAPER1CONTENT`;
+CREATE TABLE `SV_INSTANTPAPER1CONTENT` (
+ `INSTANTPAPER1CONTENT_ID` varchar(100) NOT NULL,
+ `PAPER_ID` varchar(50) DEFAULT NULL COMMENT '试卷',
+ `QUESTION_ID` varchar(50) DEFAULT NULL COMMENT '试题',
+ `RANK` varchar(10) DEFAULT NULL COMMENT '排序',
+ `TITLE` varchar(20) DEFAULT NULL COMMENT '题号',
+ `SCORE` varchar(255) DEFAULT NULL COMMENT '分数',
+ `REMARK` varchar(255) DEFAULT NULL COMMENT '说明',
+ PRIMARY KEY (`INSTANTPAPER1CONTENT_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+SET FOREIGN_KEY_CHECKS=0;
+
+-- ----------------------------
+-- Table structure for `SV_INSTANTQUESTIONDATASOURCE1`
+-- ----------------------------
+DROP TABLE IF EXISTS `SV_INSTANTQUESTIONDATASOURCE1`;
+CREATE TABLE `SV_INSTANTQUESTIONDATASOURCE1` (
+ `INSTANTQUESTIONDATASOURCE1_ID` varchar(100) NOT NULL,
+ `IMAGE_URL` varchar(100) DEFAULT NULL COMMENT '图片路径',
+ `SCORE` double(11,2) DEFAULT NULL COMMENT '分数',
+ `ANSWER_CONTENT` varchar(100) DEFAULT NULL COMMENT '答案内容',
+ `RIGHT_ANSWER` varchar(100) DEFAULT NULL COMMENT '标准答案',
+ `TAG` varchar(300) DEFAULT NULL COMMENT '标签',
+ `PERMISSION` varchar(100) DEFAULT NULL COMMENT '权限',
+ `SUBJECT_ID` varchar(50) DEFAULT NULL COMMENT '科目',
+ `GRADE_ID` varchar(50) DEFAULT NULL COMMENT '年级',
+ `SCHOOL_ID` varchar(50) DEFAULT NULL COMMENT '学校',
+ `USER_ID` varchar(50) DEFAULT NULL COMMENT '用户ID',
+ `创建时间` varchar(32) DEFAULT NULL COMMENT 'create_time',
+ `CLASS_ID` varchar(50) DEFAULT NULL COMMENT '班级',
+ PRIMARY KEY (`INSTANTQUESTIONDATASOURCE1_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+SET FOREIGN_KEY_CHECKS=0;
+
+-- ----------------------------
+-- Table structure for `SV_PAPERANSWER1`
+-- ----------------------------
+DROP TABLE IF EXISTS `SV_PAPERANSWER1`;
+CREATE TABLE `SV_PAPERANSWER1` (
+ `PAPERANSWER1_ID` varchar(100) NOT NULL,
+ `PAPER_ID` varchar(35) DEFAULT NULL COMMENT '试卷',
+ `PAPER_NAME` varchar(30) DEFAULT NULL COMMENT '试卷名称',
+ `SUBJECT_ID` varchar(35) DEFAULT NULL COMMENT '科目',
+ `CLASS_ID` varchar(35) DEFAULT NULL COMMENT '班级ID',
+ `GRADE_ID` varchar(35) DEFAULT NULL COMMENT '年级',
+ `SCHOOL_ID` varchar(35) DEFAULT NULL COMMENT '学校',
+ `USER_ID` varchar(35) DEFAULT NULL COMMENT '创建者',
+ `CREATE_DATE` varchar(32) DEFAULT NULL COMMENT '考试时间',
+ `AVG_SCORE` varchar(35) DEFAULT NULL COMMENT '平均分',
+ `HIGHT_SCORE` varchar(35) DEFAULT NULL COMMENT '最高分',
+ `REMARK` varchar(255) DEFAULT NULL COMMENT '备注',
+ PRIMARY KEY (`PAPERANSWER1_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+SET FOREIGN_KEY_CHECKS=0;
+
+-- ----------------------------
+-- Table structure for `SV_STUDENTANSWER1`
+-- ----------------------------
+DROP TABLE IF EXISTS `SV_STUDENTANSWER1`;
+CREATE TABLE `SV_STUDENTANSWER1` (
+ `STUDENTANSWER1_ID` varchar(100) NOT NULL,
+ `STUDENT_ID` varchar(35) DEFAULT NULL COMMENT '学生',
+ `STUDENT_NAME` varchar(30) DEFAULT NULL COMMENT '学生姓名',
+ `STUDENT_NO` varchar(35) DEFAULT NULL COMMENT '学生学号',
+ `CONTENT` varchar(1000) DEFAULT NULL COMMENT '答案内容(正确与否)',
+ `GET_SCORE` varchar(32) DEFAULT NULL COMMENT '学生得分',
+ `PAPER_ID` varchar(35) DEFAULT NULL COMMENT '试卷',
+ `ANSWER_ID` varchar(35) DEFAULT NULL COMMENT '答卷ID',
+ `CLASS_ID` varchar(35) DEFAULT NULL COMMENT '班级ID',
+ `GRADE_ID` varchar(35) DEFAULT NULL COMMENT '年级ID',
+ `SCHOOL_ID` varchar(35) DEFAULT NULL COMMENT '学校ID',
+ PRIMARY KEY (`STUDENTANSWER1_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;