Forráskód Böngészése

Merge branch 'master' of http://git.dayaedu.com/yonge/cooleshow

liujunchi 3 éve
szülő
commit
4a52a62bb5
14 módosított fájl, 485 hozzáadás és 9 törlés
  1. 38 0
      cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/VideoLessonController.java
  2. 5 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/VideoLessonGroupDao.java
  3. 15 3
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/VideoLessonGroupSearch.java
  4. 86 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/VideoLessonSearch.java
  5. 3 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/VideoLessonGroupDetailService.java
  6. 4 3
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/VideoLessonGroupService.java
  7. 27 3
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/VideoLessonGroupDetailServiceImpl.java
  8. 12 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/VideoLessonGroupServiceImpl.java
  9. 27 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/valid/EnumValid.java
  10. 64 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/valid/impl/EnumValidtor.java
  11. 89 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/VideoLessonStudentDetailVo.java
  12. 34 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/VideoLessonStudentVo.java
  13. 44 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/VideoLessonGroupMapper.xml
  14. 37 0
      cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/VideoLessonController.java

+ 38 - 0
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/VideoLessonController.java

@@ -0,0 +1,38 @@
+package com.yonge.cooleshow.admin.controller;
+
+import com.yonge.cooleshow.biz.dal.dto.search.VideoLessonSearch;
+import com.yonge.cooleshow.biz.dal.service.VideoLessonGroupService;
+import com.yonge.cooleshow.biz.dal.support.PageUtil;
+import com.yonge.cooleshow.biz.dal.vo.VideoLessonStudentDetailVo;
+import com.yonge.cooleshow.common.controller.BaseController;
+import com.yonge.cooleshow.common.entity.HttpResponseResult;
+import com.yonge.cooleshow.common.page.PageInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+* @Author: cy
+* @Date: 2022/4/2
+*/
+@RestController
+@RequestMapping("/videoLesson")
+@Api(tags = "视频课")
+@Validated
+public class VideoLessonController extends BaseController {
+	@Autowired
+	private VideoLessonGroupService lessonGroupService;
+
+    /**
+    * @Description: 查询学员购买视频课
+    * @Author: cy
+    * @Date: 2022/4/2
+    */
+    @ApiOperation(value = "查询学员购买视频课")
+    @PostMapping(value = "/selectStudentPage")
+    public HttpResponseResult<PageInfo<VideoLessonStudentDetailVo>> selectStudentPage(@RequestBody VideoLessonSearch query) {
+        return succeed(PageUtil.pageInfo(lessonGroupService.selectStudentPage(PageUtil.getPage(query), query)));
+    }
+}

+ 5 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/VideoLessonGroupDao.java

@@ -2,10 +2,12 @@ package com.yonge.cooleshow.biz.dal.dao;
 
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.yonge.cooleshow.biz.dal.dto.search.VideoLessonGroupSearch;
 import com.yonge.cooleshow.biz.dal.dto.search.VideoLessonGroupSearch;
+import com.yonge.cooleshow.biz.dal.dto.search.VideoLessonSearch;
 import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroup;
 import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroup;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupUpVo;
 import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupUpVo;
 import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupVo;
 import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupVo;
+import com.yonge.cooleshow.biz.dal.vo.VideoLessonStudentDetailVo;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 
 
 import java.util.List;
 import java.util.List;
@@ -22,4 +24,7 @@ public interface VideoLessonGroupDao extends BaseMapper<VideoLessonGroup> {
 
 
     //修改视频课组
     //修改视频课组
     void updateGroup(VideoLessonGroupUpVo lessonGroupUpVo);
     void updateGroup(VideoLessonGroupUpVo lessonGroupUpVo);
+
+    //查询学员购买视频课
+    List<VideoLessonStudentDetailVo> selectStudentPage(IPage page,@Param("param") VideoLessonSearch videoLessonSearch);
 }
 }

+ 15 - 3
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/VideoLessonGroupSearch.java

@@ -1,5 +1,6 @@
 package com.yonge.cooleshow.biz.dal.dto.search;
 package com.yonge.cooleshow.biz.dal.dto.search;
 
 
