浏览代码

小课程详情列表

chengpeng 5 年之前
父节点
当前提交
d986ec320a

+ 8 - 0
mec-education/src/main/java/com/ym/mec/education/controller/VipGroupController.java

@@ -1,6 +1,7 @@
 package com.ym.mec.education.controller;
 package com.ym.mec.education.controller;
 
 
 import com.ym.mec.education.base.BaseResponse;
 import com.ym.mec.education.base.BaseResponse;
+import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.req.VipGroupReq;
 import com.ym.mec.education.req.VipGroupReq;
 import com.ym.mec.education.service.IVipGroupService;
 import com.ym.mec.education.service.IVipGroupService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
@@ -30,4 +31,11 @@ public class VipGroupController {
     public BaseResponse info(@RequestBody VipGroupReq vipGroupReq) {
     public BaseResponse info(@RequestBody VipGroupReq vipGroupReq) {
         return BaseResponse.success(vipGroupService.getInfo(vipGroupReq));
         return BaseResponse.success(vipGroupService.getInfo(vipGroupReq));
     }
     }
+    @PostMapping("/courseList")
+    @ApiOperation("小课详情-le")
+    public PageResponse courseList(@RequestBody VipGroupReq vipGroupReq){
+
+        return null;
+
+    }
 }
 }

+ 5 - 133
mec-education/src/main/java/com/ym/mec/education/entity/CourseSchedule.java

@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import com.ym.mec.common.enums.BaseEnum;
 import com.ym.mec.common.enums.BaseEnum;
+import lombok.Data;
+
 import java.io.Serializable;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.math.BigDecimal;
 import java.sql.Time;
 import java.sql.Time;
@@ -21,6 +23,7 @@ import java.util.Date;
  * @since 2019-09-25
  * @since 2019-09-25
  */
  */
 @TableName("course_schedule")
 @TableName("course_schedule")
