Преглед на файлове

1、将乐团课与小课的可点名时间分离

Joburgess преди 5 години
родител
ревизия
22005a5129

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupDao.java

@@ -549,4 +549,14 @@ public interface ClassGroupDao extends BaseDAO<Integer, ClassGroup> {
      */
     ClassGroup findByGroupAndType(@Param("groupId") String groupId,
                                   @Param("groupType") String groupType);
+
+    /**
+     * @describe 终极班级查询
+     * @author Joburgess
+     * @date 2019/12/30
+     * @param params: 查询条件
+     * @return java.util.List<com.ym.mec.biz.dal.dto.SuperClassGroupDtio>
+     */
+    List<SuperClassGroupDto> superFindClassGroups(Map<String, Object> params);
+    int superCountClassGroups(Map<String, Object> params);
 }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/SuperClassGroupDtio.java → mec-biz/src/main/java/com/ym/mec/biz/dal/dto/SuperClassGroupDto.java

@@ -6,5 +6,5 @@ import com.ym.mec.biz.dal.entity.ClassGroup;
  * @Author Joburgess
  * @Date 2019/12/30
  */
-public class SuperClassGroupDtio extends ClassGroup {
+public class SuperClassGroupDto extends ClassGroup {
 }

+ 5 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/SysConfigService.java

@@ -80,6 +80,11 @@ public interface SysConfigService extends BaseService<Long, SysConfig> {
      * 可更新学生签到状态时间限制,课程结束后{}分钟
      */
     String ENABLE_STUDENT_ATTENDANCE_TIME_RANGE = "enable_student_attendance_time_range";
+
+    /**
+     * vip课程可更新学生签到状态时间限制,课程结束后{}分钟
+     */
+    String ENABLE_STUDENT_ATTENDANCE_TIME_RANGE_VIP = "enable_student_attendance_time_range_vip";
     
     /**
      * 十分钟内最大可发送的短信次数

+ 7 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentAttendanceServiceImpl.java

@@ -84,10 +84,15 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 			throw new BizException("请指定课程");
 		}
 		Date date = new Date();
-		SysConfig attendanceTimeRange = sysConfigService.findByParamName(SysConfigService.ENABLE_STUDENT_ATTENDANCE_TIME_RANGE);
+		SysConfig attendanceTimeRange;
+		if(courseSchedule.getGroupType().equals(GroupType.MUSIC)){
+			attendanceTimeRange = sysConfigService.findByParamName(SysConfigService.ENABLE_STUDENT_ATTENDANCE_TIME_RANGE);
+		}else{
+			attendanceTimeRange = sysConfigService.findByParamName(SysConfigService.ENABLE_STUDENT_ATTENDANCE_TIME_RANGE_VIP);
+		}
 		int courseEndTime = DateUtil.minutesBetween(courseSchedule.getEndClassTime(), date);
 		if(date.after(courseSchedule.getEndClassTime())&&courseEndTime>attendanceTimeRange.getParanValue(Integer.class)){
-			throw new BizException("课程结束一小时后禁止点名");
+			throw new BizException("{}课结束{}分钟后禁止点名", courseSchedule.getGroupType().equals(GroupType.MUSIC)?"乐团":"VIP", attendanceTimeRange);
 		}
 		studentAttendanceDao.deleteStudentAttendancesByCourse(courseScheduleId);
 		int classTimes=courseScheduleDao.countClassTimes(courseSchedule.getClassGroupId().longValue(),courseSchedule.getStartClassTime());

+ 10 - 0
mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml

@@ -920,4 +920,14 @@
       where id_=1
     </update>
 
+    <resultMap id="SuperClassGroupInfo" type="com.ym.mec.biz.dal.dto.SuperClassGroupDto">
+
+    </resultMap>
+    <select id="superFindClassGroups" resultMap="SuperClassGroupInfo">
+
+    </select>
+    <select id="superCountClassGroups" resultType="int">
+
+    </select>
+
 </mapper>