+import com.yonge.cooleshow.biz.dal.enums.AuditEnum;
 import com.yonge.cooleshow.biz.dal.support.Query;
 import com.yonge.cooleshow.biz.dal.support.Query;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
@@ -11,13 +12,24 @@ import io.swagger.annotations.ApiModelProperty;
 @ApiModel(value = "VideoLessonGroupSearch", description = "视频课组列表查询")
 @ApiModel(value = "VideoLessonGroupSearch", description = "视频课组列表查询")
 public class VideoLessonGroupSearch extends Query {
 public class VideoLessonGroupSearch extends Query {
     @ApiModelProperty(value = "审核状态(0:待审核 1:通过 2:未通过)")
     @ApiModelProperty(value = "审核状态(0:待审核 1:通过 2:未通过)")
-    private Integer auditStatus;
+    private AuditEnum auditStatus;
 
 
-    public Integer getAuditStatus() {
+    @ApiModelProperty(value = "视频课组id")
+    private Long groupId;
+
+    public AuditEnum getAuditStatus() {
         return auditStatus;
         return auditStatus;
     }
     }
 
 
-    public void setAuditStatus(Integer auditStatus) {
+    public void setAuditStatus(AuditEnum auditStatus) {
         this.auditStatus = auditStatus;
         this.auditStatus = auditStatus;
     }
     }
+
+    public Long getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(Long groupId) {
+        this.groupId = groupId;
+    }
 }
 }

+ 86 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/VideoLessonSearch.java

