소스 검색

对外课程组

Joburgess 5 년 전
부모
커밋
e82d3e65e0

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CoursesGroupDao.java

@@ -0,0 +1,9 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.ym.mec.biz.dal.entity.CoursesGroup;
+import com.ym.mec.common.dal.BaseDAO;
+
+public interface CoursesGroupDao extends BaseDAO<Long, CoursesGroup> {
+
+	
+}

+ 224 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CoursesGroup.java

@@ -0,0 +1,224 @@
+package com.ym.mec.biz.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(courses_group):
+ */
+public class CoursesGroup {
+
+	/**  */
+	private Long id;
+	
+	/** 课程组名称 */
+	private String name;
+	
+	/** 科目 */
+	private Integer subjectId;
+	
+	/** 课程开始时间 */
+	private java.util.Date coursesStartDate;
+	
+	/** 课程结束时间 */
+	private java.util.Date coursesEndDate;
+	
+	/** 课时安排 */
+	private String teachingArrangement;
+	
+	/** 机构 */
+	private Integer organId;
+	
+	/** 单次课时 */
+	private Integer singleClassMinutes;
+	
+	/** 课程组状态 */
+	private String status;
+	
+	/** 备注 */
+	private String memo;
+	
+	/** 授课老师 */
+	private Integer teacherId;
+	
+	/** 最大报名人数 */
+	private Integer maxStudentNum;
+	
+	/** 报名结束时间 */
+	private java.util.Date applyClosingDate;
+	
+	/** 教学规划 */
+	private String teachingPlan;
+	
+	/** 老师课酬结算方式 */
+	private String teacherSalarySettlementMethod;
+	
+	/** 课程总价 */
+	private long totalCoursesPrice;
+	
+	/** 课程折扣价 */
+	private long totalCourseDiscountPrice;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	/**  */
+	private java.util.Date updateTime;
+	
+	public void setId(Long id){
+		this.id = id;
+	}
+	
+	public Long getId(){
+		return this.id;
+	}
+			
+	public void setName(String name){
+		this.name = name;
+	}
+	
+	public String getName(){
+		return this.name;
+	}
+			
+	public void setSubjectId(Integer subjectId){
+		this.subjectId = subjectId;
+	}
+	
+	public Integer getSubjectId(){
+		return this.subjectId;
+	}
+			
+	public void setCoursesStartDate(java.util.Date coursesStartDate){
+		this.coursesStartDate = coursesStartDate;
+	}
+	
+	public java.util.Date getCoursesStartDate(){
+		return this.coursesStartDate;
+	}
+			
+	public void setCoursesEndDate(java.util.Date coursesEndDate){
+		this.coursesEndDate = coursesEndDate;
+	}
+	
+	public java.util.Date getCoursesEndDate(){
+		return this.coursesEndDate;
+	}
+			
+	public void setTeachingArrangement(String teachingArrangement){
+		this.teachingArrangement = teachingArrangement;
+	}
+	
+	public String getTeachingArrangement(){
+		return this.teachingArrangement;
+	}
+			
+	public void setOrganId(Integer organId){
+		this.organId = organId;
+	}
+	
+	public Integer getOrganId(){
+		return this.organId;
+	}
+			
+	public void setSingleClassMinutes(Integer singleClassMinutes){
+		this.singleClassMinutes = singleClassMinutes;
+	}
+	
+	public Integer getSingleClassMinutes(){
+		return this.singleClassMinutes;
+	}
+			
+	public void setStatus(String status){
+		this.status = status;
+	}
+	
+	public String getStatus(){
+		return this.status;
+	}
+			
+	public void setMemo(String memo){
+		this.memo = memo;
+	}
+	
+	public String getMemo(){
+		return this.memo;
+	}
+			
+	public void setTeacherId(Integer teacherId){
+		this.teacherId = teacherId;
+	}
+	
+	public Integer getTeacherId(){
+		return this.teacherId;
+	}
+			
+	public void setMaxStudentNum(Integer maxStudentNum){
+		this.maxStudentNum = maxStudentNum;
+	}
+	
+	public Integer getMaxStudentNum(){
+		return this.maxStudentNum;
+	}
+			
+	public void setApplyClosingDate(java.util.Date applyClosingDate){
+		this.applyClosingDate = applyClosingDate;
+	}
+	
+	public java.util.Date getApplyClosingDate(){
+		return this.applyClosingDate;
+	}
+			
+	public void setTeachingPlan(String teachingPlan){
+		this.teachingPlan = teachingPlan;
+	}
+	
+	public String getTeachingPlan(){
+		return this.teachingPlan;
+	}
+			
+	public void setTeacherSalarySettlementMethod(String teacherSalarySettlementMethod){
+		this.teacherSalarySettlementMethod = teacherSalarySettlementMethod;
+	}
+	
+	public String getTeacherSalarySettlementMethod(){
+		return this.teacherSalarySettlementMethod;
+	}
+			
+	public void setTotalCoursesPrice(long totalCoursesPrice){
+		this.totalCoursesPrice = totalCoursesPrice;
+	}
+	
+	public long getTotalCoursesPrice(){
+		return this.totalCoursesPrice;
+	}
+			
+	public void setTotalCourseDiscountPrice(long totalCourseDiscountPrice){
+		this.totalCourseDiscountPrice = totalCourseDiscountPrice;
+	}
+	
+	public long getTotalCourseDiscountPrice(){
+		return this.totalCourseDiscountPrice;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	public void setUpdateTime(java.util.Date updateTime){
+		this.updateTime = updateTime;
+	}
+	
+	public java.util.Date getUpdateTime(){
+		return this.updateTime;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/CoursesGroupService.java

@@ -0,0 +1,10 @@
+package com.ym.mec.biz.service;
+
+import com.ym.mec.biz.dal.entity.CoursesGroup;
+import com.ym.mec.common.service.BaseService;
+
+public interface CoursesGroupService extends BaseService<Long, CoursesGroup> {
+
+    void createCourseGroup(CoursesGroup coursesGroup);
+
+}

+ 26 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CoursesGroupServiceImpl.java

@@ -0,0 +1,26 @@
+package com.ym.mec.biz.service.impl;
+
+import com.ym.mec.biz.dal.dao.CoursesGroupDao;
+import com.ym.mec.biz.dal.entity.CoursesGroup;
+import com.ym.mec.biz.service.CoursesGroupService;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class CoursesGroupServiceImpl extends BaseServiceImpl<Long, CoursesGroup> implements CoursesGroupService {
+	
+	@Autowired
+	private CoursesGroupDao coursesGroupDao;
+
+	@Override
+	public BaseDAO<Long, CoursesGroup> getDAO() {
+		return coursesGroupDao;
+	}
+
+	@Override
+	public void createCourseGroup(CoursesGroup coursesGroup) {
+		
+	}
+}

+ 128 - 0
mec-biz/src/main/resources/config/mybatis/CoursesGroupMapper.xml

@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!--
+这个文件是自动生成的。
+不要修改此文件。所有改动将在下次重新自动生成时丢失。
+-->
+<mapper namespace="com.ym.mec.biz.dal.dao.CoursesGroupDao">
+	
+	<resultMap type="com.ym.mec.biz.dal.entity.CoursesGroup" id="CoursesGroup">
+		<result column="id_" property="id" />
+		<result column="name_" property="name" />
+		<result column="subject_id_" property="subjectId" />
+		<result column="courses_start_date_" property="coursesStartDate" />
+		<result column="courses_end_date_" property="coursesEndDate" />
+		<result column="teaching_arrangement_" property="teachingArrangement" />
+		<result column="organ_id_" property="organId" />
+		<result column="single_class_minutes_" property="singleClassMinutes" />
+		<result column="status_" property="status" />
+		<result column="memo_" property="memo" />
+		<result column="teacher_id_" property="teacherId" />
+		<result column="max_student_num_" property="maxStudentNum" />
+		<result column="apply_closing_date_" property="applyClosingDate" />
+		<result column="teaching_plan_" property="teachingPlan" />
+		<result column="teacher_salary_settlement_method_" property="teacherSalarySettlementMethod" />
+		<result column="total_courses_price_" property="totalCoursesPrice" />
+		<result column="total_course_discount_price_" property="totalCourseDiscountPrice" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="CoursesGroup" >
+		SELECT * FROM courses_group WHERE id_ = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="CoursesGroup">
+		SELECT * FROM courses_group ORDER BY id_
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.CoursesGroup" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!--
+		<selectKey resultClass="int" keyProperty="id" > 
+		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
+		</selectKey>
+		-->
+		INSERT INTO courses_group (id_,name_,subject_id_,courses_start_date_,courses_end_date_,teaching_arrangement_,organ_id_,single_class_minutes_,status_,memo_,teacher_id_,max_student_num_,apply_closing_date_,teaching_plan_,teacher_salary_settlement_method_,total_courses_price_,total_course_discount_price_,create_time_,update_time_) VALUES(#{id},#{name},#{subjectId},#{coursesStartDate},#{coursesEndDate},#{teachingArrangement},#{organId},#{singleClassMinutes},#{status},#{memo},#{teacherId},#{maxStudentNum},#{applyClosingDate},#{teachingPlan},#{teacherSalarySettlementMethod},#{totalCoursesPrice},#{totalCourseDiscountPrice},#{createTime},#{updateTime})
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.CoursesGroup">
+		UPDATE courses_group <set>
+<if test="coursesEndDate != null">
+courses_end_date_ = #{coursesEndDate},
+</if>
+<if test="subjectId != null">
+subject_id_ = #{subjectId},
+</if>
+<if test="status != null">
+status_ = #{status},
+</if>
+<if test="organId != null">
+organ_id_ = #{organId},
+</if>
+<if test="totalCourseDiscountPrice != null">
+total_course_discount_price_ = #{totalCourseDiscountPrice},
+</if>
+<if test="id != null">
+id_ = #{id},
+</if>
+<if test="coursesStartDate != null">
+courses_start_date_ = #{coursesStartDate},
+</if>
+<if test="memo != null">
+memo_ = #{memo},
+</if>
+<if test="maxStudentNum != null">
+max_student_num_ = #{maxStudentNum},
+</if>
+<if test="name != null">
+name_ = #{name},
+</if>
+<if test="teacherSalarySettlementMethod != null">
+teacher_salary_settlement_method_ = #{teacherSalarySettlementMethod},
+</if>
+<if test="createTime != null">
+create_time_ = #{createTime},
+</if>
+<if test="teachingPlan != null">
+teaching_plan_ = #{teachingPlan},
+</if>
+<if test="applyClosingDate != null">
+apply_closing_date_ = #{applyClosingDate},
+</if>
+<if test="totalCoursesPrice != null">
+total_courses_price_ = #{totalCoursesPrice},
+</if>
+<if test="teachingArrangement != null">
+teaching_arrangement_ = #{teachingArrangement},
+</if>
+<if test="teacherId != null">
+teacher_id_ = #{teacherId},
+</if>
+<if test="updateTime != null">
+update_time_ = #{updateTime},
+</if>
+<if test="singleClassMinutes != null">
+single_class_minutes_ = #{singleClassMinutes},
+</if>
+</set> WHERE id_ = #{id} 
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM courses_group WHERE id_ = #{id} 
+	</delete>
+	
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="CoursesGroup" parameterType="map">
+		SELECT * FROM courses_group ORDER BY id_ <include refid="global.limit"/>
+	</select>
+	
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM courses_group
+	</select>
+</mapper>