Procházet zdrojové kódy

新建乐团增加乐团增加学生逻辑

周箭河 před 5 roky
rodič
revize
fa6b801a19
29 změnil soubory, kde provedl 277 přidání a 140 odebrání
  1. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupDao.java
  2. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupPaymentEntitiesDao.java
  3. 6 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SubjectDao.java
  4. 1 3
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ClassGroupStudentMapper.java
  5. 0 12
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ClassGroupTeacherSalary.java
  6. 14 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentRegistration.java
  7. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/service/ClassGroupService.java
  8. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupService.java
  9. 6 0
      mec-biz/src/main/java/com/ym/mec/biz/service/SubjectService.java
  10. 3 3
      mec-biz/src/main/java/com/ym/mec/biz/service/VipGroupService.java
  11. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java
  12. 54 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java
  13. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleTeacherSalaryServiceImpl.java
  14. 27 14
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  15. 30 26
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentWithdrawServiceImpl.java
  16. 5 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SubjectServiceImpl.java
  17. 41 46
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java
  18. 7 0
      mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml
  19. 6 6
      mec-biz/src/main/resources/config/mybatis/ClassGroupStudentMapperMapper.xml
  20. 0 10
      mec-biz/src/main/resources/config/mybatis/ClassGroupTeacherSalaryMapper.xml
  21. 3 0
      mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentEntitiesMapper.xml
  22. 2 2
      mec-biz/src/main/resources/config/mybatis/StudentApplyRefundsMapper.xml
  23. 1 0
      mec-biz/src/main/resources/config/mybatis/StudentManageDao.xml
  24. 4 3
      mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml
  25. 3 5
      mec-biz/src/main/resources/config/mybatis/SubjectMapper.xml
  26. 3 3
      mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml
  27. 6 0
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherSubjectController.java
  28. 11 0
      mec-web/src/main/java/com/ym/mec/web/controller/MusicGroupController.java
  29. 7 4
      mec-web/src/main/java/com/ym/mec/web/controller/VipGroupManageController.java

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

@@ -5,6 +5,7 @@ import com.ym.mec.biz.dal.entity.ClassGroup;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.entity.ImGroupModel;
 import com.ym.mec.common.entity.ImUserModel;
+
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -329,4 +330,11 @@ public interface ClassGroupDao extends BaseDAO<Integer, ClassGroup> {
      * @return
      */
     List<ConditionDto> queryStudentClassGroup(@Param("musicGroupId") String musicGroupId, @Param("teacherId") Integer teacherId);
+    
+    /**
+     * 批量新增班级上的课次数
+     * @param classGroupList
+     * @return
+     */
+    int batchIncreaseClassTimes(List<Integer> classGroupList);
 }

+ 7 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupPaymentEntitiesDao.java

@@ -18,4 +18,11 @@ public interface MusicGroupPaymentEntitiesDao extends BaseDAO<Integer, MusicGrou
      * @param musicGroupId
      */
     void delByGroupId(String musicGroupId);
+
+    /**
+     * 根据乐团编号查询
+     * @param musicGroupId
+     * @return
+     */
+    List<MusicGroupPaymentEntities> findByMusicGroupId(String musicGroupId);
 }

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SubjectDao.java

@@ -86,4 +86,10 @@ public interface SubjectDao extends BaseDAO<Integer, Subject> {
      * @describe 根据科目编号获取部门编号,部门名称
      */
     List<Map<Long,String>> findBySubjecIds(@Param("subjectIds") List<String> subjectIds);
+
+    /**
+     * 获取子级列表
+     * @return
+     */
+    List<Subject> findSubSubjects();
 }

+ 1 - 3
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ClassGroupStudentMapper.java

@@ -1,12 +1,10 @@
 package com.ym.mec.biz.dal.entity;
 
-import com.ym.mec.biz.dal.enums.ClassGroupStudentStatusEnum;
-
 import io.swagger.annotations.ApiModelProperty;
 
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
-import java.util.Date;
+import com.ym.mec.biz.dal.enums.ClassGroupStudentStatusEnum;
 
 /**
  * 对应数据库表(class_group_student_mapper):

+ 0 - 12
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ClassGroupTeacherSalary.java

@@ -3,21 +3,9 @@ package com.ym.mec.biz.dal.entity;
 import java.math.BigDecimal;
 
 public class ClassGroupTeacherSalary extends ClassGroupTeacherMapper {
-    /**
-     * 课时长
-     */
-    private Integer duration;
     
     private BigDecimal onlineClassesSalary;
 
-    public Integer getDuration() {
-        return duration;
-    }
-
-    public void setDuration(Integer duration) {
-        this.duration = duration;
-    }
-
 	public BigDecimal getOnlineClassesSalary() {
 		return onlineClassesSalary;
 	}

+ 14 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentRegistration.java

@@ -7,6 +7,8 @@ import io.swagger.annotations.ApiModelProperty;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 import java.math.BigDecimal;
+import java.sql.DatabaseMetaData;
+import java.sql.Date;
 
 /**
  * 对应数据库表(student_registration):
@@ -70,6 +72,9 @@ public class StudentRegistration {
     @ApiModelProperty(value = "家长单位", required = false)
     private String parentsCompany;
 
+    @ApiModelProperty(value = "生日", required = false)
+    private Date birthdate;
+
     @ApiModelProperty(value = "缴费状态(1-已缴费 0-未交费)", required = false)
     private YesOrNoEnum paymentStatus;
 
@@ -86,6 +91,15 @@ public class StudentRegistration {
         return musicGroupStatus;
     }
 
+
+    public Date getBirthdate() {
+        return birthdate;
+    }
+
+    public void setBirthdate(Date birthdate) {
+        this.birthdate = birthdate;
+    }
+
     public void setMusicGroupStatus(ClassGroupStudentStatusEnum musicGroupStatus) {
         this.musicGroupStatus = musicGroupStatus;
     }

+ 7 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/ClassGroupService.java

@@ -260,4 +260,11 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
      * @return
      */
     PageInfo<MusicGroupCourseScheduleDto> queryMusicGroupCourseSchedule(queryMusicGroupCourseScheduleQueryInfo queryInfo);