@@ -1,8 +1,13 @@
 package com.yonge.cooleshow.biz.dal.dto.search;
 package com.yonge.cooleshow.biz.dal.dto.search;
 
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.yonge.cooleshow.biz.dal.enums.AuditEnum;
 import com.yonge.cooleshow.biz.dal.support.Query;
 import com.yonge.cooleshow.biz.dal.support.Query;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
 
 
 /**
 /**
  * @author: cy
  * @author: cy
@@ -13,6 +18,31 @@ public class VideoLessonSearch extends Query {
     @ApiModelProperty(value = "视频组id")
     @ApiModelProperty(value = "视频组id")
     private Long videoLessonGroupId;
     private Long videoLessonGroupId;
 
 
+    @ApiModelProperty(value = "学生id")
+    private Long studentId;
+
+    @ApiModelProperty(value = "课程编号/老师编号/老师姓名/老师手机")
+    private String search;
+
+    @ApiModelProperty(value = "订单号")
+    private String orderNo;
+
+    @ApiModelProperty("课程声部")
+    private String lessonSubject;
+
+    @ApiModelProperty(value = "审核状态(0:待审核 1:通过 2:未通过)")
+    private Integer auditStatus;
+
+    @ApiModelProperty(value = "申请开始时间")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date startTime;
+
+    @ApiModelProperty(value = "申请结束时间")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date endTime;
+
     public Long getVideoLessonGroupId() {
     public Long getVideoLessonGroupId() {
         return videoLessonGroupId;
         return videoLessonGroupId;
     }
     }
@@ -20,4 +50,60 @@ public class VideoLessonSearch extends Query {
     public void setVideoLessonGroupId(Long videoLessonGroupId) {
     public void setVideoLessonGroupId(Long videoLessonGroupId) {
         this.videoLessonGroupId = videoLessonGroupId;
         this.videoLessonGroupId = videoLessonGroupId;
     }
     }
+
+    public Long getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Long studentId) {
+        this.studentId = studentId;
+    }
+
+    public String getSearch() {
+        return search;
+    }
+
+    public void setSearch(String search) {
+        this.search = search;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public String getLessonSubject() {
+        return lessonSubject;
+    }
+
+    public void setLessonSubject(String lessonSubject) {
+        this.lessonSubject = lessonSubject;
+    }
+
+    public Integer getAuditStatus() {
+        return auditStatus;
+    }
+
+    public void setAuditStatus(Integer auditStatus) {
+        this.auditStatus = auditStatus;
+    }
+
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
 }
 }

+ 3 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/VideoLessonGroupDetailService.java

@@ -7,6 +7,7 @@ import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroupDetail;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupDetailUpVo;
 import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupDetailUpVo;
 import com.yonge.cooleshow.biz.dal.vo.VideoLessonPurchaseStudent;
 import com.yonge.cooleshow.biz.dal.vo.VideoLessonPurchaseStudent;
+import com.yonge.cooleshow.biz.dal.vo.VideoLessonStudentVo;
 
 
 import java.util.List;
 import java.util.List;
 
 
@@ -26,4 +27,6 @@ public interface VideoLessonGroupDetailService extends IService<VideoLessonGroup
     void updateDetail(VideoLessonGroupDetailUpVo detailUpVo, SysUser sysUser);
     void updateDetail(VideoLessonGroupDetailUpVo detailUpVo, SysUser sysUser);
 
 
     void deleteDetail(Long id);
     void deleteDetail(Long id);
+
+    VideoLessonStudentVo selectVideoLesson(Long groupId);
 }
 }

+ 4 - 3
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/VideoLessonGroupService.java

@@ -3,11 +3,10 @@ package com.yonge.cooleshow.biz.dal.service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.yonge.cooleshow.auth.api.entity.SysUser;
 import com.yonge.cooleshow.auth.api.entity.SysUser;
 import com.yonge.cooleshow.biz.dal.dto.search.VideoLessonGroupSearch;
 import com.yonge.cooleshow.biz.dal.dto.search.VideoLessonGroupSearch;
+import com.yonge.cooleshow.biz.dal.dto.search.VideoLessonSearch;
 import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroup;
 import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroup;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupUpVo;
-import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupVo;
-import com.yonge.cooleshow.biz.dal.vo.VideoLessonVo;
+import com.yonge.cooleshow.biz.dal.vo.*;
 
 
 /**
 /**
  * VideoLessonGroupService服务类
  * VideoLessonGroupService服务类
@@ -23,4 +22,6 @@ public interface VideoLessonGroupService extends IService<VideoLessonGroup> {
     void deleteGroup(Long id);
     void deleteGroup(Long id);
 
 
     void add(VideoLessonVo lessonVo, SysUser sysUser);
     void add(VideoLessonVo lessonVo, SysUser sysUser);
+
+    IPage<VideoLessonStudentDetailVo> selectStudentPage(IPage<VideoLessonStudentDetailVo> page, VideoLessonSearch search);
 }
 }

+ 27 - 3
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/VideoLessonGroupDetailServiceImpl.java

@@ -3,14 +3,14 @@ package com.yonge.cooleshow.biz.dal.service.impl;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.yonge.cooleshow.auth.api.entity.SysUser;
 import com.yonge.cooleshow.auth.api.entity.SysUser;
 import com.yonge.cooleshow.biz.dal.dao.VideoLessonGroupDao;
 import com.yonge.cooleshow.biz.dal.dao.VideoLessonGroupDao;
+import com.yonge.cooleshow.biz.dal.dto.search.VideoLessonGroupSearch;
 import com.yonge.cooleshow.biz.dal.dto.search.VideoLessonSearch;
 import com.yonge.cooleshow.biz.dal.dto.search.VideoLessonSearch;
 import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroup;
 import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroup;
 import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroupDetail;
 import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroupDetail;
 import com.yonge.cooleshow.biz.dal.dao.VideoLessonGroupDetailDao;
 import com.yonge.cooleshow.biz.dal.dao.VideoLessonGroupDetailDao;
+import com.yonge.cooleshow.biz.dal.enums.AuditEnum;
 import com.yonge.cooleshow.biz.dal.service.VideoLessonGroupDetailService;
 import com.yonge.cooleshow.biz.dal.service.VideoLessonGroupDetailService;
-import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupDetailUpVo;
-import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupUpVo;
-import com.yonge.cooleshow.biz.dal.vo.VideoLessonPurchaseStudent;
+import com.yonge.cooleshow.biz.dal.vo.*;
 import org.slf4j.Logger;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
@@ -125,6 +125,30 @@ public class VideoLessonGroupDetailServiceImpl extends ServiceImpl<VideoLessonGr
     }
     }
 
 
     /**
     /**
+    * @Description: 根据组id查询视频课&组信息-学生端
+    * @Author: cy
+    * @Date: 2022/4/2
+    */
+    @Override
+    public VideoLessonStudentVo selectVideoLesson(Long groupId) {
+        VideoLessonStudentVo lessonStudentVo = new VideoLessonStudentVo();
+
+        VideoLessonGroupSearch query = new VideoLessonGroupSearch();
+        query.setAuditStatus(AuditEnum.OPEN);
+        query.setGroupId(groupId);
+        List<VideoLessonGroupVo> lessonGroup = videoLessonGroupDao.selectPage(null, query);
+        if (lessonGroup.isEmpty()){
+            return lessonStudentVo;
+        }
+        lessonStudentVo.setLessonGroup(lessonGroup.get(0));
+
+        VideoLessonSearch search = new VideoLessonSearch();
+        search.setVideoLessonGroupId(groupId);
+        lessonStudentVo.setDetailList(videoLessonGroupDetailDao.selectPage(null, search));
+        return lessonStudentVo;
+    }
+
+    /**
     * @Description: 刷新组内lesson_count_
     * @Description: 刷新组内lesson_count_
     * @Author: cy 
     * @Author: cy 
     * @Date: 2022/3/31 
     * @Date: 2022/3/31 

+ 12 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/VideoLessonGroupServiceImpl.java

@@ -4,12 +4,14 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.yonge.cooleshow.auth.api.entity.SysUser;
 import com.yonge.cooleshow.auth.api.entity.SysUser;
 import com.yonge.cooleshow.biz.dal.dao.VideoLessonGroupDetailDao;
 import com.yonge.cooleshow.biz.dal.dao.VideoLessonGroupDetailDao;
 import com.yonge.cooleshow.biz.dal.dto.search.VideoLessonGroupSearch;
 import com.yonge.cooleshow.biz.dal.dto.search.VideoLessonGroupSearch;
+import com.yonge.cooleshow.biz.dal.dto.search.VideoLessonSearch;
 import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroup;
 import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroup;
 import com.yonge.cooleshow.biz.dal.dao.VideoLessonGroupDao;
 import com.yonge.cooleshow.biz.dal.dao.VideoLessonGroupDao;
 import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroupDetail;
 import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroupDetail;
 import com.yonge.cooleshow.biz.dal.service.VideoLessonGroupService;
 import com.yonge.cooleshow.biz.dal.service.VideoLessonGroupService;
 import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupUpVo;
 import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupUpVo;
 import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupVo;
 import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupVo;
+import com.yonge.cooleshow.biz.dal.vo.VideoLessonStudentDetailVo;
 import com.yonge.cooleshow.biz.dal.vo.VideoLessonVo;
 import com.yonge.cooleshow.biz.dal.vo.VideoLessonVo;
 import org.slf4j.Logger;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.LoggerFactory;
@@ -101,4 +103,14 @@ public class VideoLessonGroupServiceImpl extends ServiceImpl<VideoLessonGroupDao
         groupUpVo.setId(lessonGroup.getId());
         groupUpVo.setId(lessonGroup.getId());
         videoLessonGroupDao.updateGroup(groupUpVo);
         videoLessonGroupDao.updateGroup(groupUpVo);
     }
     }
+
+    /**
+    * @Description: 查询学员购买视频课
+    * @Author: cy
+    * @Date: 2022/4/2
+    */
+    @Override
+    public IPage<VideoLessonStudentDetailVo> selectStudentPage(IPage<VideoLessonStudentDetailVo> page, VideoLessonSearch search) {
+        return page.setRecords(baseMapper.selectStudentPage(page,search));
+    }
 }
 }

