Browse Source

云教练作业优化

zouxuan 3 years ago
parent
commit
f2f1c1dce2

+ 12 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherHomeworkListDto.java

@@ -11,9 +11,12 @@ import java.util.Date;
  */
 public class TeacherHomeworkListDto {
 
-    @ApiModelProperty(value = "作业编号")
+    @ApiModelProperty(value = "课程编号")
     private Integer courseScheduleId;
 
+    @ApiModelProperty(value = "作业编号")
+    private Integer homeworkId;
+
     @ApiModelProperty(value = "作业内容")
     private String content;
 
@@ -59,6 +62,14 @@ public class TeacherHomeworkListDto {
 
     private int status;
 
+    public Integer getHomeworkId() {
+        return homeworkId;
+    }
+
+    public void setHomeworkId(Integer homeworkId) {
+        this.homeworkId = homeworkId;
+    }
+
     public String getTitle() {
         return title;
     }

+ 4 - 1
mec-biz/src/main/resources/config/mybatis/CourseHomeworkMapper.xml

@@ -158,6 +158,7 @@
 
 	<resultMap id="teacherHomeworkListDto" type="com.ym.mec.biz.dal.dto.TeacherHomeworkListDto">
 		<result property="courseScheduleId" column="course_schedule_id_"/>
+		<result property="homeworkId" column="homework_id_"/>
 		<result property="content" column="content_"/>
 		<result property="title" column="title_"/>
 		<result property="expectNum" column="expect_num_"/>
@@ -331,7 +332,9 @@
 		<include refid="queryHomePageSql"/>
 	</select>
 	<select id="findByIdList" resultMap="teacherHomeworkListDto">
-		SELECT ch.*,
+		SELECT
+		ch.id_ homework_id_,ch.title_,ch.content_,ch.completed_num_,ch.expect_num_,ch.expiry_date_,
+		ch.course_schedule_id_,ch.music_group_id_,
 		DATE_FORMAT(ch.create_time_,'%Y-%m-%d') 'day_',
 		CONCAT(cs.class_date_, ' ',cs.start_class_time_ ) start_class_time_,
 		CONCAT(cs.class_date_, ' ',cs.end_class_time_ ) end_class_time_,

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/ExtracurricularExercisesMapper.xml

@@ -265,7 +265,7 @@
 		<include refid="global.limit"/>
 	</select>
 	<select id="findByIdList" resultMap="com.ym.mec.biz.dal.dao.CourseHomeworkDao.teacherHomeworkListDto">
-		SELECT id_,title_,content_,completed_num_,expect_num_,music_score_id_,expire_date_ expiry_date_,DATE_FORMAT(create_time_,'%Y-%m-%d') 'day_'
+		SELECT id_ homework_id_,title_,content_,completed_num_,expect_num_,music_score_id_,expire_date_ expiry_date_,DATE_FORMAT(create_time_,'%Y-%m-%d') 'day_'
 		FROM extracurricular_exercises WHERE id_ IN
 		<foreach collection="exercisesIdList" separator="," item="item" open="(" close=")">
 			#{item}