Browse Source

Merge remote-tracking branch 'origin/master'

Joburgess 5 years ago
parent
commit
dba04dd6cb

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

@@ -84,6 +84,10 @@ public interface SysConfigService extends BaseService<Long, SysConfig> {
 	 * 试听课默认单节课时长
 	 */
 	String DEMO_GROUP_SINGLE_CLASS_MINUTES_="demo_group_single_class_minutes_";
+	String USER_DEFAULT_HEAD_URL = "user_default_head_url";
+	String STUDENT_APPLY_URL = "student_apply_url";
+	String STUDENT_APPLY_PAYMENT_DETAIL_URL = "student_apply_payment_detail_url";
+	String SERVER_PHONE = "server_phone";
 
 	/**
 	 * @params paramName

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

@@ -2,6 +2,7 @@ package com.ym.mec.biz.service.impl;
 
 import com.ym.mec.biz.dal.dao.ClassGroupTeacherMapperDao;
 import com.ym.mec.biz.dal.dao.CourseScheduleTeacherSalaryDao;
+import com.ym.mec.biz.dal.dao.SysConfigDao;
 import com.ym.mec.biz.dal.dao.TeacherDefaultMusicGroupSalaryDao;
 import com.ym.mec.biz.dal.dto.ClassGroupTeachersDto;
 import com.ym.mec.biz.dal.entity.*;
@@ -41,7 +42,7 @@ public class ClassGroupTeacherMapperServiceImpl extends BaseServiceImpl<Long, Cl
     @Autowired
     private TeacherDefaultMusicGroupSalaryDao teacherDefaultMusicGroupSalaryDao;
     @Autowired
-    private SysConfigService sysConfigService;
+    private SysConfigDao sysConfigDao;
     @Autowired
     private ImFeignService imFeignService;
     @Autowired
@@ -156,7 +157,7 @@ public class ClassGroupTeacherMapperServiceImpl extends BaseServiceImpl<Long, Cl
     public void createCourseScheduleTeacherSalary(List<CourseSchedule> courseSchedules) {
         List<CourseScheduleTeacherSalary> courseScheduleTeacherSalaryList = new ArrayList<>();
 
-        BigDecimal teacherSalaryTimeUnit = new BigDecimal(sysConfigService.findByParamName(SysConfigService.TEACHER_SALARY_TIME_UNIT).getParanValue());
+        BigDecimal teacherSalaryTimeUnit = new BigDecimal(sysConfigDao.findConfigValue(SysConfigService.TEACHER_SALARY_TIME_UNIT));
 
         //课程编号列表
         List<Long> courseScheduleIds = courseSchedules.stream().map(CourseSchedule::getId).collect(Collectors.toList());

+ 6 - 18
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -16,7 +16,6 @@ import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.thirdparty.message.MessageSenderPluginContext.MessageSender;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
-
 import org.apache.commons.collections.ListUtils;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.BeanUtils;
@@ -44,8 +43,6 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 	@Autowired
 	private StudentAttendanceDao studentAttendanceDao;
 	@Autowired
-	private SysConfigService sysConfigService;
-	@Autowired
 	private ClassGroupStudentMapperDao classGroupStudentMapperDao;
 	@Autowired
 	private SysMessageService sysMessageService;
@@ -90,10 +87,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		currentCourseDetail.setOnlyNormal(enableOnlyNormalAttendance(currentCourseDetail, user.getId().longValue()));
 
 		currentCourseDetail.setCurrentTime(new Date());
-		SysConfig advance_sign_in_minutes = sysConfigDao.findByParamName("advance_sign_in_minutes");
-		currentCourseDetail.setAdvanceSignInMinutes(Integer.parseInt(advance_sign_in_minutes.getParanValue()));
-		SysConfig attendance_range = sysConfigDao.findByParamName("attendance_range");
-		currentCourseDetail.setAttendanceRange(Integer.parseInt(attendance_range.getParanValue()));
+		currentCourseDetail.setAdvanceSignInMinutes(Integer.parseInt(sysConfigDao.findConfigValue(SysConfigService.ADVANCE_SIGN_IN_MINUTES)));
+		currentCourseDetail.setAttendanceRange(Integer.parseInt(sysConfigDao.findConfigValue(SysConfigService.ATTENDANCE_RANGE)));
 		return currentCourseDetail;
 	}
 
@@ -207,11 +202,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		if(null==user){
 			throw new BizException("请登录");
 		}
-		SysConfig vip_appeal_days_range = sysConfigDao.findByParamName("vip_appeal_days_range");
-		SysConfig advance_leave_hours = sysConfigDao.findByParamName("advance_leave_hours");
 		Map<String,Object> result=new HashMap<>(3);
-		result.put("vipAppealDaysRange",vip_appeal_days_range.getParanValue());
-		result.put("advanceLeaveHours",Integer.parseInt(advance_leave_hours.getParanValue()));
+		result.put("vipAppealDaysRange",sysConfigDao.findConfigValue(SysConfigService.VIP_APPEAL_DAYS_RANGE));
+		result.put("advanceLeaveHours",Integer.parseInt(sysConfigDao.findConfigValue(SysConfigService.ADVANCE_LEAVE_HOURS)));
 		result.put("list",courseScheduleDao.getStudentCourseSchedulesWithDate(classDate,user.getId().longValue()));
 		return result;
 	}
@@ -675,8 +668,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		CourseScheduleDto courseSchedules = courseScheduleDao.getCourseSchedules(courseScheduleComplaints.getCourseScheduleId());
 		Date now=new Date();
 		int i = DateUtil.daysBetween(courseSchedules.getEndClassTime(), now);
-		SysConfig vip_appeal_days_range = sysConfigDao.findByParamName("vip_appeal_days_range");
-		if(i>Integer.parseInt(vip_appeal_days_range.getParanValue())){
+		if(i>Integer.parseInt(sysConfigDao.findConfigValue(SysConfigService.VIP_APPEAL_DAYS_RANGE))){
 			throw new BizException("该课程已超过可申诉时间范围!");
 		}
 		courseScheduleComplaints.setUserId(user.getId());
@@ -732,11 +724,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 
 	@Override
 	public boolean pushNoSignInMessage() {
-		Integer minutes = 30;
-		SysConfig sysConfig = sysConfigService.findByParamName(SysConfigService.SIGN_OUT_MESSAGE_PUSH_MINUTE);
-		if (sysConfig != null && StringUtils.isNotBlank(sysConfig.getParanValue())) {
-			minutes = Integer.parseInt(sysConfig.getParanValue());
-		}
+		Integer minutes = Integer.parseInt(sysConfigDao.findConfigValue(SysConfigService.SIGN_OUT_MESSAGE_PUSH_MINUTE));
 
 		List<CourseSchedule> list = courseScheduleDao.queryNoSignInListByBeforeMinutes(minutes);
 

+ 2 - 9
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleTeacherSalaryServiceImpl.java

@@ -24,8 +24,6 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
 	@Autowired
 	private CourseScheduleTeacherSalaryDao courseScheduleTeacherSalaryDao;
 	@Autowired
-	private TeacherDefaultVipGroupSalaryDao teacherDefaultVipGroupSalaryDao;
-	@Autowired
 	private VipGroupActivityDao vipGroupActivityDao;
 	@Autowired
 	private CourseScheduleComplaintsDao courseScheduleComplaintsDao;
@@ -108,13 +106,8 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
 	@Transactional(rollbackFor = Exception.class)
 	public void teacherSalarySettlement() {
 		
-		int days = 7;
-		
-		SysConfig sysConfig = sysConfigDao.findByParamName(SysConfigService.VIP_SETTLEMENT_CYCLE);
-		if(sysConfig != null){
-			days = Integer.parseInt(sysConfig.getParanValue());
-		}
-		
+		int days = Integer.parseInt(sysConfigDao.findConfigValue(SysConfigService.VIP_SETTLEMENT_CYCLE));
+
 		//获取教师未结算课程记录
 		List<CourseScheduleTeacherSalary> someDayAgoTeacherCourseSalaryNoSettlement = courseScheduleTeacherSalaryDao.findSomeDayAgoTeacherCourseSalaryNoSettlement(days);
 		if(CollectionUtils.isEmpty(someDayAgoTeacherCourseSalaryNoSettlement)){

+ 2 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/DemoGroupServiceImpl.java

@@ -52,7 +52,7 @@ public class DemoGroupServiceImpl extends BaseServiceImpl<Long, DemoGroup>  impl
 	@Autowired
 	private SubjectDao subjectDao;
 	@Autowired
-	private SysConfigService sysConfigService;
+	private SysConfigDao sysConfigDao;
 
 	@Override
 	public BaseDAO<Long, DemoGroup> getDAO() {
@@ -73,9 +73,7 @@ public class DemoGroupServiceImpl extends BaseServiceImpl<Long, DemoGroup>  impl
 		//当前教师下周的试听课计划
 		List<DemoGroupCoursesPlan> nextWeekDemoGroupCoursePlan = demoGroupCoursesPlanDao.findByDateZone(nextMonday, nextSunday, demoGroupApplyDto.getUserId());
 
-		SysConfig singleClassMinutes = sysConfigService.findByParamName(SysConfigService.DEMO_GROUP_SINGLE_CLASS_MINUTES_);
-
-		demoGroupApplyDto.setSingleClassMinutes(Integer.parseInt(singleClassMinutes.getParanValue()));
+		demoGroupApplyDto.setSingleClassMinutes(Integer.parseInt(sysConfigDao.findConfigValue(SysConfigService.DEMO_GROUP_SINGLE_CLASS_MINUTES_)));
 
 		if(CollectionUtils.isEmpty(nextWeekDemoGroupCoursePlan)){
 			demoGroupDao.insert(demoGroupApplyDto);

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

@@ -16,6 +16,7 @@ import com.ym.mec.biz.dal.enums.ParamEnum;
 import com.ym.mec.biz.dal.page.EmployeeQueryInfo;
 import com.ym.mec.biz.service.ContractService;
 import com.ym.mec.biz.service.EmployeeService;
+import com.ym.mec.biz.service.SysConfigService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.entity.ImResult;
 import com.ym.mec.common.entity.ImUserModel;
@@ -86,9 +87,8 @@ public class EmployeeServiceImpl extends BaseServiceImpl<Integer, Employee>  imp
 		employeeDao.batchAddEmployeeRole(employee.getId(),employee.getRoleIds());
 		//添加用户现金账户
 		sysUserCashAccountDao.insert(new SysUserCashAccount(employee.getId(),"CNY"));
-//		contractService.register(employee.getId(), employee.getRealName(), employee.getIdCardNo(), employee.getPhone());
 		ImResult imResult = imFeignService.register(new ImUserModel(employee.getId().toString(), employee.getUsername(),
-				StringUtils.isEmpty(employee.getAvatar())?sysConfigDao.findByParamName("user_default_head_url").getParanValue():employee.getAvatar()));
+				StringUtils.isEmpty(employee.getAvatar())?sysConfigDao.findConfigValue(SysConfigService.USER_DEFAULT_HEAD_URL):employee.getAvatar()));
 		employee.setImToken(imResult.getToken());
 		employeeDao.update(employee);
 		teacherDao.updateUser(employee);

+ 1 - 6
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupStudentFeeServiceImpl.java

@@ -42,12 +42,7 @@ public class MusicGroupStudentFeeServiceImpl extends BaseServiceImpl<Long, Music
 	@Override
 	public boolean refreshPaymentFeeStatus() {
 
-		int days = 7;
-
-		SysConfig sysConfig = sysConfigDao.findByParamName(SysConfigService.REFRESH_PAYMENT_STATUS_EARLY_DAYS);
-		if (sysConfig != null) {
-			days = Integer.parseInt(sysConfig.getParanValue());
-		}
+		int days = Integer.parseInt(sysConfigDao.findConfigValue(SysConfigService.REFRESH_PAYMENT_STATUS_EARLY_DAYS));
 
 		Date date = new Date();
 

+ 19 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java

@@ -180,7 +180,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
 			contractService.register(userId, sysUser.getRealName(), sysUser.getIdCardNo(), sysUser.getPhone());
             //注册到融云
             if(StringUtils.isEmpty(sysUser.getAvatar())){
-                sysUser.setAvatar(sysConfigDao.findConfigValue("user_default_head_url"));
+                sysUser.setAvatar(sysConfigDao.findConfigValue(SysConfigService.USER_DEFAULT_HEAD_URL));
             }
             ImResult register = imFeignService.register(new ImUserModel(userId.toString(), sysUser.getUsername(), sysUser.getAvatar()));
             sysUser.setImToken(register.getToken());
@@ -194,14 +194,14 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
         //增加报名学生数
         musicGroupSubjectPlanService.addApplyStudentNum(studentRegistration.getMusicGroupId(), studentRegistration.getSubjectId(),1);
         //报名成功后,发送短信
-        String studentApplyUrl = sysConfigDao.findConfigValue("student_apply_url" + studentRegistration.getMusicGroupId());
+        String studentApplyUrl = sysConfigDao.findConfigValue(SysConfigService.STUDENT_APPLY_URL + studentRegistration.getMusicGroupId());
         String content = sysMessageConfigDao.findContent(MessageTypeEnum.SMS_APPLY_MESSAGE.getCode());
         Subject subject = subjectDao.get(studentRegistration.getActualSubjectId());
         MusicGroup musicGroup = musicGroupDao.get(studentRegistration.getMusicGroupId());
         String format = DateUtil.format(musicGroup.getApplyExpireDate(), DateUtil.DATE_FORMAT_MIN);
         sysMessageService.sendMessage(MessageSenderPluginContext.MessageSender.YIMEI,sysUser.getId(),"",
                 MessageFormatter.arrayFormat(content, studentRegistration.getParentsName(),subject.getName(),
-                        studentApplyUrl,musicGroup.getApplyExpireDate(),format,sysConfigDao.findConfigValue("server_phone")),
+                        studentApplyUrl,musicGroup.getApplyExpireDate(),format,sysConfigDao.findConfigValue(SysConfigService.SERVER_PHONE)),
                 studentRegistration.getParentsPhone(),date,0,null);
         return studentRegistration;
     }
@@ -399,6 +399,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
                 sysUser.setUsername(studentRegistration.getName());
                 sysUser.setGender(studentRegistration.getGender());
                 sysUser.setUserType(SysUserType.STUDENT);
+                sysUser.setIdCardNo(studentRegistration.getIdCardNo());
                 teacherDao.addSysUser(sysUser);
                 userId = sysUser.getId();
                 //添加用户现金账户
@@ -406,6 +407,9 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
                 //添加用户电子签章账户
                 contractService.register(userId, sysUser.getRealName(), sysUser.getIdCardNo(), sysUser.getPhone());
                 //注册到融云
+                if(StringUtils.isEmpty(sysUser.getAvatar())){
+                    sysUser.setAvatar(sysConfigDao.findConfigValue(SysConfigService.USER_DEFAULT_HEAD_URL));
+                }
                 ImResult register = imFeignService.register(new ImUserModel(userId.toString(), sysUser.getUsername(), sysUser.getAvatar()));
                 sysUser.setImToken(register.getToken());
                 teacherDao.updateUser(sysUser);
@@ -514,7 +518,18 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
 
     @Override
     public List<StudentRegistration> findMusicGroupNoClassGroupStudent(String musicGroupId, Integer actualSubjectId) {
-        return studentRegistrationDao.findMusicGroupNoClassGroupStudent(musicGroupId, actualSubjectId);
+        //获取所有声部
+        List<Subject> subjectList = subjectService.findAll(new HashMap<>());
+        List<StudentRegistration> classGroupStuList = studentRegistrationDao.findMusicGroupNoClassGroupStudent(musicGroupId, actualSubjectId);
+        for (StudentRegistration studentRegistration : classGroupStuList) {
+            for (Subject subject : subjectList) {
+                if (studentRegistration.getActualSubjectId().equals(subject.getId())) {
+                    studentRegistration.setSubjectName(subject.getName());
+                    break;
+                }
+            }
+        }
+        return classGroupStuList;
     }
 
     @Override

+ 11 - 29
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherAttendanceServiceImpl.java

@@ -1,41 +1,21 @@
 package com.ym.mec.biz.service.impl;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-import org.apache.commons.lang.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
-import com.ym.mec.biz.dal.dao.CourseScheduleDao;
-import com.ym.mec.biz.dal.dao.StudentAttendanceDao;
-import com.ym.mec.biz.dal.dao.StudentCourseHomeworkDao;
-import com.ym.mec.biz.dal.dao.TeacherAttendanceDao;
+import com.ym.mec.biz.dal.dao.*;
 import com.ym.mec.biz.dal.dto.TeacherAbnormalAttendanceInfoDto;
 import com.ym.mec.biz.dal.dto.TeacherAttendanceDto;
 import com.ym.mec.biz.dal.dto.TeacherPersonalAttendanceDto;
 import com.ym.mec.biz.dal.dto.TeacherSignOutDto;
 import com.ym.mec.biz.dal.entity.CourseHomework;
 import com.ym.mec.biz.dal.entity.StudentCourseHomework;
-import com.ym.mec.biz.dal.entity.SysConfig;
 import com.ym.mec.biz.dal.entity.TeacherAttendance;
 import com.ym.mec.biz.dal.enums.MessageTypeEnum;
 import com.ym.mec.biz.dal.enums.ParamEnum;
 import com.ym.mec.biz.dal.enums.SignStatusEnum;
 import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import com.ym.mec.biz.dal.page.TeacherCloseQueryInfo;
-import com.ym.mec.biz.service.CourseHomeworkService;
-import com.ym.mec.biz.service.CourseScheduleService;
-import com.ym.mec.biz.service.SysConfigService;
-import com.ym.mec.biz.service.SysMessageService;
-import com.ym.mec.biz.service.TeacherAttendanceService;
+import com.ym.mec.biz.service.*;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
@@ -43,6 +23,12 @@ import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.thirdparty.message.MessageSenderPluginContext.MessageSender;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
 
 @Service
 public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherAttendance>  implements TeacherAttendanceService {
@@ -62,7 +48,7 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 	@Autowired
 	private CourseScheduleService courseScheduleService;
 	@Autowired
-	private SysConfigService sysConfigService;
+	private SysConfigDao sysConfigDao;
 	@Autowired
 	private SysMessageService sysMessageService;
 
@@ -195,12 +181,8 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 	@Override
 	public boolean pushNoSignOutMessage() {
 		
-		Integer minutes = 30;
-		SysConfig sysConfig = sysConfigService.findByParamName(SysConfigService.SIGN_OUT_MESSAGE_PUSH_MINUTE);
-		if(sysConfig != null && StringUtils.isNotBlank(sysConfig.getParanValue())){
-			minutes = Integer.parseInt(sysConfig.getParanValue());
-		}
-		
+		Integer minutes = Integer.parseInt(sysConfigDao.findConfigValue(SysConfigService.SIGN_OUT_MESSAGE_PUSH_MINUTE));;
+
 		List<TeacherAttendance> list = teacherAttendanceDao.queryNoSignOutListByOverMinutes(minutes);
 		
 		Map<Integer, String> receivers = new HashMap<Integer, String>();

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

@@ -82,7 +82,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 	@Autowired
 	private CourseScheduleRewardsRulesService courseScheduleRewardsRulesService;
 	@Autowired
-	private SysConfigService sysConfigService;
+	private SysConfigDao sysConfigDao;
 	@Autowired
 	private SysUserCashAccountDetailService sysUserCashAccountDetailService;
 	@Autowired
@@ -577,7 +577,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
 		Map<String,BigDecimal> results=new HashMap<>(1);
 
-		BigDecimal teacherSalaryTimeUnit=new BigDecimal(sysConfigService.findByParamName(SysConfigService.TEACHER_SALARY_TIME_UNIT).getParanValue());
+		BigDecimal teacherSalaryTimeUnit=new BigDecimal(sysConfigDao.findConfigValue(SysConfigService.TEACHER_SALARY_TIME_UNIT));
 		//课程时长与结算单位时长占比
 		BigDecimal classTimeDuty=new BigDecimal(vipGroupCategory.getSingleClassMinutes()).divide(teacherSalaryTimeUnit);
 		BigDecimal offlineClassNum=new BigDecimal(vipGroup.getOfflineClassesNum());

+ 4 - 1
mec-biz/src/main/resources/config/mybatis/StudentRegistrationMapper.xml

@@ -175,7 +175,10 @@
                 music_group_id_ = #{musicGroupId},
             </if>
             <if test="actualSubjectId != null">
-                actual_subject_id_ = #{actualSubjectId},
+            actual_subject_id_ = #{actualSubjectId},
+            </if>
+            <if test="actualSubjectId != null">
+                class_group_id_ = #{classGroupId},
             </if>
         </set>
         WHERE id_ = #{id}

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

@@ -2,8 +2,8 @@ package com.ym.mec.teacher.controller;
 
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.dao.SysConfigDao;
 import com.ym.mec.biz.dal.dto.DemoGroupApplyDto;
-import com.ym.mec.biz.dal.entity.SysConfig;
 import com.ym.mec.biz.service.DemoGroupService;
 import com.ym.mec.biz.service.SysConfigService;
 import com.ym.mec.common.controller.BaseController;
@@ -27,7 +27,7 @@ public class DemoGroupController extends BaseController {
     @Autowired
     private DemoGroupService demoGroupService;
     @Autowired
-    private SysConfigService sysConfigService;
+    private SysConfigDao sysConfigDao;
     @Autowired
     private SysUserFeignService sysUserFeignService;
 
@@ -47,8 +47,7 @@ public class DemoGroupController extends BaseController {
     @ApiOperation(value = "获取试听课课程时长")
     @GetMapping("/getSingleClassMinutes")
     public Object getSingleClassMinutes(){
-        SysConfig byParamName = sysConfigService.findByParamName(SysConfigService.DEMO_GROUP_SINGLE_CLASS_MINUTES_);
-        return succeed(byParamName.getParanValue().split(","));
+        return succeed(sysConfigDao.findConfigValue(SysConfigService.DEMO_GROUP_SINGLE_CLASS_MINUTES_).split(","));
     }
 
     @ApiOperation(value = "获取老师试听课")