+    
+    /**
+     * 批量新增班级上的课次数
+     * @param classGroupList
+     * @return
+     */
+    boolean batchIncreaseClassTimes(List<Integer> classGroupList);
 }

+ 7 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupService.java

@@ -134,4 +134,11 @@ public interface MusicGroupService extends BaseService<String, MusicGroup> {
 	 * @param subFeeSettingDto
 	 */
 	void updateBaseInfo(SubFeeSettingDto subFeeSettingDto);
+
+	/**
+	 * 获取修改乐团时的基本信息数据
+	 * @param musicGroupId
+	 * @return
+	 */
+	SubFeeSettingDto findMusicGroupBasicInfo(String musicGroupId);
 }

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/SubjectService.java

@@ -76,4 +76,10 @@ public interface SubjectService extends BaseService<Integer, Subject> {
      * @describe 根据部门编号列表获取部门编号,名称map
      */
     Map<Long,String> findSubjectMapBySubjectIdsList(List<String> subjectIdsList);
+
+    /**
+     * 获取子级科目列表
+     * @return
+     */
+    List<Subject> findSubSubjects();
 }

+ 3 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/VipGroupService.java

@@ -136,8 +136,8 @@ public interface VipGroupService extends BaseService<Long, VipGroup> {
      * @describe 更新vip课班级人数及状态
      * @author Joburgess
      * @date 2019/10/20
-     * @param vipGroupId:
-     * @param num:
+     * @param vipGroupId: vip课编号
+     * @param num: 人数
      * @return void
      */
     void updateVipGroupStudentNumAndStatus(Long vipGroupId,Integer num);
@@ -176,7 +176,7 @@ public interface VipGroupService extends BaseService<Long, VipGroup> {
      * @return void
      * @describe 退课申请审核
      */
-    void applyRefundAudit(Long id,AuditStatusEnum status,String remark);
+    void applyRefundAudit(Long id,AuditStatusEnum status,String remark,BigDecimal amount);
 
     /**
      * @Author: Joburgess

+ 7 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java

@@ -20,6 +20,7 @@ import com.ym.mec.common.page.QueryInfo;
 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.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -915,4 +916,10 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         pageInfo.setRows(dataList);
         return pageInfo;
     }
+
+	@Override
+	public boolean batchIncreaseClassTimes(List<Integer> classGroupList) {
+		classGroupDao.batchIncreaseClassTimes(classGroupList);
+		return true;
+	}
 }

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

@@ -10,7 +10,9 @@ import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.enums.*;
 import com.ym.mec.biz.dal.page.CourseScheduleQueryInfo;
 import com.ym.mec.biz.dal.page.StudentCourseScheduleRecordQueryInfo;
+import com.ym.mec.biz.service.ClassGroupService;
 import com.ym.mec.biz.service.CourseScheduleService;
+import com.ym.mec.biz.service.CourseScheduleTeacherSalaryService;
 import com.ym.mec.biz.service.SysConfigService;
 import com.ym.mec.biz.service.SysMessageService;
 import com.ym.mec.common.dal.BaseDAO;
@@ -20,6 +22,7 @@ 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.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -52,7 +55,16 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 	@Autowired
 	private SysMessageService sysMessageService;
 	@Autowired
+	private CourseScheduleTeacherSalaryService courseScheduleTeacherSalaryService;
+	@Autowired
+	private VipGroupDao vipGroupDao;
+	@Autowired
+	private TeacherDefaultVipGroupSalaryDao teacherDefaultVipGroupSalaryDao;
+	@Autowired
 	private CourseScheduleTeacherSalaryDao courseScheduleTeacherSalaryDao;
+	
+	@Autowired
+	private ClassGroupService classGroupService;
 
 	@Override
 	public BaseDAO<Long, CourseSchedule> getDAO() {
@@ -341,11 +353,28 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 				checkStudentIsRepeat(repeatClassGroupIds);
 				courseScheduleDao.update(newCourseSchedule);
 			}
-			if(oldCourseSchedule.getType()== CourseSchedule.CourseScheduleType.VIP){
-				if(!oldCourseSchedule.getActualTeacherId().equals(newCourseSchedule.getActualTeacherId())){
 
+			//被修改的教师编号列表,需要将预计薪水置零
+			List<Integer> beReplaceTeacherIds=new ArrayList<>();
+
+			if(oldCourseSchedule.getType()== CourseSchedule.CourseScheduleType.VIP){
+				if(Objects.isNull(oldCourseSchedule.getActualTeacherId())||!oldCourseSchedule.getActualTeacherId().equals(newCourseSchedule.getActualTeacherId())){
+					VipGroup byCourseSchedule = vipGroupDao.findByCourseSchedule(newCourseSchedule.getId().intValue());
+					TeacherDefaultVipGroupSalary byTeacherAndCategory = teacherDefaultVipGroupSalaryDao.findByTeacherAndCategory(newCourseSchedule.getActualTeacherId(), byCourseSchedule.getVipGroupCategoryId());
+					List<CourseSchedule> courseSchedules=new ArrayList<>();
+					coursesByDates.add(newCourseSchedule);
+					courseScheduleTeacherSalaryService.createCourseScheduleTeacherVipSalary(byCourseSchedule,
+							courseSchedules,
+							byTeacherAndCategory.getOnlineClassesSalary(),
+							byTeacherAndCategory.getOfflineClassesSalary());
+					beReplaceTeacherIds.add(oldCourseSchedule.getActualTeacherId().intValue());
 				}
 			}else{
+				if(Objects.isNull(oldCourseSchedule.getActualTeacherId())||!oldCourseSchedule.getActualTeacherId().equals(newCourseSchedule.getActualTeacherId())){
+					//如果主教被修改则调整课酬记录
+
+					beReplaceTeacherIds.add(oldCourseSchedule.getActualTeacherId().intValue());
+				}
 				List<CourseScheduleTeacherSalary> courseTeachingTeacherList=courseTeachingTeacherMaps.get(newCourseSchedule.getId());
 				//当前设置的课程助教编号列表
 				List<Integer> currentCourseTeachingTeacherIds=new ArrayList<>();
@@ -356,7 +385,19 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 				List<Integer> newTeachingTeacherIdList = newCourseSchedule.getTeachingTeacherIdList();
 				//找出重复的助教编号
 				List<Integer> foundInCurrentCourseTeachingTeacherIds = newTeachingTeacherIdList.stream().filter(currentCourseTeachingTeacherIds::contains).collect(Collectors.toList());
+
+				newTeachingTeacherIdList.forEach(newTeacherId->{
+					//如果不在重复列表中,则需要生成对应的课酬记录
+					if(!foundInCurrentCourseTeachingTeacherIds.contains(newTeacherId)){
+						//计算修改后的助教的课酬
+
+
+						beReplaceTeacherIds.add(oldCourseSchedule.getActualTeacherId().intValue());
+					}
+				});
 			}
+			//将被修改的教师预计薪水置零
+			courseScheduleTeacherSalaryDao.batchUpdateTeacherExpectSalary(newCourseSchedule.getId().intValue(),beReplaceTeacherIds);
 		});
 	}
 
@@ -512,15 +553,26 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 
 		List<CourseSchedule> updateList = new ArrayList<CourseSchedule>();
 		Date date = new Date();
+		List<Integer> classGroups = new ArrayList<Integer>();
 		for (CourseSchedule courseSchedule : list) {
 			courseSchedule.setStatus(CourseStatusEnum.OVER);
 			courseSchedule.setUpdateTime(date);
 			updateList.add(courseSchedule);
+			
+			if(!classGroups.contains(courseSchedule.getClassGroupId())){
+				classGroups.add(courseSchedule.getClassGroupId());
+			}
 		}
 
 		if (updateList.size() > 0) {
 			courseScheduleDao.batchUpdate(updateList);
 		}
+		
+		//更新班级课次
+		if(classGroups.size()>0){
+			classGroupService.batchIncreaseClassTimes(classGroups);
+		}
+		
 		return true;
 	}
 

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

@@ -69,7 +69,7 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
 				CourseScheduleTeacherSalary courseScheduleTeacherSalary=new CourseScheduleTeacherSalary();
 				courseScheduleTeacherSalary.setCourseScheduleId(courseSchedules.get(i).getId());
 				courseScheduleTeacherSalary.setTeacherRole(TeachTypeEnum.BISHOP);
-				courseScheduleTeacherSalary.setUserId(vipGroup.getUserId());
+				courseScheduleTeacherSalary.setUserId(courseSchedules.get(i).getActualTeacherId().intValue());
 				courseScheduleTeacherSalary.setClassGroupId(courseSchedules.get(i).getClassGroupId());
 
 				Map<String,BigDecimal> feeInfo = vipGroupService.countVipGroupPredictFee(vipGroup,

+ 27 - 14
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

@@ -22,6 +22,7 @@ import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.im.ImFeignService;
 import com.ym.mec.util.collection.MapUtil;
 
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Propagation;
@@ -116,11 +117,11 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         musicGroupDao.insert(musicGroup);
         // 保存乐团付费主体列表
         //批量新增
-        musicGroupPaymentEntitiesDao.batchAdd(subFeeSettingDto.getMusicGroupPaymentEntities(), musicGroupId);
+        musicGroupPaymentEntitiesDao.batchAdd(subFeeSettingDto.getMusicGroupPaymentEntities(),musicGroupId);
         // 保存学员付费周期
         List<Integer> months = subFeeSettingDto.getMonths();
         if (months != null && months.size() > 0) {
-            musicGroupPaymentCalenderDao.batchAdd(months, musicGroupId);
+            musicGroupPaymentCalenderDao.batchAdd(months,musicGroupId);
         }
         // 保存乐团声部规划
         if (musicGroupSubjectPlans == null) {
@@ -130,7 +131,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             e.setMusicGroupId(musicGroupId);
             musicGroupSubjectPlanDao.insert(e);
         });
-
+        //乐团科目学生
         if (subjectRegisters != null) {
             List<StudentRegistration> studentRegistrationList = new ArrayList<>();
             subjectRegisters.forEach(e -> {
@@ -148,17 +149,16 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             );
             studentRegistrationService.batchInsert(studentRegistrationList);
         }
-
         // 保存乐团声部商品规划
         if (musicGroupSubjectGoodsGroups == null) {
             musicGroupSubjectGoodsGroups = new ArrayList<>();
         }
-        musicGroupSubjectGoodsGroupDao.batchInsert(musicGroupSubjectGoodsGroups, musicGroupId);
+        musicGroupSubjectGoodsGroupDao.batchInsert(musicGroupSubjectGoodsGroups,musicGroupId);
         // 新增聊天群
         // ImGroupModel imGroupModel = new ImGroupModel(musicGroupId, musicGroup.getName());
         // 教务老师和运营主管加入群组
-        ImGroupMember[] imGroupMembers = {new ImGroupMember(musicGroup.getTeamTeacherId().toString()),
-                new ImGroupMember(musicGroup.getEducationalTeacherId().toString())};
+        ImGroupMember[] imGroupMembers = { new ImGroupMember(musicGroup.getTeamTeacherId().toString()),
+                new ImGroupMember(musicGroup.getEducationalTeacherId().toString()) };
         // 创建群组
         imFeignService.groupCreate(new ImGroupModel(musicGroupId, imGroupMembers, musicGroup.getName()));
         // 记录创建日志
@@ -172,7 +172,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         // 获取学员在该乐团续费状态
         musicCardDtos.forEach(e -> {
             MusicGroupStudentFee groupStudentFee = musicGroupStudentFeeDao.findByUser(userId, e.getMusicGroupId());
-            if (groupStudentFee != null) {
+            if(groupStudentFee != null){
                 e.setPaymentStatus(musicGroupStudentFeeDao.findByUser(userId, e.getMusicGroupId()).getPaymentStatus());
             }
         });
@@ -474,7 +474,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         //更新下次续费时间
         MusicGroupStudentFee musicGroupStudentFee = musicGroupStudentFeeDao.findByUser(userId, musicGroupId);
 
-        if (musicGroupStudentFee == null) {
+        if(musicGroupStudentFee == null){
             throw new BizException("系统数据异常,找不到学员预缴费信息");
         }
 
@@ -570,23 +570,36 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         MusicGroup musicGroup = subFeeSettingDto.getMusicGroup();
         String musicGroupId = musicGroup.getId();
         MusicGroup group = musicGroupDao.get(musicGroupId);
-        if (group != null) {
+        if(group != null){
             musicGroupDao.update(musicGroup);
             //修改课程里面的教学点
-            if (!group.getSchoolId().equals(musicGroup.getSchoolId())) {
-                courseScheduleDao.updateByMusicGroupId(musicGroupId, musicGroup.getSchoolId());
+            if(!group.getSchoolId().equals(musicGroup.getSchoolId())){
+                courseScheduleDao.updateByMusicGroupId(musicGroupId,musicGroup.getSchoolId());
             }
             // 删除乐团付费主体列表
             musicGroupPaymentEntitiesDao.delByGroupId(musicGroupId);
             //批量新增
-            musicGroupPaymentEntitiesDao.batchAdd(subFeeSettingDto.getMusicGroupPaymentEntities(), musicGroupId);
+            musicGroupPaymentEntitiesDao.batchAdd(subFeeSettingDto.getMusicGroupPaymentEntities(),musicGroupId);
 
             // 修改学员付费周期
             List<Integer> calender = subFeeSettingDto.getMonths();
             //删除乐团相关付费周期
             musicGroupPaymentCalenderDao.delByGroupId(musicGroupId);
             //批量插入
-            musicGroupPaymentCalenderDao.batchAdd(calender, musicGroupId);
+            musicGroupPaymentCalenderDao.batchAdd(calender,musicGroupId);
         }
     }
+
+    @Override
+    public SubFeeSettingDto findMusicGroupBasicInfo(String musicGroupId) {
+        SubFeeSettingDto subFeeSettingDto = new SubFeeSettingDto();
+        //获取乐团信息
+        subFeeSettingDto.setMusicGroup(musicGroupDao.get(musicGroupId));
+        //获取付费主体
+        subFeeSettingDto.setMusicGroupPaymentEntities(musicGroupPaymentEntitiesDao.findByMusicGroupId(musicGroupId));
+        //获取缴费周期
+        List<Integer> paymentMonth = musicGroupPaymentCalenderDao.findByMusicGroupId(musicGroupId).stream().map(e -> e.getPaymentMonth()).collect(Collectors.toList());
+        subFeeSettingDto.setMonths(paymentMonth);
+        return subFeeSettingDto;
+    }
 }

+ 30 - 26
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentWithdrawServiceImpl.java

@@ -9,6 +9,7 @@ import com.ym.mec.biz.dal.dto.WithdrawInfoDto;
 import com.ym.mec.biz.dal.entity.StudentWithdraw;
 import com.ym.mec.biz.dal.entity.SysUserCashAccount;
 import com.ym.mec.biz.dal.entity.SysUserCashAccountDetail;
+import com.ym.mec.biz.dal.enums.DealStatusEnum;
 import com.ym.mec.biz.dal.enums.PlatformCashAccountDetailTypeEnum;
 import com.ym.mec.biz.dal.enums.PlatformCashAccountStatusEnum;
 import com.ym.mec.biz.dal.enums.TransTypeEnum;
@@ -51,9 +52,6 @@ public class StudentWithdrawServiceImpl extends BaseServiceImpl<String, StudentW
 
 	private static final Logger log = LoggerFactory.getLogger(StudentWithdrawServiceImpl.class);
 
-//	@Qualifier("auth-server")
-//	@Autowired
-//	private SysUserFeignService sysUserFeignService;
 	@Autowired
 	private SysUserCashAccountService cashAccountService;
 	@Autowired
@@ -78,9 +76,13 @@ public class StudentWithdrawServiceImpl extends BaseServiceImpl<String, StudentW
 			}
 			//第三方提现到用户银行卡
 			//用户个人虚拟账户金额减少
-			updateCashAccount(sysUserCashAccount, withdrawDto);
+
+//			updateCashAccount(sysUserCashAccount, withdrawDto);
 			//生成提现记录(缺少银行流水号,交易状态,用户承担的费用,平台承担的费用)
-			saveStudentWithdraw(withdrawDto);
+			Integer withdrawId = saveStudentWithdraw(withdrawDto);
+
+			accountDetailService.addCashAccountDetail(withdrawDto.getUserId(),withdrawDto.getAmount(),withdrawId +"","",
+					PlatformCashAccountDetailTypeEnum.WITHDRAW,TransTypeEnum.FAST_PAYMENT, DealStatusEnum.ING,"");
 		} catch (Exception e) {
 			log.error("用户提现出现异常 {}", e.getMessage(), e);
 			throw new BizException(e.getMessage());
@@ -89,6 +91,26 @@ public class StudentWithdrawServiceImpl extends BaseServiceImpl<String, StudentW
 		}
 		return true;
 	}
+	/**
+	 * 修改用户账户余额,保存账户明细
+	 *
+	 * @param withdrawDto
+	 */
+	private void updateCashAccount(SysUserCashAccount sysUserCashAccount, WithdrawDto withdrawDto) {
+		BigDecimal balance = sysUserCashAccount.getBalance().subtract(withdrawDto.getAmount());
+		SysUserCashAccount account = new SysUserCashAccount();
+		account.setUserId(sysUserCashAccount.getUserId());
+		account.setBalance(balance);
+		account.setUpdateTime(new Date());
+		cashAccountService.update(account);
+		SysUserCashAccountDetail cashAccountDetail = new SysUserCashAccountDetail();
+		cashAccountDetail.setUserId(withdrawDto.getUserId());
+		cashAccountDetail.setType(PlatformCashAccountDetailTypeEnum.WITHDRAW);
+		cashAccountDetail.setAmount(withdrawDto.getAmount());
+		cashAccountDetail.setBalance(balance);
+		cashAccountDetail.setCreateTime(new Date());
+		cashAccountDetailService.insert(cashAccountDetail);
+	}
 
 	@Override
 	public PageInfo<WithdrawInfoDto> queryWithdrawPage(CashAccountDetail cashAccountDetail) {
@@ -146,33 +168,14 @@ public class StudentWithdrawServiceImpl extends BaseServiceImpl<String, StudentW
 		}
 	}
 
-	/**
-	 * 修改用户账户余额,保存账户明细
-	 *
-	 * @param withdrawDto
-	 */
-	private void updateCashAccount(SysUserCashAccount sysUserCashAccount, WithdrawDto withdrawDto) {
-		BigDecimal balance = sysUserCashAccount.getBalance().subtract(withdrawDto.getAmount());
-		SysUserCashAccount account = new SysUserCashAccount();
-		account.setUserId(sysUserCashAccount.getUserId());
-		account.setBalance(balance);
-		account.setUpdateTime(new Date());
-		cashAccountService.update(account);
-		SysUserCashAccountDetail cashAccountDetail = new SysUserCashAccountDetail();
-		cashAccountDetail.setUserId(withdrawDto.getUserId());
-		cashAccountDetail.setType(PlatformCashAccountDetailTypeEnum.WITHDRAW);
-		cashAccountDetail.setAmount(withdrawDto.getAmount());
-		cashAccountDetail.setBalance(balance);
-		cashAccountDetail.setCreateTime(new Date());
-		cashAccountDetailService.insert(cashAccountDetail);
-	}
+
 
 	/**
 	 * 保存提现记录
 	 *
 	 * @param withdrawDto
 	 */
-	private void saveStudentWithdraw(WithdrawDto withdrawDto) {
+	private Integer saveStudentWithdraw(WithdrawDto withdrawDto) {
 		IdWorker idWorker = new IdWorker(0, 0);
 		StudentWithdraw studentWithdraw = new StudentWithdraw();
 		studentWithdraw.setWithdrawNo(idWorker.nextId());
@@ -181,6 +184,7 @@ public class StudentWithdrawServiceImpl extends BaseServiceImpl<String, StudentW
 		studentWithdraw.setAmount(withdrawDto.getAmount());
 		studentWithdraw.setCreateTime(new Date());
 		insert(studentWithdraw);
+		return studentWithdraw.getId();
 	}
 
 }

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

@@ -155,4 +155,9 @@ public class SubjectServiceImpl extends BaseServiceImpl<Integer, Subject>  imple
         Map<Long,String> subjectIdAndName = MapUtil.convertMybatisMap(bySubjecIds);
         return subjectIdAndName;
     }
