yonge 5 years ago
parent
commit
1355108bb5
22 changed files with 434 additions and 208 deletions
  1. 9 0
      mec-web/src/main/java/com/ym/mec/web/dal/dao/StudentAttendanceDao.java
  2. 0 9
      mec-web/src/main/java/com/ym/mec/web/dal/dao/StudentRollCallDao.java
  3. 9 0
      mec-web/src/main/java/com/ym/mec/web/dal/dao/SysNewsInformationDao.java
  4. 9 0
      mec-web/src/main/java/com/ym/mec/web/dal/dao/TeacherAttendanceDao.java
  5. 0 9
      mec-web/src/main/java/com/ym/mec/web/dal/dao/TeacherSignInDao.java
  6. 9 8
      mec-web/src/main/java/com/ym/mec/web/dal/entity/StudentAttendance.java
  7. 103 0
      mec-web/src/main/java/com/ym/mec/web/dal/entity/SysNewsInformation.java
  8. 8 8
      mec-web/src/main/java/com/ym/mec/web/dal/entity/TeacherAttendance.java
  9. 8 0
      mec-web/src/main/java/com/ym/mec/web/service/StudentAttendanceService.java
  10. 0 8
      mec-web/src/main/java/com/ym/mec/web/service/StudentRollCallService.java
  11. 8 0
      mec-web/src/main/java/com/ym/mec/web/service/SysNewsInformationService.java
  12. 8 0
      mec-web/src/main/java/com/ym/mec/web/service/TeacherAttendanceService.java
  13. 0 8
      mec-web/src/main/java/com/ym/mec/web/service/TeacherSignInService.java
  14. 23 0
      mec-web/src/main/java/com/ym/mec/web/service/impl/StudentAttendanceServiceImpl.java
  15. 0 23
      mec-web/src/main/java/com/ym/mec/web/service/impl/StudentRollCallServiceImpl.java
  16. 23 0
      mec-web/src/main/java/com/ym/mec/web/service/impl/SysNewsInformationServiceImpl.java
  17. 23 0
      mec-web/src/main/java/com/ym/mec/web/service/impl/TeacherAttendanceServiceImpl.java
  18. 0 23
      mec-web/src/main/java/com/ym/mec/web/service/impl/TeacherSignInServiceImpl.java
  19. 92 0
      mec-web/src/main/resources/config.mybatis/StudentAttendanceMapper.xml
  20. 0 94
      mec-web/src/main/resources/config.mybatis/StudentRollCallMapper.xml
  21. 84 0
      mec-web/src/main/resources/config.mybatis/SysNewsInformationMapper.xml
  22. 18 18
      mec-web/src/main/resources/config.mybatis/TeacherAttendanceMapper.xml

+ 9 - 0
mec-web/src/main/java/com/ym/mec/web/dal/dao/StudentAttendanceDao.java

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

+ 0 - 9
mec-web/src/main/java/com/ym/mec/web/dal/dao/StudentRollCallDao.java

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

+ 9 - 0
mec-web/src/main/java/com/ym/mec/web/dal/dao/SysNewsInformationDao.java

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

+ 9 - 0
mec-web/src/main/java/com/ym/mec/web/dal/dao/TeacherAttendanceDao.java

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

+ 0 - 9
mec-web/src/main/java/com/ym/mec/web/dal/dao/TeacherSignInDao.java

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

+ 9 - 8
mec-web/src/main/java/com/ym/mec/web/dal/entity/StudentRollCall.java → mec-web/src/main/java/com/ym/mec/web/dal/entity/StudentAttendance.java

@@ -3,9 +3,9 @@ package com.ym.mec.web.dal.entity;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 /**
- * 对应数据库表(student_roll_call):
+ * 对应数据库表(student_attendance):
  */