+ 27 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/valid/EnumValid.java

@@ -0,0 +1,27 @@
+package com.yonge.cooleshow.biz.dal.valid;
+
+import com.yonge.cooleshow.biz.dal.valid.impl.EnumValidtor;
+
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import java.lang.annotation.*;
+
+/**
+ * 校验入参是否为指定enum的值的注解
+ */
+@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+@Constraint(validatedBy = {EnumValidtor.class})
+@Documented
+public @interface EnumValid {
+
+    String message() default "";
+
+    Class<?>[] groups() default {};
+
+    Class<? extends Payload>[] payload() default {};
+
+    Class<?>[] target() default {};
+
+    String vaildField() default "getCode";
+}

+ 64 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/valid/impl/EnumValidtor.java

@@ -0,0 +1,64 @@
+package com.yonge.cooleshow.biz.dal.valid.impl;
+
+
+import com.yonge.cooleshow.biz.dal.valid.EnumValid;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+/**
+ * @author: cy
+ * @date: 2022/4/2 14:53
+ */
+public class EnumValidtor implements ConstraintValidator<EnumValid, Object> {
+
+    String vaildField;
+    Class<?>[] cls; //枚举类
+
+    @Override
+    public void initialize(EnumValid constraintAnnotation) {
+        cls = constraintAnnotation.target();
+        vaildField = constraintAnnotation.vaildField();
+    }
+
+    @Override
+    public boolean isValid(Object value, ConstraintValidatorContext context) {
+        if (value != null && value.toString().length() > 0 && cls.length > 0) {
+            for (Class<?> cl : cls) {
+                try {
+                    if (cl.isEnum()) {
+                        //枚举类验证
+                        Object[] objs = cl.getEnumConstants();
+                        Method method = cl.getMethod("name");
+                        for (Object obj : objs) {
+                            Object code = method.invoke(obj, null);
+                            if (value.equals(code.toString())) {
+                                return true;
+                            }
+                        }
+                        Method codeMethod = cl.getMethod(vaildField);
+                        for (Object obj : objs) {
+                            Object code = codeMethod.invoke(obj, null);
+                            if (value.toString().equals(code.toString())) {
+                                return true;
+                            }
+                        }
+                    }
+                } catch (NoSuchMethodException e) {
+                    e.printStackTrace();
+                } catch (IllegalAccessException e) {
+                    e.printStackTrace();
+                } catch (InvocationTargetException e) {
+                    e.printStackTrace();
+                }
+            }
+        } else {
+            return true;
+        }
+        return false;
+    }
+
+}
+

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