+
+    @Override
+    public List<Subject> findSubSubjects() {
+        return subjectDao.findSubSubjects();
+    }
 }

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

@@ -465,6 +465,10 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		TeacherDefaultVipGroupSalary teacherDefaultVipGroupSalary = teacherDefaultVipGroupSalaryDao.findByTeacherAndCategory(teacherId.longValue(),
 				vipGroup.getVipGroupCategoryId());
 
+		if(Objects.isNull(vipGroup.getVipGroupActivityId())){
+			throw new BizException("请指定活动方案");
+		}
+
 		VipGroupActivity vipGroupActivity = vipGroupActivityDao.get(vipGroup.getVipGroupActivityId().intValue());
 
 		if(Objects.isNull(vipGroupActivity)){
@@ -487,51 +491,42 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		BigDecimal onlineVipGroupCharge = onlineClassesUnitPrice.multiply(onlineClassNum);
 		BigDecimal offlineVipGroupCharge = offlineClassesUnitPrice.multiply(offlineClassNum);
 
-		if(vipGroup.getOnlineClassesNum()>0){
-			//教师课酬线上单课酬计算
-			switch (vipGroupSalarySettlementDto.getOnlineSalarySettlement().getSalarySettlementType()){
-				case TEACHER_DEFAULT:
-					if(Objects.isNull(teacherDefaultVipGroupSalary)){
-						throw new BizException("未设置教师默认课酬");
-					}
-					results.put("onlineTeacherSalary",teacherDefaultVipGroupSalary.getOfflineClassesSalary().multiply(classTimeDuty));
-					break;
-				case RATIO_DISCOUNT:
-					results.put("onlineTeacherSalary",onlineClassesUnitPrice.multiply((vipGroupSalarySettlementDto.getOnlineSalarySettlement().getSettlementValue())));
-					break;
-				case FIXED_SALARY:
-					results.put("onlineTeacherSalary",vipGroupSalarySettlementDto.getOnlineSalarySettlement().getSettlementValue());
-					break;
-				default:
-					throw new BizException("未指定课酬结算标准!");
-			}
-		}else{
-			results.put("onlineTeacherSalary",new BigDecimal(0));
-		}
-
-		if(vipGroup.getOfflineClassesNum()>0){
-			//教师线下单课酬计算
-			switch (vipGroupSalarySettlementDto.getOfflineSalarySettlement().getSalarySettlementType()){
-				case TEACHER_DEFAULT:
-					if(Objects.isNull(teacherDefaultVipGroupSalary)){
-						throw new BizException("未设置教师默认课酬");
-					}
-					results.put("offlineTeacherSalary",teacherDefaultVipGroupSalary.getOfflineClassesSalary().multiply(classTimeDuty));
-					break;
-				case RATIO_DISCOUNT:
-					results.put("offlineTeacherSalary",offlineClassesUnitPrice.multiply(vipGroupSalarySettlementDto.getOfflineSalarySettlement().getSettlementValue()));
-					break;
-				case FIXED_SALARY:
-					results.put("offlineTeacherSalary",vipGroupSalarySettlementDto.getOfflineSalarySettlement().getSettlementValue());
-					break;
-				default:
-					throw new BizException("未指定课酬结算标准!");
-			}
-		}else{
-			results.put("offlineTeacherSalary",new BigDecimal(0));
+		//教师课酬线上单课酬计算
+		switch (vipGroupSalarySettlementDto.getOnlineSalarySettlement().getSalarySettlementType()){
+			case TEACHER_DEFAULT:
+				if(Objects.isNull(teacherDefaultVipGroupSalary)){
+					throw new BizException("未设置教师默认课酬");
+				}
+				results.put("onlineTeacherSalary",teacherDefaultVipGroupSalary.getOfflineClassesSalary().multiply(classTimeDuty));
+				break;
+			case RATIO_DISCOUNT:
+				results.put("onlineTeacherSalary",onlineClassesUnitPrice.multiply((vipGroupSalarySettlementDto.getOnlineSalarySettlement().getSettlementValue())));
+				break;
+			case FIXED_SALARY:
+				results.put("onlineTeacherSalary",vipGroupSalarySettlementDto.getOnlineSalarySettlement().getSettlementValue());
+				break;
+			default:
+				throw new BizException("未指定课酬结算标准!");
+		}
+
+		//教师线下单课酬计算
+		switch (vipGroupSalarySettlementDto.getOfflineSalarySettlement().getSalarySettlementType()){
+			case TEACHER_DEFAULT:
+				if(Objects.isNull(teacherDefaultVipGroupSalary)){
+					throw new BizException("未设置教师默认课酬");
+				}
+				results.put("offlineTeacherSalary",teacherDefaultVipGroupSalary.getOfflineClassesSalary().multiply(classTimeDuty));
+				break;
+			case RATIO_DISCOUNT:
+				results.put("offlineTeacherSalary",offlineClassesUnitPrice.multiply(vipGroupSalarySettlementDto.getOfflineSalarySettlement().getSettlementValue()));
+				break;
+			case FIXED_SALARY:
+				results.put("offlineTeacherSalary",vipGroupSalarySettlementDto.getOfflineSalarySettlement().getSettlementValue());
+				break;
+			default:
+				throw new BizException("未指定课酬结算标准!");
 		}
 
-
 		if(computeTotalPrice){
 			//课程购买费用计算
 			BigDecimal totalPrice;
@@ -711,7 +706,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
 	@Transactional(rollbackFor = Exception.class)
 	@Override
-	public void applyRefundAudit(Long id, AuditStatusEnum status, String remark) {
+	public void applyRefundAudit(Long id, AuditStatusEnum status, String remark,BigDecimal amount) {
 
 		StudentApplyRefunds studentApplyRefunds = studentApplyRefundsDao.get(id);
 		if (studentApplyRefunds == null) {
@@ -725,7 +720,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
 		studentApplyRefunds.setStatus(status);
 		if (studentApplyRefunds.getStatus() == AuditStatusEnum.PASS) {
-			studentApplyRefunds.setActualAmount(studentApplyRefunds.getExpectAmount());
+			studentApplyRefunds.setActualAmount(amount);
 		} else {
 			studentApplyRefunds.setActualAmount(new BigDecimal(0));
 		}
@@ -739,7 +734,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			sysUserCashAccountDetail.setUserId(studentApplyRefunds.getUserId());
 			sysUserCashAccountDetail.setType(PlatformCashAccountDetailTypeEnum.REFUNDS);
 			sysUserCashAccountDetail.setStatus(DealStatusEnum.SUCCESS);
-			sysUserCashAccountDetail.setAmount(studentApplyRefunds.getActualAmount());
+			sysUserCashAccountDetail.setAmount(amount);
 			sysUserCashAccountDetail.setBalance(sysUserCashAccount.getBalance());
 			sysUserCashAccountDetail.setAttribute(studentApplyRefunds.getId().toString());
 			sysUserCashAccountDetailDao.insert(sysUserCashAccountDetail);

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

@@ -643,4 +643,11 @@
         UPDATE class_group SET student_num_ = student_num_+1,update_time_=#{updateTime} WHERE id_ = #{id} AND
         student_num_=#{studentNum}
     </update>
+
+    <update id="batchIncreaseClassTimes" parameterType="java.util.List">
+        UPDATE class_group SET current_class_times_ = current_class_times_+1,update_time_ = now() WHERE id_ in
+        <foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
+        #{item}
+        </foreach>
+    </update>
 </mapper>

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

@@ -134,13 +134,13 @@
             cssp.course_schedule_id_ =#{courseScheduleId}
     </select>
 
-    <delete id="deleteStudentByMusicGroupId" parameterType="map">
-        DELETE FROM class_group_student_mapper WHERE class_group_id_ in (select id_ from class_group where music_group_id_ = #{musicGroupId}) and user_id_ = #{userId}
-    </delete>
+    <update id="deleteStudentByMusicGroupId" parameterType="map">
+        update class_group_student_mapper set status_ = 'QUIT' where class_group_id_ in (select id_ from class_group where music_group_id_ = #{musicGroupId}) and user_id_ = #{userId}
+    </update>
 
-    <delete id="deleteStudentByClassGroupId">
-        DELETE FROM class_group_student_mapper WHERE class_group_id_=#{classGroupId} AND user_id_=#{userId}
-    </delete>
+    <update id="deleteStudentByClassGroupId">
+        update class_group_student_mapper set status_ = 'QUIT' WHERE class_group_id_=#{classGroupId} AND user_id_=#{userId}
+    </update>
 
     <select id="findClassStudentMapperByUserIdAndClassGroupId" resultMap="ClassGroupStudentMapper">
         SELECT * FROM class_group_student_mapper WHERE user_id_=#{userId} AND class_group_id_=#{classGroupId} AND status_ = 'NORMAL'

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

@@ -7,7 +7,6 @@
     <result column="class_group_id_" jdbcType="INTEGER" property="classGroupId" />
     <result column="teacher_role_" jdbcType="VARCHAR" property="teacherRole" />
     <result column="user_id_" jdbcType="INTEGER" property="userId" />
-    <result column="duration_" jdbcType="INTEGER" property="duration" />
     <result column="salary_" jdbcType="DECIMAL" property="salary" />
     <result column="online_classes_salary_" jdbcType="DECIMAL" property="onlineClassesSalary" />
     <result column="create_time_" jdbcType="TIMESTAMP" property="createTime" />
@@ -36,9 +35,6 @@
       <if test="userId != null">
         user_id_,
       </if>
-      <if test="duration != null">
-        duration_,
-      </if>
       <if test="salary != null">
         salary_,
       </if>
@@ -65,9 +61,6 @@
       <if test="userId != null">
         #{userId,jdbcType=INTEGER},
       </if>
-      <if test="duration != null">
-        #{duration,jdbcType=INTEGER},
-      </if>
       <if test="salary != null">
         #{salary,jdbcType=DECIMAL},
       </if>
@@ -98,9 +91,6 @@
       <if test="userId != null">
         user_id_ = #{userId,jdbcType=INTEGER},
       </if>
-      <if test="duration != null">
-        duration_ = #{duration,jdbcType=INTEGER},
-      </if>
       <if test="salary != null">
         salary_ = #{salary,jdbcType=DECIMAL},
       </if>

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentEntitiesMapper.xml

@@ -83,4 +83,7 @@
 	<select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM music_group_payment_entities
 	</select>
+    <select id="findByMusicGroupId" resultMap="MusicGroupPaymentEntities">
+		SELECT * FROM music_group_payment_entities WHERE music_group_id_ = #{musicGroupId}
+	</select>
 </mapper>

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

@@ -103,10 +103,10 @@
 		SELECT count(1) FROM student_apply_refunds sar left join student_payment_order spo on sar.orig_payment_order_id_ = spo.id_ 
 		where 1=1 
         <if test="startTime != null">
-            and sar.create_time_ = #{startTime}
+            and sar.create_time_ &gt;= #{startTime}
         </if>
         <if test="endTime != null">
-            and sar.create_time_ = #{endTime}
+            and sar.create_time_ &lt;= #{endTime}
         </if>
 	</select>
 </mapper>

+ 1 - 0
mec-biz/src/main/resources/config/mybatis/StudentManageDao.xml

@@ -328,6 +328,7 @@
         LEFT JOIN `subject` s ON s.id_ = sr.actual_subject_id_
         LEFT JOIN music_group mg ON sr.music_group_id_ = mg.id_
         <include refid="queryMusicGroupStudentSql"/>
+        ORDER BY sr.create_time_ DESC
         <include refid="global.limit"/>
     </select>
     <select id="countMusicGroupStudent" resultType="java.lang.Integer">

+ 4 - 3
mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml

@@ -144,7 +144,8 @@
 
     <!-- 分页查询 -->
     <select id="queryPage" resultMap="PaymentOrderAndStudentInfo" parameterType="map">
-        SELECT spo.*,u.username_ FROM student_payment_order spo left join sys_user u on spo.user_id_ = u.id_
+        SELECT spo.*,u.username_ FROM student_payment_order spo
+        left join sys_user u on spo.user_id_ = u.id_
         <include refid="queryPaymentOrder"/>
         ORDER BY spo.id_
         <include refid="global.limit"/>
@@ -159,10 +160,10 @@
     <sql id="queryPaymentOrder">
         <where>
             <if test="orderStartDate != null">
-                AND spo.pay_time_ &gt;= #{orderStartDate}
+                AND spo.create_time_ &gt;= #{orderStartDate}
             </if>
             <if test="orderEndDate != null">
-                AND spo.pay_time_ &lt;= #{orderEndDate}
+                AND spo.create_time_ &lt;= #{orderEndDate}
             </if>
             <if test="paymentType != null">
                 AND spo.type_ = #{paymentType}

+ 3 - 5
mec-biz/src/main/resources/config/mybatis/SubjectMapper.xml

@@ -29,11 +29,6 @@
     <!-- 向数据库增加一条记录 -->
     <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.Subject" useGeneratedKeys="true" keyColumn="id"
             keyProperty="id">
-        <!--
-        <selectKey resultClass="int" keyProperty="id" >
-        SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
-        </selectKey>
-        -->
         INSERT INTO subject (id_,name_,code_,parent_subject_id_,create_time_,update_time_)
         VALUES(#{id},#{name},#{code},#{parentSubjectId},now(),now())
     </insert>
@@ -138,6 +133,9 @@
             #{subjectId}
         </foreach>
     </select>
+    <select id="findSubSubjects" resultMap="Subject">
+        SELECT * FROM `subject` WHERE parent_subject_id_ != 0
+    </select>
 
     <sql id="querySubPageSql">
         <where>

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

@@ -54,7 +54,7 @@
         su.gender_,su.nation_,su.birthdate_,su.email_,su.im_token_
         FROM teacher t
         LEFT JOIN sys_user su ON t.id_ = su.id_
-        WHERE t.id_ = #{userId} AND su.del_flag_ = 0
+        WHERE t.id_ = #{id} AND su.del_flag_ = 0
     </select>
 
     <!-- 全查询 -->
@@ -133,12 +133,12 @@
                 introduction_ = #{introduction},
             </if>
         </set>
-        WHERE id_ = #{userId}
+        WHERE id_ = #{id}
     </update>
 
     <!-- 根据主键删除一条记录 -->
     <update id="delete">
-        DELETE FROM teacher WHERE id_ = #{userId}
+        DELETE FROM teacher WHERE id_ = #{id}
     </update>
 
     <update id="updateUser" parameterType="com.ym.mec.auth.api.entity.SysUser">

+ 6 - 0
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherSubjectController.java

@@ -27,4 +27,10 @@ public class TeacherSubjectController extends BaseController {
         return succeed(subjectService.findTeacherSubjects());
     }
 
+    @ApiOperation(value = "获取子集科目列表")
+    @GetMapping("/findSubSubjects")
+    public Object findSubSubjects(){
+        return succeed(subjectService.findSubSubjects());
+    }
+
 }

+ 11 - 0
mec-web/src/main/java/com/ym/mec/web/controller/MusicGroupController.java

@@ -8,6 +8,7 @@ import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
@@ -30,6 +31,16 @@ public class MusicGroupController extends BaseController {
         return succeed();
     }
 
+    @ApiOperation(value = "获取乐团调整--基本信息数据")
+    @PostMapping("/findMusicGroupBasicInfo")
+    @PreAuthorize("@pcs.hasPermissions('musicGroup/findMusicGroupBasicInfo')")
+    public Object findMusicGroupBasicInfo(String musicGroupId){
+        if(StringUtils.isEmpty(musicGroupId)){
+            return failed("参数校验失败");
+        }
+        return succeed(musicGroupService.findMusicGroupBasicInfo(musicGroupId));
+    }
+
     @ApiOperation(value = "根据乐团编号查询乐团详情")
     @GetMapping("/get")
     @PreAuthorize("@pcs.hasPermissions('musicGroup/get')")

+ 7 - 4
mec-web/src/main/java/com/ym/mec/web/controller/VipGroupManageController.java

@@ -14,14 +14,17 @@ import com.ym.mec.biz.dal.page.VipGroupTeachingRecordQueryInfo;
 import com.ym.mec.biz.service.CourseScheduleService;
 import com.ym.mec.biz.service.VipGroupService;
 import com.ym.mec.common.controller.BaseController;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -95,10 +98,10 @@ public class VipGroupManageController extends BaseController {
     @ApiOperation(value = "退课申请审核")
     @PostMapping("/applyRefundAudit")
     @PreAuthorize("@pcs.hasPermissions('vipGroupManage/applyRefundAudit')")
-	public Object applyRefundAudit(Long id, AuditStatusEnum status, String remark) {
-		vipGroupService.applyRefundAudit(id, status, remark);
-        return succeed();
-    }
+	public Object applyRefundAudit(Long id, AuditStatusEnum status, String remark, BigDecimal amount) {
+		vipGroupService.applyRefundAudit(id, status, remark, amount);
+		return succeed();
+	}
 
     @ApiOperation(value = "获取VIP课教学记录")
     @GetMapping("/findVipGroupTeachingRecord")