-public class StudentRollCall {
+public class StudentAttendance {
 
 	/**  */
 	private Long id;
@@ -34,6 +34,7 @@ public class StudentRollCall {
 	/**  */
 	private java.util.Date createTime;
 	
+	/** 如果是请假状态,此字段就指请假原因 */
 	private String remark;
 	
 	public void setId(Long id){
@@ -108,14 +109,14 @@ public class StudentRollCall {
 		return this.createTime;
 	}
 			
-	public String getRemark() {
-		return remark;
-	}
-
-	public void setRemark(String remark) {
+	public void setRemark(String remark){
 		this.remark = remark;
 	}
-
+	
+	public String getRemark(){
+		return this.remark;
+	}
+			
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 103 - 0
mec-web/src/main/java/com/ym/mec/web/dal/entity/SysNewsInformation.java

@@ -0,0 +1,103 @@
+package com.ym.mec.web.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(sys_news_information):
+ */
+public class SysNewsInformation {
+
+	/**  */
+	private Long id;
+	
+	/** 标题 */
+	private String title;
+	
+	/** 内容 */
+	private String content;
+	
+	/** 封面图片 */
+	private String coverImage;
+	
+	/** 类型 */
+	private Integer type;
+	
+	/** 状态(1-可见 0-不可见) */
+	private String status;
+	
+	/**  */
+	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 setTitle(String title){
+		this.title = title;
+	}
+	
+	public String getTitle(){
+		return this.title;
+	}
+			
+	public void setContent(String content){
+		this.content = content;
+	}
+	
+	public String getContent(){
+		return this.content;
+	}
+			
+	public void setCoverImage(String coverImage){
+		this.coverImage = coverImage;
+	}
+	
+	public String getCoverImage(){
+		return this.coverImage;
+	}
+			
+	public void setType(Integer type){
+		this.type = type;
+	}
+	
+	public Integer getType(){
+		return this.type;
+	}
+			
+	public void setStatus(String status){
+		this.status = status;
+	}
+	
+	public String getStatus(){
+		return this.status;
+	}
+			
+	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);
+	}
+
+}

+ 8 - 8
mec-web/src/main/java/com/ym/mec/web/dal/entity/TeacherSignIn.java → mec-web/src/main/java/com/ym/mec/web/dal/entity/TeacherAttendance.java

@@ -3,9 +3,9 @@ package com.ym.mec.web.dal.entity;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 /**
- * 对应数据库表(teacher_sign_in):
+ * 对应数据库表(teacher_attendance):
  */
-public class TeacherSignIn {
+public class TeacherAttendance {
 
 	/**  */
 	private Long id;
@@ -28,8 +28,8 @@ public class TeacherSignIn {
 	/** 签到时间 */
 	private java.util.Date signInTime;
 	
-	/** 签到类型(正常签到,异常签到) */
-	private String type;
+	/** 状态(正常签到,异常签到) */
+	private String status;
 	
 	/** 备注 */
 	private String remark;
@@ -93,12 +93,12 @@ public class TeacherSignIn {
 		return this.signInTime;
 	}
 			
-	public void setType(String type){
-		this.type = type;
+	public void setStatus(String status){
+		this.status = status;
 	}
 	
-	public String getType(){
-		return this.type;
+	public String getStatus(){
+		return this.status;
 	}
 			
 	public void setRemark(String remark){

+ 8 - 0
mec-web/src/main/java/com/ym/mec/web/service/StudentAttendanceService.java

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

+ 0 - 8
mec-web/src/main/java/com/ym/mec/web/service/StudentRollCallService.java

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

+ 8 - 0
mec-web/src/main/java/com/ym/mec/web/service/SysNewsInformationService.java

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

+ 8 - 0
mec-web/src/main/java/com/ym/mec/web/service/TeacherAttendanceService.java

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

+ 0 - 8
mec-web/src/main/java/com/ym/mec/web/service/TeacherSignInService.java

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

+ 23 - 0
mec-web/src/main/java/com/ym/mec/web/service/impl/StudentAttendanceServiceImpl.java

@@ -0,0 +1,23 @@
+package com.ym.mec.web.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.web.dal.dao.StudentAttendanceDao;
+import com.ym.mec.web.dal.entity.StudentAttendance;
+import com.ym.mec.web.service.StudentAttendanceService;
+
+@Service
+public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentAttendance>  implements StudentAttendanceService {
+	
+	@Autowired
+	private StudentAttendanceDao studentAttendanceDao;
+
+	@Override
+	public BaseDAO<Long, StudentAttendance> getDAO() {
+		return studentAttendanceDao;
+	}
+	
+}

+ 0 - 23
mec-web/src/main/java/com/ym/mec/web/service/impl/StudentRollCallServiceImpl.java

@@ -1,23 +0,0 @@
-package com.ym.mec.web.service.impl;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import com.ym.mec.common.dal.BaseDAO;
-import com.ym.mec.common.service.impl.BaseServiceImpl;
-import com.ym.mec.web.dal.dao.StudentRollCallDao;
-import com.ym.mec.web.dal.entity.StudentRollCall;
-import com.ym.mec.web.service.StudentRollCallService;
-
-@Service
-public class StudentRollCallServiceImpl extends BaseServiceImpl<Long, StudentRollCall>  implements StudentRollCallService {
-	
-	@Autowired
-	private StudentRollCallDao studentRollCallDao;
-
-	@Override
-	public BaseDAO<Long, StudentRollCall> getDAO() {
-		return studentRollCallDao;
-	}
-	
-}

+ 23 - 0
mec-web/src/main/java/com/ym/mec/web/service/impl/SysNewsInformationServiceImpl.java

@@ -0,0 +1,23 @@
+package com.ym.mec.web.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.web.dal.dao.SysNewsInformationDao;
+import com.ym.mec.web.dal.entity.SysNewsInformation;
+import com.ym.mec.web.service.SysNewsInformationService;
+
+@Service
+public class SysNewsInformationServiceImpl extends BaseServiceImpl<Long, SysNewsInformation>  implements SysNewsInformationService {
+	
+	@Autowired
+	private SysNewsInformationDao sysNewsInformationDao;
+
+	@Override
+	public BaseDAO<Long, SysNewsInformation> getDAO() {
+		return sysNewsInformationDao;
+	}
+	
+}

+ 23 - 0
mec-web/src/main/java/com/ym/mec/web/service/impl/TeacherAttendanceServiceImpl.java

@@ -0,0 +1,23 @@
+package com.ym.mec.web.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.web.dal.dao.TeacherAttendanceDao;
+import com.ym.mec.web.dal.entity.TeacherAttendance;
+import com.ym.mec.web.service.TeacherAttendanceService;
+
+@Service
+public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherAttendance>  implements TeacherAttendanceService {
+	
+	@Autowired
+	private TeacherAttendanceDao teacherAttendanceDao;
+
+	@Override
+	public BaseDAO<Long, TeacherAttendance> getDAO() {
+		return teacherAttendanceDao;
+	}
+	
+}

+ 0 - 23
mec-web/src/main/java/com/ym/mec/web/service/impl/TeacherSignInServiceImpl.java

@@ -1,23 +0,0 @@
-package com.ym.mec.web.service.impl;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import com.ym.mec.common.dal.BaseDAO;
-import com.ym.mec.common.service.impl.BaseServiceImpl;
-import com.ym.mec.web.dal.dao.TeacherSignInDao;
-import com.ym.mec.web.dal.entity.TeacherSignIn;
-import com.ym.mec.web.service.TeacherSignInService;
-
-@Service
-public class TeacherSignInServiceImpl extends BaseServiceImpl<Long, TeacherSignIn>  implements TeacherSignInService {
-	
-	@Autowired
-	private TeacherSignInDao teacherSignInDao;
-
-	@Override
-	public BaseDAO<Long, TeacherSignIn> getDAO() {
-		return teacherSignInDao;
-	}
-	
-}

+ 92 - 0
mec-web/src/main/resources/config.mybatis/StudentAttendanceMapper.xml

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

+ 0 - 94
mec-web/src/main/resources/config.mybatis/StudentRollCallMapper.xml

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

+ 84 - 0
mec-web/src/main/resources/config.mybatis/SysNewsInformationMapper.xml

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

+ 18 - 18
mec-web/src/main/resources/config.mybatis/TeacherSignInMapper.xml → mec-web/src/main/resources/config.mybatis/TeacherAttendanceMapper.xml

@@ -4,9 +4,9 @@
 这个文件是自动生成的。
 不要修改此文件。所有改动将在下次重新自动生成时丢失。
 -->
-<mapper namespace="com.ym.mec.web.dal.dao.TeacherSignInDao">
+<mapper namespace="com.ym.mec.web.dal.dao.TeacherAttendanceDao">
 	
-	<resultMap type="com.ym.mec.web.dal.entity.TeacherSignIn" id="TeacherSignIn">
+	<resultMap type="com.ym.mec.web.dal.entity.TeacherAttendance" id="TeacherAttendance">
 		<result column="id_" property="id" />
 		<result column="teacher_id_" property="teacherId" />
 		<result column="music_group_id_" property="musicGroupId" />
@@ -14,37 +14,40 @@
 		<result column="class_group_id_" property="classGroupId" />
 		<result column="course_schedule_id_" property="courseScheduleId" />
 		<result column="sign_in_time_" property="signInTime" />
-		<result column="type_" property="type" />
+		<result column="status_" property="status" />
 		<result column="remark_" property="remark" />
 		<result column="create_time_" property="createTime" />
 	</resultMap>
 	
 	<!-- 根据主键查询一条记录 -->
-	<select id="get" resultMap="TeacherSignIn" >
-		SELECT * FROM teacher_sign_in WHERE id_ = #{id} 
+	<select id="get" resultMap="TeacherAttendance" >
+		SELECT * FROM teacher_attendance WHERE id_ = #{id} 
 	</select>
 	
 	<!-- 全查询 -->
-	<select id="findAll" resultMap="TeacherSignIn">
-		SELECT * FROM teacher_sign_in ORDER BY id_
+	<select id="findAll" resultMap="TeacherAttendance">
+		SELECT * FROM teacher_attendance ORDER BY id_
 	</select>
 	
 	<!-- 向数据库增加一条记录 -->
-	<insert id="insert" parameterType="com.ym.mec.web.dal.entity.TeacherSignIn" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+	<insert id="insert" parameterType="com.ym.mec.web.dal.entity.TeacherAttendance" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
 		<!--
 		<selectKey resultClass="int" keyProperty="id" > 
 		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
 		</selectKey>
 		-->
-		INSERT INTO teacher_sign_in (id_,teacher_id_,music_group_id_,subject_id_,class_group_id_,course_schedule_id_,sign_in_time_,type_,remark_,create_time_) VALUES(#{id},#{teacherId},#{musicGroupId},#{subjectId},#{classGroupId},#{courseScheduleId},#{signInTime},#{type},#{remark},#{createTime})
+		INSERT INTO teacher_attendance (id_,teacher_id_,music_group_id_,subject_id_,class_group_id_,course_schedule_id_,sign_in_time_,status_,remark_,create_time_) VALUES(#{id},#{teacherId},#{musicGroupId},#{subjectId},#{classGroupId},#{courseScheduleId},#{signInTime},#{status},#{remark},#{createTime})
 	</insert>
 	
 	<!-- 根据主键查询一条记录 -->
-	<update id="update" parameterType="com.ym.mec.web.dal.entity.TeacherSignIn">
-		UPDATE teacher_sign_in <set>
+	<update id="update" parameterType="com.ym.mec.web.dal.entity.TeacherAttendance">
+		UPDATE teacher_attendance <set>
 <if test="subjectId != null">
 subject_id_ = #{subjectId},
 </if>
+<if test="status != null">
+status_ = #{status},
+</if>
 <if test="remark != null">
 remark_ = #{remark},
 </if>
@@ -66,9 +69,6 @@ course_schedule_id_ = #{courseScheduleId},
 <if test="musicGroupId != null">
 music_group_id_ = #{musicGroupId},
 </if>
-<if test="type != null">
-type_ = #{type},
-</if>
 <if test="createTime != null">
 create_time_ = #{createTime},
 </if>
@@ -77,16 +77,16 @@ create_time_ = #{createTime},
 	
 	<!-- 根据主键删除一条记录 -->
 	<delete id="delete" >
-		DELETE FROM teacher_sign_in WHERE id_ = #{id} 
+		DELETE FROM teacher_attendance WHERE id_ = #{id} 
 	</delete>
 	
 	<!-- 分页查询 -->
-	<select id="queryPage" resultMap="TeacherSignIn" parameterType="map">
-		SELECT * FROM teacher_sign_in ORDER BY id_ <include refid="global.limit"/>
+	<select id="queryPage" resultMap="TeacherAttendance" parameterType="map">
+		SELECT * FROM teacher_attendance ORDER BY id_ <include refid="global.limit"/>
 	</select>
 	
 	<!-- 查询当前表的总记录数 -->
 	<select id="queryCount" resultType="int">
-		SELECT COUNT(*) FROM teacher_sign_in
+		SELECT COUNT(*) FROM teacher_attendance
 	</select>
 </mapper>