yonge 5 years ago
parent
commit
9bc8894ebc

+ 23 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/GroupType.java

@@ -0,0 +1,23 @@
+package com.ym.mec.biz.dal.enums;
+
+import com.ym.mec.common.enums.BaseEnum;
+
+public enum GroupType implements BaseEnum<String, GroupType> {
+	MUSIC("乐团课"), VIP("VIP课"), DEMO("试听课");
+
+	private String desc;
+
+	private GroupType(String desc) {
+		this.desc = desc;
+	}
+
+	@Override
+	public String getCode() {
+		return name();
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+
+}

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

@@ -154,6 +154,7 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
                 collect = teacherAttendancesTemp.stream().map(TeacherAttendance::getTeacherId).collect(Collectors.toList());
             }
             TeacherAttendance teacherAttendance=new TeacherAttendance();
+            teacherAttendance.setGroupType(courseScheduleTeacherSalary.getGroupType());
             if(Objects.nonNull(classGroup)){
                 teacherAttendance.setClassGroupId(classGroup.getId());
                 teacherAttendance.setMusicGroupId(classGroup.getMusicGroupId());

+ 3 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/DemoGroupServiceImpl.java

@@ -8,6 +8,7 @@ import com.ym.mec.biz.dal.dto.EducationDemoGroupListDto;
 import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.enums.ClassGroupStudentStatusEnum;
 import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
+import com.ym.mec.biz.dal.enums.GroupType;
 import com.ym.mec.biz.dal.enums.TeachTypeEnum;
 import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import com.ym.mec.biz.dal.page.StudentDemoGroupQueryInfo;
@@ -22,6 +23,7 @@ import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 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;
@@ -260,6 +262,7 @@ public class DemoGroupServiceImpl extends BaseServiceImpl<Long, DemoGroup>  impl
 		demoGroupDao.update(demoGroup);
 
 		TeacherAttendance teacherAttendance=new TeacherAttendance(demoGroup.getUserId(),demoGroup.getId().toString(),classGroup.getId(),courseScheduleByDemoGroup.getId(),now);
+		teacherAttendance.setGroupType(GroupType.DEMO);
 		teacherAttendanceService.insert(teacherAttendance);
 
 		//修改课程预约状态

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

@@ -687,6 +687,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 
             Date date = new Date();
             StudentPaymentOrder studentPaymentOrder = new StudentPaymentOrder();
+            studentPaymentOrder.setGroupType(GroupType.MUSIC);
             studentPaymentOrder.setUserId(userId);
             studentPaymentOrder.setOrderNo(idGeneratorService.generatorId("RENEW") + "");
             studentPaymentOrder.setType(OrderTypeEnum.RENEW);

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

@@ -24,12 +24,14 @@ import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
 import com.ym.mec.util.http.HttpUtil;
+
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
+
 import java.io.IOException;
 import java.math.BigDecimal;
 import java.util.*;
@@ -232,6 +234,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
         Date date = new Date();
         StudentPaymentOrder studentPaymentOrder = new StudentPaymentOrder();
         studentPaymentOrder.setUserId(studentRegistration.getUserId());
+        studentPaymentOrder.setGroupType(GroupType.MUSIC);
         studentPaymentOrder.setOrderNo(orderNo);
         studentPaymentOrder.setType(OrderTypeEnum.APPLY);
         studentPaymentOrder.setExpectAmount(amount);
@@ -321,6 +324,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
         Date date = new Date();
         StudentPaymentOrder studentPaymentOrder = new StudentPaymentOrder();
         studentPaymentOrder.setUserId(userId);
+        studentPaymentOrder.setGroupType(GroupType.MUSIC);
         studentPaymentOrder.setOrderNo(orderNo);
         studentPaymentOrder.setType(OrderTypeEnum.APPLY);
         studentPaymentOrder.setExpectAmount(amount);
@@ -501,6 +505,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
                 //生成订单
                 StudentPaymentOrder studentPaymentOrder = new StudentPaymentOrder();
                 studentPaymentOrder.setUserId(userId);
+                studentPaymentOrder.setGroupType(GroupType.MUSIC);
                 studentPaymentOrder.setType(OrderTypeEnum.APPLY);
                 studentPaymentOrder.setStatus(DealStatusEnum.WAIT_PAY);
                 studentPaymentOrder.setMusicGroupId(musicGroupId);

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

@@ -23,6 +23,7 @@ import com.ym.mec.im.ImFeignService;
 import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
+
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -944,6 +945,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
 		StudentPaymentOrder studentPaymentOrder=new StudentPaymentOrder();
 		studentPaymentOrder.setUserId(user.getId());
+        studentPaymentOrder.setGroupType(GroupType.VIP);
 		String orderNo=StringUtils.join(new String[]{user.getId().toString(),String.valueOf(System.currentTimeMillis())});
 		studentPaymentOrder.setOrderNo(orderNo);
 		studentPaymentOrder.setStatus(DealStatusEnum.ING);