Browse Source

add:试听课

yonge 5 năm trước cách đây
mục cha
commit
66c2a0c629

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

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

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

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

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

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

+ 92 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/DemoGroup.java

@@ -0,0 +1,92 @@
+package com.ym.mec.biz.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(demo_group):
+ */
+public class DemoGroup {
+
+	/**  */
+	private Long id;
+	
+	/**  */
+	private String name;
+	
+	/** 单节课时 */
+	private Integer singleClassMinutes;
+	
+	/** 所属分部列表 */
+	private String organIdList;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	/**  */
+	private java.util.Date updateTime;
+	
+	/** 老师编号 */
+	private Integer userId;
+	
+	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 setSingleClassMinutes(Integer singleClassMinutes){
+		this.singleClassMinutes = singleClassMinutes;
+	}
+	
+	public Integer getSingleClassMinutes(){
+		return this.singleClassMinutes;
+	}
+			
+	public void setOrganIdList(String organIdList){
+		this.organIdList = organIdList;
+	}
+	
+	public String getOrganIdList(){
+		return this.organIdList;
+	}
+			
+	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;
+	}
+			
+	public void setUserId(Integer userId){
+		this.userId = userId;
+	}
+	
+	public Integer getUserId(){
+		return this.userId;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 59 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/DemoGroupClassGroupMapper.java

@@ -0,0 +1,59 @@
+package com.ym.mec.biz.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(demo_group_class_group_mapper):
+ */
+public class DemoGroupClassGroupMapper {
+
+	/**  */
+	private Long id;
+	
+	/**  */
+	private Long demoGroupId;
+	
+	/**  */
+	private Integer classGroupId;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	public void setId(Long id){
+		this.id = id;
+	}
+	
+	public Long getId(){
+		return this.id;
+	}
+			
+	public void setDemoGroupId(Long demoGroupId){
+		this.demoGroupId = demoGroupId;
+	}
+	
+	public Long getDemoGroupId(){
+		return this.demoGroupId;
+	}
+			
+	public void setClassGroupId(Integer classGroupId){
+		this.classGroupId = classGroupId;
+	}
+	
+	public Integer getClassGroupId(){
+		return this.classGroupId;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 59 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/DemoGroupCoursesPlan.java

@@ -0,0 +1,59 @@
+package com.ym.mec.biz.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(demo_group_courses_plan):
+ */
+public class DemoGroupCoursesPlan {
+
+	/**  */
+	private Long id;
+	
+	/**  */
+	private Long demoGroupId;
+	
+	/**  */
+	private java.util.Date coursesStartTime;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	public void setId(Long id){
+		this.id = id;
+	}
+	
+	public Long getId(){
+		return this.id;
+	}
+			
+	public void setDemoGroupId(Long demoGroupId){
+		this.demoGroupId = demoGroupId;
+	}
+	
+	public Long getDemoGroupId(){
+		return this.demoGroupId;
+	}
+			
+	public void setCoursesStartTime(java.util.Date coursesStartTime){
+		this.coursesStartTime = coursesStartTime;
+	}
+	
+	public java.util.Date getCoursesStartTime(){
+		return this.coursesStartTime;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/ClassGroupTypeEnum.java

@@ -6,7 +6,7 @@ import com.ym.mec.common.enums.BaseEnum;
  * 班级类型
  */
 public enum ClassGroupTypeEnum implements BaseEnum<String, ClassGroupTypeEnum> {
-	NORMAL("NORMAL", "普通班级"), MIX("MIX", "合奏班级"), HIGH("HIGH", "提高班"), VIP("VIP", "vip课"), TRIAL("trial", "试听课");
+	NORMAL("NORMAL", "普通班级"), MIX("MIX", "合奏班级"), HIGH("HIGH", "提高班"), VIP("VIP", "vip课"), DEMO("demo", "试听课");
 
 	private String code;
 

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/DemoGroupClassGroupMapperService.java

@@ -0,0 +1,8 @@
+package com.ym.mec.biz.service;
+
+import com.ym.mec.biz.dal.entity.DemoGroupClassGroupMapper;
+import com.ym.mec.common.service.BaseService;
+
+public interface DemoGroupClassGroupMapperService extends BaseService<Long, DemoGroupClassGroupMapper> {
+
+}

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/DemoGroupCoursesPlanService.java

@@ -0,0 +1,8 @@
+package com.ym.mec.biz.service;
+
+import com.ym.mec.biz.dal.entity.DemoGroupCoursesPlan;
+import com.ym.mec.common.service.BaseService;
+
+public interface DemoGroupCoursesPlanService extends BaseService<Long, DemoGroupCoursesPlan> {
+
+}

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/DemoGroupService.java

@@ -0,0 +1,8 @@
+package com.ym.mec.biz.service;
+
+import com.ym.mec.biz.dal.entity.DemoGroup;
+import com.ym.mec.common.service.BaseService;
+
+public interface DemoGroupService extends BaseService<Long, DemoGroup> {
+
+}

+ 23 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/DemoGroupClassGroupMapperServiceImpl.java

@@ -0,0 +1,23 @@
+package com.ym.mec.biz.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ym.mec.biz.dal.dao.DemoGroupClassGroupMapperDao;
+import com.ym.mec.biz.dal.entity.DemoGroupClassGroupMapper;
+import com.ym.mec.biz.service.DemoGroupClassGroupMapperService;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+
+@Service
+public class DemoGroupClassGroupMapperServiceImpl extends BaseServiceImpl<Long, DemoGroupClassGroupMapper>  implements DemoGroupClassGroupMapperService {
+	
+	@Autowired
+	private DemoGroupClassGroupMapperDao demoGroupClassGroupMapperDao;
+
+	@Override
+	public BaseDAO<Long, DemoGroupClassGroupMapper> getDAO() {
+		return demoGroupClassGroupMapperDao;
+	}
+	
+}

+ 23 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/DemoGroupCoursesPlanServiceImpl.java

@@ -0,0 +1,23 @@
+package com.ym.mec.biz.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ym.mec.biz.dal.dao.DemoGroupCoursesPlanDao;
+import com.ym.mec.biz.dal.entity.DemoGroupCoursesPlan;
+import com.ym.mec.biz.service.DemoGroupCoursesPlanService;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+
+@Service
+public class DemoGroupCoursesPlanServiceImpl extends BaseServiceImpl<Long, DemoGroupCoursesPlan>  implements DemoGroupCoursesPlanService {
+	
+	@Autowired
+	private DemoGroupCoursesPlanDao demoGroupCoursesPlanDao;
+
+	@Override
+	public BaseDAO<Long, DemoGroupCoursesPlan> getDAO() {
+		return demoGroupCoursesPlanDao;
+	}
+	
+}

+ 23 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/DemoGroupServiceImpl.java

@@ -0,0 +1,23 @@
+package com.ym.mec.biz.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ym.mec.biz.dal.dao.DemoGroupDao;
+import com.ym.mec.biz.dal.entity.DemoGroup;
+import com.ym.mec.biz.service.DemoGroupService;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+
+@Service
+public class DemoGroupServiceImpl extends BaseServiceImpl<Long, DemoGroup>  implements DemoGroupService {
+	
+	@Autowired
+	private DemoGroupDao demoGroupDao;
+
+	@Override
+	public BaseDAO<Long, DemoGroup> getDAO() {
+		return demoGroupDao;
+	}
+	
+}

+ 68 - 0
mec-biz/src/main/resources/config/mybatis/DemoGroupClassGroupMapperMapper.xml

@@ -0,0 +1,68 @@
+<?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.DemoGroupClassGroupMapperDao">
+	
+	<resultMap type="com.ym.mec.biz.dal.entity.DemoGroupClassGroupMapper" id="DemoGroupClassGroupMapper">
+		<result column="id_" property="id" />
+		<result column="demo_group_id_" property="demoGroupId" />
+		<result column="class_group_id_" property="classGroupId" />
+		<result column="create_time_" property="createTime" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="DemoGroupClassGroupMapper" >
+		SELECT * FROM demo_group_class_group_mapper WHERE id_ = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="DemoGroupClassGroupMapper">
+		SELECT * FROM demo_group_class_group_mapper ORDER BY id_
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.DemoGroupClassGroupMapper" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!--
+		<selectKey resultClass="int" keyProperty="id" > 
+		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
+		</selectKey>
+		-->
+		INSERT INTO demo_group_class_group_mapper (id_,demo_group_id_,class_group_id_,create_time_) VALUES(#{id},#{demoGroupId},#{classGroupId},#{createTime})
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.DemoGroupClassGroupMapper">
+		UPDATE demo_group_class_group_mapper <set>
+<if test="id != null">
+id_ = #{id},
+</if>
+<if test="classGroupId != null">
+class_group_id_ = #{classGroupId},
+</if>
+<if test="demoGroupId != null">
+demo_group_id_ = #{demoGroupId},
+</if>
+<if test="createTime != null">
+create_time_ = #{createTime},
+</if>
+</set> WHERE id_ = #{id} 
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM demo_group_class_group_mapper WHERE id_ = #{id} 
+	</delete>
+	
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="DemoGroupClassGroupMapper" parameterType="map">
+		SELECT * FROM demo_group_class_group_mapper ORDER BY id_ <include refid="global.limit"/>
+	</select>
+	
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM demo_group_class_group_mapper
+	</select>
+</mapper>

+ 68 - 0
mec-biz/src/main/resources/config/mybatis/DemoGroupCoursesPlanMapper.xml

@@ -0,0 +1,68 @@
+<?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.DemoGroupCoursesPlanDao">
+	
+	<resultMap type="com.ym.mec.biz.dal.entity.DemoGroupCoursesPlan" id="DemoGroupCoursesPlan">
+		<result column="id_" property="id" />
+		<result column="demo_group_id_" property="demoGroupId" />
+		<result column="courses_start_time_" property="coursesStartTime" />
+		<result column="create_time_" property="createTime" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="DemoGroupCoursesPlan" >
+		SELECT * FROM demo_group_courses_plan WHERE id_ = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="DemoGroupCoursesPlan">
+		SELECT * FROM demo_group_courses_plan ORDER BY id_
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.DemoGroupCoursesPlan" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!--
+		<selectKey resultClass="int" keyProperty="id" > 
+		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
+		</selectKey>
+		-->
+		INSERT INTO demo_group_courses_plan (id_,demo_group_id_,courses_start_time_,create_time_) VALUES(#{id},#{demoGroupId},#{coursesStartTime},#{createTime})
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.DemoGroupCoursesPlan">
+		UPDATE demo_group_courses_plan <set>
+<if test="id != null">
+id_ = #{id},
+</if>
+<if test="demoGroupId != null">
+demo_group_id_ = #{demoGroupId},
+</if>
+<if test="coursesStartTime != null">
+courses_start_time_ = #{coursesStartTime},
+</if>
+<if test="createTime != null">
+create_time_ = #{createTime},
+</if>
+</set> WHERE id_ = #{id} 
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM demo_group_courses_plan WHERE id_ = #{id} 
+	</delete>
+	
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="DemoGroupCoursesPlan" parameterType="map">
+		SELECT * FROM demo_group_courses_plan ORDER BY id_ <include refid="global.limit"/>
+	</select>
+	
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM demo_group_courses_plan
+	</select>
+</mapper>

+ 80 - 0
mec-biz/src/main/resources/config/mybatis/DemoGroupMapper.xml

@@ -0,0 +1,80 @@
+<?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.DemoGroupDao">
+	
+	<resultMap type="com.ym.mec.biz.dal.entity.DemoGroup" id="DemoGroup">
+		<result column="id_" property="id" />
+		<result column="name_" property="name" />
+		<result column="single_class_minutes_" property="singleClassMinutes" />
+		<result column="organ_id_list_" property="organIdList" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+		<result column="user_id_" property="userId" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="DemoGroup" >
+		SELECT * FROM demo_group WHERE id_ = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="DemoGroup">
+		SELECT * FROM demo_group ORDER BY id_
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.DemoGroup" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!--
+		<selectKey resultClass="int" keyProperty="id" > 
+		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
+		</selectKey>
+		-->
+		INSERT INTO demo_group (id_,name_,single_class_minutes_,organ_id_list_,create_time_,update_time_,user_id_) VALUES(#{id},#{name},#{singleClassMinutes},#{organIdList},#{createTime},#{updateTime},#{userId})
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.DemoGroup">
+		UPDATE demo_group <set>
+<if test="userId != null">
+user_id_ = #{userId},
+</if>
+<if test="id != null">
+id_ = #{id},
+</if>
+<if test="updateTime != null">
+update_time_ = #{updateTime},
+</if>
+<if test="singleClassMinutes != null">
+single_class_minutes_ = #{singleClassMinutes},
+</if>
+<if test="organIdList != null">
+organ_id_list_ = #{organIdList},
+</if>
+<if test="name != null">
+name_ = #{name},
+</if>
+<if test="createTime != null">
+create_time_ = #{createTime},
+</if>
+</set> WHERE id_ = #{id} 
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM demo_group WHERE id_ = #{id} 
+	</delete>
+	
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="DemoGroup" parameterType="map">
+		SELECT * FROM demo_group ORDER BY id_ <include refid="global.limit"/>
+	</select>
+	
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM demo_group
+	</select>
+</mapper>