Преглед изворни кода

Merge branch 'dev_1_2_1_20220802'

liujunchi пре 3 година
родитељ
комит
c2580e07df

+ 12 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/LessonGroupVo.java

@@ -1,6 +1,7 @@
 package com.yonge.cooleshow.biz.dal.vo;
 
 import com.yonge.cooleshow.common.entity.BaseEntity;
+import com.yonge.cooleshow.common.enums.YesOrNoEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -50,6 +51,17 @@ public class LessonGroupVo extends BaseEntity {
     @ApiModelProperty("购买人数")
     private Integer countStudent;
 
+    @ApiModelProperty("审核版本")
+    private YesOrNoEnum auditVersion;
+
+    public YesOrNoEnum getAuditVersion() {
+        return auditVersion;
+    }
+
+    public void setAuditVersion(YesOrNoEnum auditVersion) {
+        this.auditVersion = auditVersion;
+    }
+
     public String getRealName() {
         return realName;
     }

+ 12 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/VideoLessonStudentDetailVo.java

@@ -1,6 +1,7 @@
 package com.yonge.cooleshow.biz.dal.vo;
 
 import com.yonge.cooleshow.common.entity.BaseEntity;
+import com.yonge.cooleshow.common.enums.YesOrNoEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -34,6 +35,17 @@ public class VideoLessonStudentDetailVo extends BaseEntity {
     @ApiModelProperty("购买时间")
     private String purchaseTime;
 
+    @ApiModelProperty("审核版本")
+    private YesOrNoEnum auditVersion;
+
+    public YesOrNoEnum getAuditVersion() {
+        return auditVersion;
+    }
+
+    public void setAuditVersion(YesOrNoEnum auditVersion) {
+        this.auditVersion = auditVersion;
+    }
+
     public String getLessonSubjectName() {
         return lessonSubjectName;
     }

+ 15 - 5
cooleshow-user/user-biz/src/main/resources/config/mybatis/SubjectMapper.xml

@@ -34,23 +34,33 @@
         <trim prefixOverrides="union all">
             <if test="type == null or type =='MUSIC'">
                 union all
-                (select a.music_subject_ as subject_id_ from music_sheet a GROUP BY a.music_subject_)
+                (select a.music_subject_ as subject_id_ from music_sheet a
+                    where a.del_flag_ = 0 and a.state_ = 1
+                    GROUP BY a.music_subject_)
             </if>
             <if test="type == null or type =='VIDEO'">
                 union all
-                (select a.lesson_subject_ as subject_id_ from video_lesson_group a GROUP BY a.lesson_subject_)
+                (select a.lesson_subject_ as subject_id_ from video_lesson_group a
+                    where a.audit_status_ = 'PASS' and a.shelves_flag_ = 1
+                    GROUP BY a.lesson_subject_)
             </if>
             <if test="type == null or type =='PINAO_ROOM'">
                 union all
-                (select a.subject_id_ as subject_id_ from course_group a where a.type_ = 'PIANO_ROOM_CLASS' GROUP BY a.subject_id_)
+                (select a.subject_id_ as subject_id_ from course_group a
+                    where a.type_ = 'PIANO_ROOM_CLASS' and a.status_ in ('ING','COMPLETE','APPLY')
+                    GROUP BY a.subject_id_)
             </if>
             <if test="type == null or type =='PRACTICE'">
                 union all
-                (select a.subject_id_ as subject_id_ from course_group a where a.type_ = 'PRACTICE' GROUP BY a.subject_id_)
+                (select a.subject_id_ as subject_id_ from course_group a
+                    where a.type_ = 'PRACTICE' and a.status_ in ('ING','COMPLETE','APPLY')
+                    GROUP BY a.subject_id_)
             </if>
             <if test="type == null or type =='LIVE'">
                 union all
-                (select a.subject_id_ as subject_id_ from course_group a where a.type_ = 'LIVE' GROUP BY a.subject_id_)
+                (select a.subject_id_ as subject_id_ from course_group a
+                    where a.type_ = 'LIVE' and a.status_ in ('ING','COMPLETE','APPLY')
+                    GROUP BY a.subject_id_)
             </if>
         </trim>
         ) a on t.id_ = a.subject_id_

+ 5 - 1
cooleshow-user/user-biz/src/main/resources/config/mybatis/VideoLessonGroupMapper.xml

@@ -43,6 +43,7 @@
 		g.shelves_time_ as shelvesTime,
 		g.shelves_reason_ as shelvesReason,
 		g.audit_status_ AS auditStatus,
+		g.audit_version_ as auditVersion,
 		g.shelves_id_ as shelvesId,
 		g.create_time_ AS createTime,
 		g.update_time_ AS updateTime,
@@ -108,6 +109,7 @@
 			<if test="shelvesTime !=null">shelves_time_ = #{shelvesTime},</if>
 			<if test="shelvesReason !=null and shelvesReason!=''">shelves_reason_ = #{shelvesReason},</if>
 			<if test="shelvesId !=null">shelves_id_ = #{shelvesId},</if>
+		    <if test="shelvesFlag != null and shelvesFlag == 0">audit_status_ = 'DOING',audit_name_ = null,audit_id_ = null,</if>
 			update_time_ = SYSDATE()
 		</set>
 		WHERE id_ = #{id}
@@ -160,7 +162,8 @@
 			g.lesson_count_ AS lessonCount,
 			p.pay_money_ AS payMoney,
 			p.order_no_ AS orderNo,
-			p.purchase_time_ AS purchaseTime
+			p.purchase_time_ AS purchaseTime,
+			g.audit_version_ as auditVersion
 		FROM video_lesson_group g
 		LEFT JOIN video_lesson_purchase_record p ON g.id_ = p.video_lesson_group_id_
 		LEFT JOIN sys_user s ON g.teacher_id_ = s.id_
@@ -279,6 +282,7 @@
 			u.username_ AS userName,
 			u.real_name_ AS realName,
 			u.avatar_ AS avatar,
+			g.audit_version_ as auditVersion,
 			(SELECT COUNT(1) FROM video_lesson_purchase_record r WHERE r.video_lesson_group_id_=g.id_ AND r.order_status_='PAID') AS countStudent
 		FROM video_lesson_group g
 		LEFT JOIN sys_user u ON g.teacher_id_=u.id_

+ 7 - 0
cooleshow-user/user-website/src/main/java/com/yonge/cooleshow/website/controller/CourseGroupController.java

@@ -85,5 +85,12 @@ public class CourseGroupController extends BaseController {
         return succeed(courseGroupService.getLiveLockTimeCache(teacherId).get(teacherId));
     }
 
+
+    @ApiOperation("修改直播课程组")
+    @PostMapping("/updateLiveCourse")
+    public HttpResponseResult<Object> updateLiveCourse(@RequestBody LiveCourseGroupDto dto) {
+        courseGroupService.updateLiveCourse(dto);
+        return succeed();
+    }
 }