Browse Source

Merge branch 'online1' of http://git.dayaedu.com/yonge/mec

zouxuan 4 years ago
parent
commit
5feda6c155

+ 12 - 8
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupSchoolTermCourseDetailServiceImpl.java

@@ -2,10 +2,7 @@ package com.ym.mec.biz.service.impl;
 
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.biz.dal.dao.*;
-import com.ym.mec.biz.dal.entity.MusicGroup;
-import com.ym.mec.biz.dal.entity.MusicGroupPaymentStudentMemberCourseDetail;
-import com.ym.mec.biz.dal.entity.MusicGroupSchoolTermCourseDetail;
-import com.ym.mec.biz.dal.entity.MusicGroupSchoolTermStudentCourseDetail;
+import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
 import com.ym.mec.biz.dal.enums.MessageTypeEnum;
 import com.ym.mec.biz.service.MusicGroupSchoolTermCourseDetailService;
@@ -56,6 +53,8 @@ public class MusicGroupSchoolTermCourseDetailServiceImpl extends BaseServiceImpl
 	private TeacherDao teacherDao;
 	@Autowired
 	private StudentDao studentDao;
+	@Autowired
+	private MemberRankSettingDao memberRankSettingDao;
 
 	@Override
 	public BaseDAO<Integer, MusicGroupSchoolTermCourseDetail> getDAO() {
@@ -187,6 +186,11 @@ public class MusicGroupSchoolTermCourseDetailServiceImpl extends BaseServiceImpl
 						musicGroup.getName());
 			}
 		}
+		String memberName = "黄金会员";
+		MemberRankSetting memberRankSetting = memberRankSettingDao.get(1);
+		if(memberRankSetting != null){
+			memberName = memberRankSetting.getName();
+		}
 		//会员结束前15天提醒学员续费
 		String pushMemberRenew = sysConfigDao.findConfigValue(SysConfigService.PUSH_MEMBER_RENEW);
 		if(StringUtils.isEmpty(pushMemberRenew)){
@@ -207,7 +211,7 @@ public class MusicGroupSchoolTermCourseDetailServiceImpl extends BaseServiceImpl
 					null,
 					0,
 					null,
-					null,pushMemberRenew);
+					null,memberName,pushMemberRenew);
 
 			sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG,
 					MessageTypeEnum.STUDENT_MEMBER_RENEW_MESSAGE,
@@ -215,7 +219,7 @@ public class MusicGroupSchoolTermCourseDetailServiceImpl extends BaseServiceImpl
 					null,
 					0,
 					null,
-					"STUDENT",pushMemberRenew);
+					"STUDENT",memberName,pushMemberRenew);
 		}
 		//会员结束前15天提醒学员续费
 		String pushMemberRenewAgain = sysConfigDao.findConfigValue(SysConfigService.PUSH_MEMBER_RENEW_AGAIN);
@@ -237,7 +241,7 @@ public class MusicGroupSchoolTermCourseDetailServiceImpl extends BaseServiceImpl
 					null,
 					0,
 					null,
-					null,pushMemberRenewAgain);
+					null,memberName,pushMemberRenewAgain);
 
 			sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG,
 					MessageTypeEnum.STUDENT_MEMBER_RENEW_MESSAGE,
@@ -245,7 +249,7 @@ public class MusicGroupSchoolTermCourseDetailServiceImpl extends BaseServiceImpl
 					null,
 					0,
 					null,
-					"STUDENT",pushMemberRenewAgain);
+					"STUDENT",memberName,pushMemberRenewAgain);
 		}
 	}
 

+ 3 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentServeServiceImpl.java

@@ -910,6 +910,7 @@ public class StudentServeServiceImpl implements StudentServeService {
             result.put("isAssignHomework", 0);
             return result;
         }
+
         String configValue = sysConfigDao.findConfigValue(SysConfigService.HOMEWORK_OPEN_FLAG);
         if(StringUtils.isEmpty(configValue)){
             configValue = "0";
@@ -928,6 +929,8 @@ public class StudentServeServiceImpl implements StudentServeService {
         LocalDate localDate=LocalDate.now();
 
         if(Objects.nonNull(courseScheduleId)){
+            List<BasicUserDto> students = courseScheduleStudentPaymentDao.findStudents(courseScheduleId);
+            result.put("courseStudentNum", students.size());
             CourseSchedule courseSchedule = courseScheduleDao.get(courseScheduleId);
             if(Objects.isNull(courseSchedule)){
                 result.put("isAssignHomework", 0);
@@ -941,7 +944,6 @@ public class StudentServeServiceImpl implements StudentServeService {
                 if(musicGroup != null){
                     result.put("courseViewType", musicGroup.getCourseViewType());
                 }else if(result.get("memberNum") == null){
-                    List<BasicUserDto> students = courseScheduleStudentPaymentDao.findStudents(courseScheduleId);
                     Set<Integer> collect = students.stream().map(e -> e.getUserId()).collect(Collectors.toSet());
                     result.put("memberNum", studentDao.getMemberNum(StringUtils.join(collect,",")));
                 }

+ 2 - 6
mec-biz/src/main/resources/config/mybatis/MemberFeeSettingMapper.xml

@@ -30,12 +30,8 @@
 	
 	<!-- 向数据库增加一条记录 -->
 	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.MemberFeeSetting" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		<!--
-		<selectKey resultClass="int" keyProperty="id" > 
-		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
-		</selectKey>
-		-->
-		INSERT INTO member_fee_setting (id_,current_day_fee_,original_day_fee_,current_month_fee_,original_month_fee_,current_half_year_fee_,original_half_year_fee_,current_year_fee_,original_year_fee_) VALUES(#{id},#{currentDayFee},#{originalDayFee},#{currentMonthFee},#{originalMonthFee},#{currentHalfYearFee},#{originalHalfYearFee},#{currentYearFee},#{originalYearFee})
+		INSERT INTO member_fee_setting (current_day_fee_,original_day_fee_,current_month_fee_,original_month_fee_,current_half_year_fee_,original_half_year_fee_,current_year_fee_,original_year_fee_)
+		VALUES(#{currentDayFee},#{originalDayFee},#{currentMonthFee},#{originalMonthFee},#{currentHalfYearFee},#{originalHalfYearFee},#{currentYearFee},#{originalYearFee})
 	</insert>
 	
 	<!-- 根据主键查询一条记录 -->