diff --git a/WebContent/generatorConfig.xml b/WebContent/generatorConfig.xml index 88ae1274175a11f117d046d61b003ed465a4c2d8..c7ab66417ea1aa0a4a536b5e56ac812e2b9dfe7c 100644 --- a/WebContent/generatorConfig.xml +++ b/WebContent/generatorConfig.xml @@ -100,13 +100,10 @@ --> - +
- - -
\ No newline at end of file diff --git a/WebContent/jsp/QueryCourse.jsp b/WebContent/jsp/QueryCourse.jsp index 159c33d9b017139760e5ed5ffe62b14945355b7a..9953e8769f58fc3f4113e0e6234b3889b986b1db 100644 --- a/WebContent/jsp/QueryCourse.jsp +++ b/WebContent/jsp/QueryCourse.jsp @@ -25,15 +25,6 @@ } } - function addCourse(){ - $.ajax({ - url : '<%=request.getContextPath()%>/CourseController/toAddCourse.action', - success : function(data){ - alert(data); - } - }) - } - function makeCourseCode(){ $.ajax({ url : '<%=request.getContextPath()%>/CourseController/MakeCourseCode.action', @@ -134,17 +125,14 @@ - - - +
+ + +
diff --git a/build/classes/cn/edu/hrbcu/curriculum/controller/CourseController.class b/build/classes/cn/edu/hrbcu/curriculum/controller/CourseController.class index d7fef5a5413306fa540a40660dabeae5162f328e..b4ffd18df0a66b152e2da2d01272e66da9205746 100644 Binary files a/build/classes/cn/edu/hrbcu/curriculum/controller/CourseController.class and b/build/classes/cn/edu/hrbcu/curriculum/controller/CourseController.class differ diff --git a/build/classes/cn/edu/hrbcu/curriculum/mapper/CourseMapper.xml b/build/classes/cn/edu/hrbcu/curriculum/mapper/CourseMapper.xml index e11345aab906a9a58f9e7dc47222b5e35111c600..c3ea27ba6471bcd6cab6d4f7685773b9b0bf441a 100644 --- a/build/classes/cn/edu/hrbcu/curriculum/mapper/CourseMapper.xml +++ b/build/classes/cn/edu/hrbcu/curriculum/mapper/CourseMapper.xml @@ -11,6 +11,7 @@ + @@ -74,7 +75,7 @@ id, name, identifier, theoretical, experiement, score, academyid, coursemodeid, coursetypeid, - teachingmethodid, examinationmethodid + specialityid, teachingmethodid, examinationmethodid select @@ -110,11 +111,13 @@ insert into course (id, name, identifier, theoretical, experiement, score, academyid, coursemodeid, coursetypeid, - teachingmethodid, examinationmethodid) + specialityid, teachingmethodid, examinationmethodid + ) values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{identifier,jdbcType=VARCHAR}, #{theoretical,jdbcType=INTEGER}, #{experiement,jdbcType=INTEGER}, #{score,jdbcType=DOUBLE}, #{academyid,jdbcType=BIGINT}, #{coursemodeid,jdbcType=BIGINT}, #{coursetypeid,jdbcType=BIGINT}, - #{teachingmethodid,jdbcType=BIGINT}, #{examinationmethodid,jdbcType=BIGINT}) + #{specialityid,jdbcType=BIGINT}, #{teachingmethodid,jdbcType=BIGINT}, #{examinationmethodid,jdbcType=BIGINT} + ) insert into course @@ -146,6 +149,9 @@ coursetypeid, + + specialityid, + teachingmethodid, @@ -181,6 +187,9 @@ #{coursetypeid,jdbcType=BIGINT}, + + #{specialityid,jdbcType=BIGINT}, + #{teachingmethodid,jdbcType=BIGINT}, @@ -225,6 +234,9 @@ coursetypeid = #{record.coursetypeid,jdbcType=BIGINT}, + + specialityid = #{record.specialityid,jdbcType=BIGINT}, + teachingmethodid = #{record.teachingmethodid,jdbcType=BIGINT}, @@ -247,6 +259,7 @@ academyid = #{record.academyid,jdbcType=BIGINT}, coursemodeid = #{record.coursemodeid,jdbcType=BIGINT}, coursetypeid = #{record.coursetypeid,jdbcType=BIGINT}, + specialityid = #{record.specialityid,jdbcType=BIGINT}, teachingmethodid = #{record.teachingmethodid,jdbcType=BIGINT}, examinationmethodid = #{record.examinationmethodid,jdbcType=BIGINT} @@ -280,6 +293,9 @@ coursetypeid = #{coursetypeid,jdbcType=BIGINT}, + + specialityid = #{specialityid,jdbcType=BIGINT}, + teachingmethodid = #{teachingmethodid,jdbcType=BIGINT}, @@ -299,6 +315,7 @@ academyid = #{academyid,jdbcType=BIGINT}, coursemodeid = #{coursemodeid,jdbcType=BIGINT}, coursetypeid = #{coursetypeid,jdbcType=BIGINT}, + specialityid = #{specialityid,jdbcType=BIGINT}, teachingmethodid = #{teachingmethodid,jdbcType=BIGINT}, examinationmethodid = #{examinationmethodid,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT} diff --git a/src/cn/edu/hrbcu/curriculum/pojo/Course.java b/src/cn/edu/hrbcu/curriculum/pojo/Course.java index 205cfa886749a9142651ecd8f2750544dd62d36e..2f9ddad351295c4449960862d39b5f6269f22d5a 100644 --- a/src/cn/edu/hrbcu/curriculum/pojo/Course.java +++ b/src/cn/edu/hrbcu/curriculum/pojo/Course.java @@ -21,6 +21,8 @@ public class Course implements Serializable { private Long coursetypeid; + private Long specialityid; + private Long teachingmethodid; private Long examinationmethodid; @@ -99,6 +101,14 @@ public class Course implements Serializable { this.coursetypeid = coursetypeid; } + public Long getSpecialityid() { + return specialityid; + } + + public void setSpecialityid(Long specialityid) { + this.specialityid = specialityid; + } + public Long getTeachingmethodid() { return teachingmethodid; } diff --git a/src/cn/edu/hrbcu/curriculum/pojo/CourseExample.java b/src/cn/edu/hrbcu/curriculum/pojo/CourseExample.java index a702297439cb60fd5cbaee5446ec395c462e6578..c58d19dc6b6dde565559313b79e9dcdd932407e8 100644 --- a/src/cn/edu/hrbcu/curriculum/pojo/CourseExample.java +++ b/src/cn/edu/hrbcu/curriculum/pojo/CourseExample.java @@ -664,6 +664,66 @@ public class CourseExample { return (Criteria) this; } + public Criteria andSpecialityidIsNull() { + addCriterion("specialityid is null"); + return (Criteria) this; + } + + public Criteria andSpecialityidIsNotNull() { + addCriterion("specialityid is not null"); + return (Criteria) this; + } + + public Criteria andSpecialityidEqualTo(Long value) { + addCriterion("specialityid =", value, "specialityid"); + return (Criteria) this; + } + + public Criteria andSpecialityidNotEqualTo(Long value) { + addCriterion("specialityid <>", value, "specialityid"); + return (Criteria) this; + } + + public Criteria andSpecialityidGreaterThan(Long value) { + addCriterion("specialityid >", value, "specialityid"); + return (Criteria) this; + } + + public Criteria andSpecialityidGreaterThanOrEqualTo(Long value) { + addCriterion("specialityid >=", value, "specialityid"); + return (Criteria) this; + } + + public Criteria andSpecialityidLessThan(Long value) { + addCriterion("specialityid <", value, "specialityid"); + return (Criteria) this; + } + + public Criteria andSpecialityidLessThanOrEqualTo(Long value) { + addCriterion("specialityid <=", value, "specialityid"); + return (Criteria) this; + } + + public Criteria andSpecialityidIn(List values) { + addCriterion("specialityid in", values, "specialityid"); + return (Criteria) this; + } + + public Criteria andSpecialityidNotIn(List values) { + addCriterion("specialityid not in", values, "specialityid"); + return (Criteria) this; + } + + public Criteria andSpecialityidBetween(Long value1, Long value2) { + addCriterion("specialityid between", value1, value2, "specialityid"); + return (Criteria) this; + } + + public Criteria andSpecialityidNotBetween(Long value1, Long value2) { + addCriterion("specialityid not between", value1, value2, "specialityid"); + return (Criteria) this; + } + public Criteria andTeachingmethodidIsNull() { addCriterion("teachingmethodid is null"); return (Criteria) this; diff --git a/src/cn/edu/hrbcu/curriculum/service/CourseServiceImpl.java b/src/cn/edu/hrbcu/curriculum/service/CourseServiceImpl.java index c81c9f5758738487f305a6c060fd7069dee6d796..a430ae974dd5bb9b2714204193c8c2bb33c83f86 100644 --- a/src/cn/edu/hrbcu/curriculum/service/CourseServiceImpl.java +++ b/src/cn/edu/hrbcu/curriculum/service/CourseServiceImpl.java @@ -97,7 +97,7 @@ public class CourseServiceImpl implements CourseService { List coursetypes = coursetypeService.selectAllCoursetype(); if(coursetypes != null && coursetypes.size() > 0){ for (Coursetype coursetype : coursetypes) { - if(coursetype.getId() >= 4L){//只有自己的课程编号 + if(coursetype.getId() >= 4L && !coursetype.getId().equals(8L) ){//只有自己的课程编号 Course c = new Course(); c.setCoursetypeid(coursetype.getId()); List courses = selectCourseBy(c);