@@ -0,0 +1,89 @@
+package com.yonge.cooleshow.biz.dal.vo;
+
+import com.yonge.cooleshow.common.entity.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @author: cy
+ * @date: 2022/4/2 16:04
+ */
+@ApiModel(value = "VideoLessonStudentDetailVo对象")
+public class VideoLessonStudentDetailVo extends BaseEntity {
+    @ApiModelProperty("视频课组id")
+    private String groupId;
+
+    @ApiModelProperty("视频课组名称")
+    private String lessonName;
+
+    @ApiModelProperty("课程声部")
+    private String lessonSubject;
+
+    @ApiModelProperty("课程数")
+    private Integer lessonCount;
+
+    @ApiModelProperty("课程价格")
+    private String lessonPrice;
+
+    @ApiModelProperty("订单号")
+    private String orderNo;
+
+    @ApiModelProperty("购买时间")
+    private String purchaseTime;
+
+    public String getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(String groupId) {
+        this.groupId = groupId;
+    }
+
+    public String getLessonName() {
+        return lessonName;
+    }
+
+    public void setLessonName(String lessonName) {
+        this.lessonName = lessonName;
+    }
+
+    public String getLessonSubject() {
+        return lessonSubject;
+    }
+
+    public void setLessonSubject(String lessonSubject) {
+        this.lessonSubject = lessonSubject;
+    }
+
+    public Integer getLessonCount() {
+        return lessonCount;
+    }
+
+    public void setLessonCount(Integer lessonCount) {
+        this.lessonCount = lessonCount;
+    }
+
+    public String getLessonPrice() {
+        return lessonPrice;
+    }
+
+    public void setLessonPrice(String lessonPrice) {
+        this.lessonPrice = lessonPrice;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public String getPurchaseTime() {
+        return purchaseTime;
+    }
+
+    public void setPurchaseTime(String purchaseTime) {
+        this.purchaseTime = purchaseTime;
+    }
+}

+ 34 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/VideoLessonStudentVo.java

@@ -0,0 +1,34 @@
+package com.yonge.cooleshow.biz.dal.vo;
+
+import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroupDetail;
+import com.yonge.cooleshow.common.entity.BaseEntity;
+import io.swagger.annotations.ApiModel;
+
+import java.util.List;
+
+/**
+ * @author: cy
+ * @date: 2022/4/2 10:04
+ */
+@ApiModel(value = "VideoLessonStudentVo对象")
+public class VideoLessonStudentVo extends BaseEntity {
+    private VideoLessonGroupVo lessonGroup;
+
+    private List<VideoLessonGroupDetail> detailList;
+
+    public VideoLessonGroupVo getLessonGroup() {
+        return lessonGroup;
+    }
+
+    public void setLessonGroup(VideoLessonGroupVo lessonGroup) {
+        this.lessonGroup = lessonGroup;
+    }
+
+    public List<VideoLessonGroupDetail> getDetailList() {
+        return detailList;
+    }
+
+    public void setDetailList(List<VideoLessonGroupDetail> detailList) {
+        this.detailList = detailList;
+    }
+}

+ 44 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/VideoLessonGroupMapper.xml

@@ -68,6 +68,50 @@
 			<if test="param.auditStatus !=null">
 			<if test="param.auditStatus !=null">
 				AND g.audit_status_ = #{param.auditStatus}
 				AND g.audit_status_ = #{param.auditStatus}
 			</if>
 			</if>
+			<if test="param.groupId !=null">
+				AND g.id_ = #{param.groupId}
+			</if>
+		</where>
+	</select>
+	<select id="selectStudentPage" resultType="com.yonge.cooleshow.biz.dal.vo.VideoLessonStudentDetailVo">
+		SELECT
+			g.id_ AS groupId,
+			g.lesson_name_ AS lessonName,
+			g.lesson_subject_ AS lessonSubject,
+			g.lesson_count_ AS lessonCount,
+			g.lesson_price_ AS lessonPrice,
+			p.order_no_ AS orderNo,
+			p.purchase_time_ AS purchaseTime
+		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_
+		<where>
+			<if test="param.studentId !=null">
+				AND p.student_id_ = #{param.studentId}
+			</if>
+			<if test="null != param.search and '' != param.search">
+				AND (
+				s.id_ LIKE CONCAT('%', #{param.search}, '%') OR
+				s.username_ LIKE CONCAT('%', #{param.search}, '%') OR
+				s.phone_ LIKE CONCAT('%', #{param.search}, '%') OR
+				g.id_ LIKE CONCAT('%', #{param.search}, '%')
+				)
+			</if>
+			<if test="null != param.orderNo and '' != param.orderNo">
+				AND p.order_no_ = #{param.orderNo}
+			</if>
+			<if test="null != param.lessonSubject and '' != param.lessonSubject">
+				AND g.lesson_subject_ = #{param.lessonSubject}
+			</if>
+			<if test="param.auditStatus !=null">
+				AND g.audit_status_ = #{param.auditStatus}
+			</if>
+			<if test="param.startTime !=null">
+				<![CDATA[AND p.purchase_time_ >= #{param.startTime} ]]>
+			</if>
+			<if test="param.endTime !=null">
+				<![CDATA[AND p.purchase_time_ <= #{param.endTime} ]]>
+			</if>
 		</where>
 		</where>
 	</select>
 	</select>
 </mapper>
 </mapper>

+ 37 - 0
cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/VideoLessonController.java

@@ -0,0 +1,37 @@
+package com.yonge.cooleshow.student.controller;
+
+import com.yonge.cooleshow.biz.dal.service.VideoLessonGroupDetailService;
+import com.yonge.cooleshow.biz.dal.vo.VideoLessonStudentVo;
+import com.yonge.cooleshow.common.controller.BaseController;
+import com.yonge.cooleshow.common.entity.HttpResponseResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.constraints.NotNull;
+
+/**
+* @Author: cy
+* @Date: 2022/4/2
+*/
+@RestController
+@RequestMapping("/videoLesson")
+@Api(tags = "视频课")
+@Validated
+public class VideoLessonController extends BaseController {
+	@Autowired
+	private VideoLessonGroupDetailService detailService;
+
+    /**
+    * @Description: 根据组id查询视频课
+    * @Author: cy
+    * @Date: 2022/4/2
+    */
+    @ApiOperation(value = "根据组id查询视频课")
+    @GetMapping(value="/selectVideoLesson")
+    public HttpResponseResult<VideoLessonStudentVo> selectVideoLesson(@NotNull(message = "视频组id不能为空") Long groupId) {
+        return succeed(detailService.selectVideoLesson(groupId));
+    }
+}