yonge 3 years ago
parent
commit
2138c8a73d

+ 1 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

@@ -490,6 +490,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 	        studentRegistration.setIsAllowAdjust(YesOrNoEnum.YES);
 	        studentRegistration.setSubjectId(subjectMap.get(si.getSubjectName()));
 	        studentRegistration.setUserId(userId);
+	        studentRegistration.setParentsPhone(si.getMobileNo());
 	        studentRegistration.setName(si.getName());
 	        studentRegistration.setGender(sysUser.getGender());
 	        studentRegistration.setPaymentStatus(PaymentStatusEnum.YES);

+ 8 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMusicCompareRecordServiceImpl.java

@@ -194,8 +194,15 @@ public class SysMusicCompareRecordServiceImpl extends BaseServiceImpl<Long, SysM
 			studentSubjectMap = MapUtil.convertIntegerMap(studentSubjectMapList);
 		}
 
+		int rankNum = 0;
 		for (int i = 0; i < userTrainStat.size(); i++) {
-			userTrainStat.get(i).setRankNum(i+1);
+			if(userTrainStat.get(i).getUserId().equals(queryInfo.getUserId())){
+				head = userTrainStat.get(i);
+			}
+			if(userTrainStat.get(i).getVipUser() <= 0){
+				continue;
+			}
+			userTrainStat.get(i).setRankNum(++rankNum);
 			userTrainStat.get(i).setTrainTime(userTrainStat.get(i).getTrainTime()/60);
 			if(studentSubjectMap.containsKey(userTrainStat.get(i).getUserId())){
 				userTrainStat.get(i).setSubjectName(studentSubjectMap.get(userTrainStat.get(i).getUserId()));
@@ -203,9 +210,6 @@ public class SysMusicCompareRecordServiceImpl extends BaseServiceImpl<Long, SysM
 			if(detail.size()<10){
 				detail.add(userTrainStat.get(i));
 			}
-			if(userTrainStat.get(i).getUserId().equals(queryInfo.getUserId())){
-				head = userTrainStat.get(i);
-			}
 		}
 		Map<String,Object> params = new HashMap<String, Object>();
 		params.put("tenantId", queryInfo.getTenantId());

+ 3 - 2
mec-biz/src/main/resources/config/mybatis/SysMusicCompareWeekDataMapper.xml

@@ -110,7 +110,8 @@
 			</if>
 			smcwd.train_num_ trainNum,
 			smcwd.train_days_ trainDays,
-			smcwd.train_time_ trainTime
+			smcwd.train_time_ trainTime,
+			case when stu.membership_end_time_ &gt; now() then 1 else 0 end vipUser
 		FROM sys_music_compare_week_data smcwd
 		LEFT JOIN sys_user su ON smcwd.user_id_=su.id_
 		LEFT JOIN student stu ON smcwd.user_id_ = stu.user_id_
@@ -129,7 +130,7 @@
 				ON smcwd.performer_max_score_id_ = sms.id_
 			</if>
 		</if>
-		WHERE smcwd.monday_ = #{monday} and stu.membership_end_time_ &gt; now()
+		WHERE smcwd.monday_ = #{monday}
 			AND stu.user_id_ = smcwd.user_id_ and smcwd.tenant_id_ = #{tenantId}
 			<if test="organId != null">
 				AND su.organ_id_ = #{organId}