zouxuan 4 лет назад
Родитель
Сommit
cdb07f95c2

+ 10 - 10
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherAttendanceDto.java

@@ -99,8 +99,8 @@ public class TeacherAttendanceDto {
     @ApiModelProperty(value = "是否已经发送过到课提醒:0否,1已发送")
     private int normalRemind;
 
-    @ApiModelProperty(value = "是否有会员:0否,1已发送")
-    private int hasMember;
+    @ApiModelProperty(value = "课程关联的有会员的学员数量")
+    private int memberNum;
 
     @ApiModelProperty(value = "乐团收费方式")
     private CourseViewTypeEnum courseViewType;
@@ -109,20 +109,20 @@ public class TeacherAttendanceDto {
 
     private Integer enableStudentAttendanceTimeRangeVip;
 
-    public CourseViewTypeEnum getCourseViewType() {
-        return courseViewType;
+    public int getMemberNum() {
+        return memberNum;
     }
 
-    public void setCourseViewType(CourseViewTypeEnum courseViewType) {
-        this.courseViewType = courseViewType;
+    public void setMemberNum(int memberNum) {
+        this.memberNum = memberNum;
     }
 
-    public int getHasMember() {
-        return hasMember;
+    public CourseViewTypeEnum getCourseViewType() {
+        return courseViewType;
     }
 
-    public void setHasMember(int hasMember) {
-        this.hasMember = hasMember;
+    public void setCourseViewType(CourseViewTypeEnum courseViewType) {
+        this.courseViewType = courseViewType;
     }
 
     public CourseSchedule.CourseScheduleType getCourseType() {

+ 3 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -230,8 +230,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         currentCourseDetail.setAdvanceSignInMinutes(Integer.parseInt(sysConfigDao.findConfigValue(SysConfigService.ADVANCE_SIGN_IN_MINUTES)));
 		currentCourseDetail.setAttendanceRange(CourseScheduleType.VIP.equals(currentCourseDetail.getCourseType())?Integer.parseInt(sysConfigDao.findConfigValue(SysConfigService.ATTENDANCE_RANGE_VIP)):Integer.parseInt(sysConfigDao.findConfigValue(SysConfigService.ATTENDANCE_RANGE)));
         currentCourseDetail.setAdvanceSignOutMinutes(Integer.parseInt(sysConfigDao.findConfigValue(SysConfigService.ADVANCE_SIGN_OUT_MINUTES)));
-		Student student = studentDao.get(user.getId());
-		currentCourseDetail.setHasMember(student.getMemberRankSettingId() == null?0:1);
+		List<BasicUserDto> students = courseScheduleStudentPaymentDao.findStudents(courseID);
+		//获取有会员的学员数
+		currentCourseDetail.setMemberNum(studentDao.getMemberNum(StringUtils.join(students, ","));
 		return currentCourseDetail;
     }
 

+ 4 - 3
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherCourseScheduleController.java

@@ -1,11 +1,13 @@
 package com.ym.mec.teacher.controller;
 
-import com.alibaba.fastjson.JSON;
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.ClassGroupStudentMapperDao;
 import com.ym.mec.biz.dal.dao.StudentAttendanceDao;
-import com.ym.mec.biz.dal.dto.*;
+import com.ym.mec.biz.dal.dto.ClassDateAdjustDto;
+import com.ym.mec.biz.dal.dto.CourseScheduleDto;
+import com.ym.mec.biz.dal.dto.TeacherRemarkCommitDto;
+import com.ym.mec.biz.dal.dto.VipGroupCourseAdjustInfoDto;
 import com.ym.mec.biz.dal.entity.CourseSchedule;
 import com.ym.mec.biz.dal.entity.SysConfig;
 import com.ym.mec.biz.dal.enums.ClassGroupStudentStatusEnum;
@@ -31,7 +33,6 @@ import io.swagger.annotations.ApiParam;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.MediaType;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import java.text.SimpleDateFormat;