From 45b537a49baeb3ae0b1f2a0ee77e3b6242656017 Mon Sep 17 00:00:00 2001 From: jinxuesong Date: Sat, 13 Apr 2019 19:38:32 +0800 Subject: [PATCH] course + speciality --- WebContent/generatorConfig.xml | 5 +- WebContent/jsp/QueryCourse.jsp | 28 +++----- .../controller/CourseController.class | Bin 8237 -> 7999 bytes .../hrbcu/curriculum/mapper/CourseMapper.xml | 23 ++++++- .../cn/edu/hrbcu/curriculum/pojo/Course.class | Bin 3004 -> 3210 bytes .../pojo/CourseExample$Criteria.class | Bin 13506 -> 14578 bytes .../pojo/CourseExample$Criterion.class | Bin 2288 -> 2288 bytes .../CourseExample$GeneratedCriteria.class | Bin 22509 -> 24214 bytes .../service/CourseServiceImpl.class | Bin 5740 -> 5771 bytes .../controller/CourseController.java | 1 - .../hrbcu/curriculum/mapper/CourseMapper.xml | 23 ++++++- src/cn/edu/hrbcu/curriculum/pojo/Course.java | 10 +++ .../hrbcu/curriculum/pojo/CourseExample.java | 60 ++++++++++++++++++ .../curriculum/service/CourseServiceImpl.java | 2 +- 14 files changed, 120 insertions(+), 32 deletions(-) diff --git a/WebContent/generatorConfig.xml b/WebContent/generatorConfig.xml index 88ae127..c7ab664 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 159c33d..9953e87 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 GIT binary patch delta 271 zcmX9(y-LGi6g?-YrVUZVAg!j&XA^%~nluTo|qT)P=3G@-83jwg5Y40&ZEYF_MH1Dazaudh9@(nmNs{r(kjgOI z2{oQhn}(K}*UX$j*hAq(Cp!pNCa3F0M#-$?Oeec8XR3F~$_zMADyurSUcA}f3*6t( zv*2d!73(7fdJFUy*dnOy2#TALyqleQkvq^J_c$u7q_0Qc#ToXI$007@E%u9+@S#y& zB{*P|-5|=b2Mux9WLewnVK3~6Ak983i{l*p?B{^!b(vB{U*tFl2ZyXTUm)n0&m0!c U#t|q|s|1Zo4Tv_l1ZEif0ACz#T>t<8 diff --git a/build/classes/cn/edu/hrbcu/curriculum/mapper/CourseMapper.xml b/build/classes/cn/edu/hrbcu/curriculum/mapper/CourseMapper.xml index e11345a..c3ea27b 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 205cfa8..2f9ddad 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 a702297..c58d19d 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 c81c9f5..a430ae9 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); -- Gitee