+@Data
 public class CourseSchedule extends Model<CourseSchedule> {
 public class CourseSchedule extends Model<CourseSchedule> {
 
 
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
@@ -84,6 +87,8 @@ public class CourseSchedule extends Model<CourseSchedule> {
      */
      */
     @TableField("class_date_")
     @TableField("class_date_")
     private Date classDate;
     private Date classDate;
+    @TableField(exist = false)
+    private String classDateStr;
     /**
     /**
      * 上课时间
      * 上课时间
      */
      */
@@ -129,139 +134,6 @@ public class CourseSchedule extends Model<CourseSchedule> {
     @TableField("name_")
     @TableField("name_")
     private String name;
     private String name;
 
 
-    public Long getId() {
-        return id;
-    }
-
-    public CourseSchedule setId(Long id) {
-        this.id = id;
-        return this;
-    }
-
-    public Integer getClassGroupId() {
-        return classGroupId;
-    }
-
-    public CourseSchedule setClassGroupId(Integer classGroupId) {
-        this.classGroupId = classGroupId;
-        return this;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public CourseSchedule setStatus(String status) {
-        this.status = status;
-        return this;
-    }
-
-    public BigDecimal getSubsidy() {
-        return subsidy;
-    }
-
-    public CourseSchedule setSubsidy(BigDecimal subsidy) {
-        this.subsidy = subsidy;
-        return this;
-    }
-
-    public Date getClassDate() {
-        return classDate;
-    }
-
-    public CourseSchedule setClassDate(Date classDate) {
-        this.classDate = classDate;
-        return this;
-    }
-
-    public Time getStartClassTime() {
-        return startClassTime;
-    }
-
-    public CourseSchedule setStartClassTime(Time startClassTime) {
-        this.startClassTime = startClassTime;
-        return this;
-    }
-
-    public Time getEndClassTime() {
-        return endClassTime;
-    }
-
-    public CourseSchedule setEndClassTime(Time endClassTime) {
-        this.endClassTime = endClassTime;
-        return this;
-    }
-
-    public Integer getTeacherId() {
-        return teacherId;
-    }
-
-    public CourseSchedule setTeacherId(Integer teacherId) {
-        this.teacherId = teacherId;
-        return this;
-    }
-
-    public Integer getActualTeacherId() {
-        return actualTeacherId;
-    }
-
-    public CourseSchedule setActualTeacherId(Integer actualTeacherId) {
-        this.actualTeacherId = actualTeacherId;
-        return this;
-    }
-
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    public CourseSchedule setCreateTime(Date createTime) {
-        this.createTime = createTime;
-        return this;
-    }
-
-    public Date getUpdateTime() {
-        return updateTime;
-    }
-
-    public CourseSchedule setUpdateTime(Date updateTime) {
-        this.updateTime = updateTime;
-        return this;
-    }
-
-    public String getTeachMode() {
-        return teachMode;
-    }
-
-    public CourseSchedule setTeachMode(String teachMode) {
-        this.teachMode = teachMode;
-        return this;
-    }
-
-    public String getComplaintStatus() {
-        return complaintStatus;
-    }
-
-    public CourseSchedule setComplaintStatus(String complaintStatus) {
-        this.complaintStatus = complaintStatus;
-        return this;
-    }
-
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
     @Override
     @Override
     protected Serializable pkVal() {
     protected Serializable pkVal() {
         return this.id;
         return this.id;

+ 34 - 0
mec-education/src/main/java/com/ym/mec/education/enums/CourseStatusEnum.java

@@ -0,0 +1,34 @@
+package com.ym.mec.education.enums;
+
+import com.ym.mec.common.enums.BaseEnum;
+
+public enum CourseStatusEnum implements BaseEnum<String, CourseStatusEnum> {
+    NOT_START("NOT_START","未开始"),
+    UNDERWAY("UNDERWAY","进行中"),
+    OVER("OVER","已结束");
+
+    private String code;
+
+    private String msg;
+
+    CourseStatusEnum(String code, String msg) {
+        this.code = code;
+        this.msg = msg;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    @Override
+    public String getCode() {
+        return this.code;
+    }}

+ 1 - 1
mec-education/src/main/java/com/ym/mec/education/mapper/VipGroupClassGroupMapperMapper.java

@@ -1,7 +1,7 @@
 package com.ym.mec.education.mapper;
 package com.ym.mec.education.mapper;
 
 
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ym.mec.education.entity.VipGroupClassGroupMapper;
 import com.ym.mec.education.entity.VipGroupClassGroupMapper;
-import com.baomidou.mybatisplus.mapper.BaseMapper;
 
 
 /**
 /**
  * <p>
  * <p>

+ 2 - 0
mec-education/src/main/java/com/ym/mec/education/resp/TeacherDetailResp.java

@@ -35,6 +35,8 @@ public class TeacherDetailResp implements Serializable {
 
 
     private Integer hourCount;
     private Integer hourCount;
 
 
+    private Integer used;
+
     @Data
     @Data
     public static class InnerDemoGroup{
     public static class InnerDemoGroup{
         private String dateStr;
         private String dateStr;

+ 42 - 0
mec-education/src/main/java/com/ym/mec/education/resp/VipClassAttendanceResp.java

@@ -0,0 +1,42 @@
+package com.ym.mec.education.resp;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @version V1.0
+ * @Description: TODO
+ * @date Date : 2019年10月03日 14:59
+ */
+
+@Data
+@ToString
+public class VipClassAttendanceResp implements Serializable {
+
+    private String dateStr;
+
+    private String week;
+
+    private String startTime;
+
+    private String endTime;
+
+    private String className;
+
+
+    private String status;
+
+    private Integer currentNum;
+
+    private Integer totalNum;
+
+    private Integer classGroupId;
+
+    private Integer leaveNum;
+
+    private List<String> studentList;
+
+}

+ 37 - 0
mec-education/src/main/java/com/ym/mec/education/resp/VipClassScheduleResp.java

@@ -0,0 +1,37 @@
+package com.ym.mec.education.resp;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+
+/**
+ * @version V1.0
+ * @Description: TODO
+ * @date Date : 2019年10月03日 14:59
+ */
+
+@Data
+@ToString
+public class VipClassScheduleResp implements Serializable {
+
+    private String dateStr;
+
+    private String week;
+
+    private String startTime;
+
+    private String endTime;
+
+    private String className;
+
+
+    private String status;
+
+    private Integer currentNum;
+
+    private Integer totalNum;
+
+    private Integer classGroupId;
+
+}

+ 1 - 1
mec-education/src/main/java/com/ym/mec/education/resp/VipGroupClassResp.java

@@ -20,7 +20,7 @@ public class VipGroupClassResp implements Serializable {
 
 
     private String vipClassType;
     private String vipClassType;
 
 
-    private String classNum;
+    private Integer classNum;
 
 
     private String longTime;
     private String longTime;
 
 

+ 1 - 1
mec-education/src/main/java/com/ym/mec/education/service/IVipGroupClassGroupMapperService.java

@@ -1,7 +1,7 @@
 package com.ym.mec.education.service;
 package com.ym.mec.education.service;
 
 
+import com.baomidou.mybatisplus.extension.service.IService;
 import com.ym.mec.education.entity.VipGroupClassGroupMapper;
 import com.ym.mec.education.entity.VipGroupClassGroupMapper;
-import com.baomidou.mybatisplus.service.IService;
 
 
 /**
 /**
  * <p>
  * <p>

+ 2 - 0
mec-education/src/main/java/com/ym/mec/education/service/IVipGroupService.java

@@ -2,6 +2,7 @@ package com.ym.mec.education.service;
 
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ym.mec.education.base.BaseResponse;
 import com.ym.mec.education.base.BaseResponse;
+import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.entity.VipGroup;
 import com.ym.mec.education.entity.VipGroup;
 import com.ym.mec.education.req.VipGroupReq;
 import com.ym.mec.education.req.VipGroupReq;
 
 
@@ -17,4 +18,5 @@ public interface IVipGroupService extends IService<VipGroup> {
 
 
     BaseResponse getInfo(VipGroupReq vipGroupReq);
     BaseResponse getInfo(VipGroupReq vipGroupReq);
 
 
+    PageResponse courseList(VipGroupReq vipGroupReq);
 }
 }

+ 1 - 2
mec-education/src/main/java/com/ym/mec/education/service/impl/MusicGroupServiceImpl.java

@@ -115,11 +115,10 @@ public class MusicGroupServiceImpl extends ServiceImpl<MusicGroupMapper, MusicGr
             }
             }
             musicGroupResps.add(musicGroupResp);
             musicGroupResps.add(musicGroupResp);
         });
         });
-        int count = this.count(queryWrapper);
         response.setRecords(musicGroupResps);
         response.setRecords(musicGroupResps);
         response.setReturnCode(ReturnCodeEnum.CODE_200.getCode());
         response.setReturnCode(ReturnCodeEnum.CODE_200.getCode());
         response.setMessage(ReturnCodeEnum.CODE_200.getValue());
         response.setMessage(ReturnCodeEnum.CODE_200.getValue());
-        response.setTotal(count);
+        response.setTotal(Math.toIntExact(page.getTotal()));
         return response;
         return response;
     }
     }
 
 

+ 54 - 4
mec-education/src/main/java/com/ym/mec/education/service/impl/TeacherServiceImpl.java

@@ -8,6 +8,7 @@ import com.ym.mec.education.base.BaseResponse;
 import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.entity.*;
 import com.ym.mec.education.entity.*;
 import com.ym.mec.education.enums.ClassGroupTypeEnum;
 import com.ym.mec.education.enums.ClassGroupTypeEnum;
+import com.ym.mec.education.enums.CourseStatusEnum;
 import com.ym.mec.education.enums.ReturnCodeEnum;
 import com.ym.mec.education.enums.ReturnCodeEnum;
 import com.ym.mec.education.mapper.TeacherMapper;
 import com.ym.mec.education.mapper.TeacherMapper;
 import com.ym.mec.education.req.TeacherReq;
 import com.ym.mec.education.req.TeacherReq;
@@ -62,6 +63,9 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherMapper, Teacher> impl
     @Autowired
     @Autowired
     private IVipGroupCategoryService vipGroupCategoryService;
     private IVipGroupCategoryService vipGroupCategoryService;
 
 
+    @Autowired
+    private ICourseScheduleService courseScheduleService;
+
 
 
     @Autowired
     @Autowired
     private IVipGroupDefaultClassesCycleService vipGroupDefaultClassesCycleService;
     private IVipGroupDefaultClassesCycleService vipGroupDefaultClassesCycleService;
@@ -119,6 +123,7 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherMapper, Teacher> impl
                         teacherResp.setClassName(className);
                         teacherResp.setClassName(className);
                     }
                     }
                 }
                 }
+
                 teacherRespList.add(teacherResp);
                 teacherRespList.add(teacherResp);
             });
             });
 
 
@@ -194,6 +199,17 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherMapper, Teacher> impl
                                     demoGroup.setDemoGroupPlans(planList);
                                     demoGroup.setDemoGroupPlans(planList);
                                 }
                                 }
                             }
                             }
+
+                            QueryWrapper<CourseSchedule> scheduleQueryWrapper = new QueryWrapper<>();
+                            scheduleQueryWrapper.eq("teacher_id_",req.getUserId());
+                            scheduleQueryWrapper.eq("status_", CourseStatusEnum.OVER.getCode());
+                            List<CourseSchedule> courseSchedules = courseScheduleService.list(scheduleQueryWrapper);
+                            if(!CollectionUtils.isEmpty(courseSchedules)){
+                                teacherDetailResp.setUsed(courseSchedules.size());
+                            }else{
+                                teacherDetailResp.setUsed(0);
+                            }
+
                             teacherDetailResp.setDemoGroups(innerDemoGroups);
                             teacherDetailResp.setDemoGroups(innerDemoGroups);
 
 
                         }
                         }
@@ -225,6 +241,7 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherMapper, Teacher> impl
     @Override
     @Override
     public PageResponse teacherVipClass(TeacherReq req) {
     public PageResponse teacherVipClass(TeacherReq req) {
 
 
+        PageResponse response = new PageResponse();
         if(req == null && req.getUserId() == null){
         if(req == null && req.getUserId() == null){
             return PageResponse.errorParam();
             return PageResponse.errorParam();
         }
         }
@@ -246,12 +263,45 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherMapper, Teacher> impl
                     vipGroupClassResp.setVipClassType(vipGroupCategory.getName());
                     vipGroupClassResp.setVipClassType(vipGroupCategory.getName());
                 }
                 }
 
 
-                vipGroupDefaultClassesCycleService.list()
-               // vipGroupClassResp.setClassNum();
+                QueryWrapper<CourseSchedule> scheduleQueryWrapper = new QueryWrapper<>();
+                scheduleQueryWrapper.eq("teacher_id_",req.getUserId());
+                List<CourseSchedule> courseSchedules = courseScheduleService.list(scheduleQueryWrapper);
+                if(!CollectionUtils.isEmpty(courseSchedules)){
+                    courseSchedules.forEach(c ->{
+                        c.setClassDateStr(DateUtil.date2String(c.getClassDate(),DateUtil.DATE_FORMAT_EXTRA));
+
+                    });
+                    Map<String,List<CourseSchedule>> map = courseSchedules.stream().collect(Collectors.groupingBy(CourseSchedule::getClassDateStr));
+
+                    if(!CollectionUtils.isEmpty(map)){
+
+                        int count1 = map.size();
+                        int count2 =0;
+                        for (Map.Entry<String, List<CourseSchedule>> entry : map.entrySet()) {
+
+                            if(!CollectionUtils.isEmpty(entry.getValue())){
+                                count2 = count2 + entry.getValue().size();
+                            }
 
 
+                        }
+                        //月平均排課
+
+                        if(count1 <= count2){
+                            vipGroupClassResp.setClassNum(1);
+                        }else{
+
+                            vipGroupClassResp.setClassNum(count2%count1);
+                        }
+
+                    }
+                    vipGroupClassRespList.add(vipGroupClassResp);
+                }
             });
             });
         }
         }
-
-        return null;
+        response.setTotal(Math.toIntExact(page.getTotal()));
+        response.setRecords(vipGroupClassRespList);
+        response.setReturnCode(ReturnCodeEnum.CODE_200.getCode());
+        response.setMessage(ReturnCodeEnum.CODE_200.getValue());
+        return response;
     }
     }
 }
 }

+ 1 - 1
mec-education/src/main/java/com/ym/mec/education/service/impl/VipGroupClassGroupMapperServiceImpl.java

@@ -1,9 +1,9 @@
 package com.ym.mec.education.service.impl;
 package com.ym.mec.education.service.impl;
 
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ym.mec.education.entity.VipGroupClassGroupMapper;
 import com.ym.mec.education.entity.VipGroupClassGroupMapper;
 import com.ym.mec.education.mapper.VipGroupClassGroupMapperMapper;
 import com.ym.mec.education.mapper.VipGroupClassGroupMapperMapper;
 import com.ym.mec.education.service.IVipGroupClassGroupMapperService;
 import com.ym.mec.education.service.IVipGroupClassGroupMapperService;
-import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 /**
 /**

+ 153 - 0
mec-education/src/main/java/com/ym/mec/education/service/impl/VipGroupServiceImpl.java

@@ -1,17 +1,27 @@
 package com.ym.mec.education.service.impl;
 package com.ym.mec.education.service.impl;
 
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
 import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
 import com.ym.mec.education.base.BaseResponse;
 import com.ym.mec.education.base.BaseResponse;
+import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.entity.*;
 import com.ym.mec.education.entity.*;
+import com.ym.mec.education.enums.StudentAttendanceStatusEnum;
 import com.ym.mec.education.mapper.VipGroupMapper;
 import com.ym.mec.education.mapper.VipGroupMapper;
 import com.ym.mec.education.req.VipGroupReq;
 import com.ym.mec.education.req.VipGroupReq;
+import com.ym.mec.education.resp.VipClassAttendanceResp;
+import com.ym.mec.education.resp.VipClassScheduleResp;
 import com.ym.mec.education.resp.VipGroupResp;
 import com.ym.mec.education.resp.VipGroupResp;
 import com.ym.mec.education.service.*;
 import com.ym.mec.education.service.*;
+import com.ym.mec.education.utils.DateUtil;
+import org.apache.velocity.util.ArrayListWrapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
 import java.util.Objects;
 import java.util.Objects;
 import java.util.Optional;
 import java.util.Optional;
@@ -36,7 +46,11 @@ public class VipGroupServiceImpl extends ServiceImpl<VipGroupMapper, VipGroup> i
     private IClassGroupService classGroupService;
     private IClassGroupService classGroupService;
     @Autowired
     @Autowired
     private IClassGroupStudentMapperService classGroupStudentMapperService;
     private IClassGroupStudentMapperService classGroupStudentMapperService;
+    @Autowired
+    private IVipGroupClassGroupMapperService vipGroupClassGroupMapperService;
 
 
+    @Autowired
+    private IStudentAttendanceService studentAttendanceService;
     @Override
     @Override
     public BaseResponse getInfo(VipGroupReq vipGroupReq) {
     public BaseResponse getInfo(VipGroupReq vipGroupReq) {
         if (Objects.isNull(vipGroupReq.getVipGroupId())) {
         if (Objects.isNull(vipGroupReq.getVipGroupId())) {
@@ -77,4 +91,143 @@ public class VipGroupServiceImpl extends ServiceImpl<VipGroupMapper, VipGroup> i
         }
         }
         return BaseResponse.success(vipGroupResp);
         return BaseResponse.success(vipGroupResp);
     }
     }
+
+    /**
+     * @param vipGroupReq
+     * @return
+     */
+    @Override
+    public PageResponse courseList(VipGroupReq vipGroupReq) {
+        QueryWrapper<VipGroupClassGroupMapper> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("vip_group_id_",vipGroupReq.getVipGroupId());
+        VipGroupClassGroupMapper vipGroupClassGroupMapper = vipGroupClassGroupMapperService.getOne(queryWrapper);
+        if(vipGroupClassGroupMapper == null){
+            return PageResponse.errorParam();
+        }
+
+        PageResponse response = new PageResponse();
+
+        IPage page = new Page(vipGroupReq.getPageNo() == null ? 1: vipGroupReq.getPageNo(),vipGroupReq.getPageSize() == null ? 10: vipGroupReq.getPageSize());
+
+        QueryWrapper<CourseSchedule> scheduleQueryWrapper = new QueryWrapper<>();
+        scheduleQueryWrapper.eq("class_group_id_",vipGroupClassGroupMapper.getClassGroupId());
+        IPage<CourseSchedule> scheduleIPage = courseScheduleService.page(page,scheduleQueryWrapper);
+
+
+        List<VipClassScheduleResp> vipClassScheduleRespList = new ArrayList<>();
+        List<CourseSchedule> courseSchedules = scheduleIPage.getRecords();
+        if(!CollectionUtils.isEmpty(courseSchedules)){
+            ClassGroup classGroup = classGroupService.getById(vipGroupClassGroupMapper.getClassGroupId());
+            courseSchedules.forEach(e ->{
+                VipClassScheduleResp vipClassScheduleResp = new VipClassScheduleResp();
+                vipClassScheduleResp.setClassGroupId(e.getClassGroupId());
+                vipClassScheduleResp.setClassName(e.getName());
+                vipClassScheduleResp.setDateStr(DateUtil.date2String(e.getClassDate(),DateUtil.DATE_FORMAT));
+                vipClassScheduleResp.setStartTime(DateUtil.date2String(e.getStartClassTime(),DateUtil.TIME_FORMAT));
+                vipClassScheduleResp.setEndTime(DateUtil.date2String(e.getEndClassTime(),DateUtil.TIME_FORMAT));
+                vipClassScheduleResp.setStatus(e.getStatus());
+                vipClassScheduleResp.setWeek(DateUtil.date2Week(e.getClassDate()));
+                if(classGroup != null){
+                    vipClassScheduleResp.setCurrentNum(classGroup.getCurrentClassTimes());
+                    vipClassScheduleResp.setTotalNum(classGroup.getTotalClassTimes());
+                }
+                vipClassScheduleRespList.add(vipClassScheduleResp);
+            });
+
+        }
+
+        response.setCurrent(Math.toIntExact(scheduleIPage.getCurrent()));
+        response.setSize(Math.toIntExact(scheduleIPage.getSize()));
+        response.setTotal(Math.toIntExact(scheduleIPage.getTotal()));
+        response.setRecords(vipClassScheduleRespList);
+        return response;
+    }
+
+
+
+    /**
+     * @param vipGroupReq
+     * @return
+     */
+    public PageResponse attendanceList(VipGroupReq vipGroupReq) {
+        QueryWrapper<VipGroupClassGroupMapper> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("vip_group_id_",vipGroupReq.getVipGroupId());
+        VipGroupClassGroupMapper vipGroupClassGroupMapper = vipGroupClassGroupMapperService.getOne(queryWrapper);
+        if(vipGroupClassGroupMapper == null){
+            return PageResponse.errorParam();
+        }
+
+        PageResponse response = new PageResponse();
+
+        IPage page = new Page(vipGroupReq.getPageNo() == null ? 1: vipGroupReq.getPageNo(),vipGroupReq.getPageSize() == null ? 10: vipGroupReq.getPageSize());
+
+        QueryWrapper<StudentAttendance> studentAttendanceQueryWrapper = new QueryWrapper<>();
+        studentAttendanceQueryWrapper.eq("class_group_id_",vipGroupClassGroupMapper.getClassGroupId());
+        IPage<StudentAttendance> studentAttendanceIPage = studentAttendanceService.page(page,studentAttendanceQueryWrapper);
+
+
+        List<StudentAttendance> studentAttendanceList = studentAttendanceIPage.getRecords();
+        if(!CollectionUtils.isEmpty(studentAttendanceList)){
+            List<String> studentList =new ArrayList<>();
+            int leaveNum = 0;
+            QueryWrapper<StudentAttendance> queryWrapper1 = new QueryWrapper<>();
+            queryWrapper1.eq("class_group_id_",vipGroupClassGroupMapper.getClassGroupId());
+            List<StudentAttendance> allList = studentAttendanceService.list(queryWrapper1);
+
+
+            if(!CollectionUtils.isEmpty(allList)){
+
+                List<StudentAttendance> norList = allList.stream().filter(e ->StudentAttendanceStatusEnum.NORMAL.getCode().equals(e.getStatus())).collect(Collectors.toList());
+                if(!CollectionUtils.isEmpty(norList)){
+                    List<Integer> userIds = norList.stream().map(StudentAttendance::getUserId).collect(Collectors.toList());
+                    QueryWrapper<SysUser> queryWrapper2 = new QueryWrapper<>();
+                    queryWrapper2.in("id_",userIds);
+                    List<SysUser> sysUserList = userService.list(queryWrapper2);
+                    if(!CollectionUtils.isEmpty(sysUserList)){
+                        studentList = sysUserList.stream().map(SysUser::getRealName).collect(Collectors.toList());
+                    }
+                }
+
+                List<StudentAttendance> leaveList = allList.stream().filter(e ->StudentAttendanceStatusEnum.LEAVE.getCode().equals(e.getStatus())).collect(Collectors.toList());
+                if(!CollectionUtils.isEmpty(leaveList)){
+                    leaveNum = leaveList.size();
+                }
+            }
+
+            List<String> finalStudentList = studentList;
+            int finalLeaveNum = leaveNum;
+            List<VipClassAttendanceResp> vipClassAttendanceRespList = new ArrayList<>();
+            studentAttendanceList.forEach(e ->{
+                VipClassAttendanceResp vipClassAttendanceResp = new VipClassAttendanceResp();
+                vipClassAttendanceResp.setClassGroupId(vipGroupClassGroupMapper.getClassGroupId());
+
+                CourseSchedule courseSchedule  = courseScheduleService.getById(e.getCourseScheduleId());
+                if(courseSchedule != null){
+                    vipClassAttendanceResp.setDateStr(DateUtil.date2String(courseSchedule.getClassDate(),DateUtil.DATE_FORMAT));
+                    vipClassAttendanceResp.setStartTime(DateUtil.date2String(courseSchedule.getStartClassTime(),DateUtil.TIME_FORMAT));
+                    vipClassAttendanceResp.setEndTime(DateUtil.date2String(courseSchedule.getEndClassTime(),DateUtil.TIME_FORMAT));
+                    vipClassAttendanceResp.setWeek(DateUtil.date2Week(courseSchedule.getClassDate()));
+                    vipClassAttendanceResp.setClassName(courseSchedule.getName());
+                }
+                ClassGroup classGroup = classGroupService.getById(vipGroupClassGroupMapper.getClassGroupId());
+                if(classGroup != null){
+                    vipClassAttendanceResp.setCurrentNum(classGroup.getCurrentClassTimes());
+                    vipClassAttendanceResp.setTotalNum(classGroup.getTotalClassTimes());
+                }
+                vipClassAttendanceResp.setStudentList(finalStudentList);
+                vipClassAttendanceResp.setLeaveNum(finalLeaveNum);
+                vipClassAttendanceRespList.add(vipClassAttendanceResp);
+            });
+            response.setCurrent(Math.toIntExact(studentAttendanceIPage.getCurrent()));
+            response.setSize(Math.toIntExact(studentAttendanceIPage.getSize()));
+            response.setTotal(Math.toIntExact(studentAttendanceIPage.getTotal()));
+            response.setRecords(vipClassAttendanceRespList);
+            return response;
+
+        }
+
+        return PageResponse.success(studentAttendanceIPage);
+    }
+
+
 }
 }