Browse Source

活动排课,资格管理

zouxuan 2 years ago
parent
commit
2e7f6c5dbe

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

@@ -187,13 +187,13 @@ public interface SysConfigService extends BaseService<Long, SysConfig> {
 
 
     //乐团所有未开始课程组、商品等服务及产品退费时,退费金额扣减百分比(默认0.005)
-    String MUSIC_RETURN_FEE_CHARGES = "music_return_fee_charges";
+    String MUSIC_RETURN_FEE_CHARGES = "5";
     //乐团课退费时若课程组已开始,退费金额扣减百分比(默认0.8)
-    String MUSIC_COURSE_START_RETURN_FEE_CHARGES = "music_course_start_return_fee_charges";
+    String MUSIC_COURSE_START_RETURN_FEE_CHARGES = "80";
     //1v1小班课退费时若课程组已开始,退费金额扣减百分比(默认0.8)
-    String VIP_1V1_COURSE_NOT_START_RETURN_FEE_CHARGES = "VIP_1V1_COURSE_NOT_START_RETURN_FEE_CHARGES";
+    String VIP_1V1_COURSE_NOT_START_RETURN_FEE_CHARGES = "80";
     //1vn小班课退费时若课程组已开始,退费金额扣减百分比(默认0.7)
-    String VIP_1VN_COURSE_NOT_START_RETURN_FEE_CHARGES = "VIP_1VN_COURSE_NOT_START_RETURN_FEE_CHARGES";
+    String VIP_1VN_COURSE_NOT_START_RETURN_FEE_CHARGES = "70";
 
 
     public static final String BASE_API_URL = "base_api_url";

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

@@ -509,27 +509,6 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
         //未上课*0995手续费、以上课*0.8
         List<StudentCourseInfoDto> history = courseScheduleDao.findUserCourseInfos(GroupType.MUSIC, musicGroupId, studentId, "history");
         map.put(OrderDetailTypeEnum.COURSE.getCode(), sysUserCashAccountLogService.musicReturnFeeCharges(studentRegistration.getSurplusCourseFee(), history.size()));
-
-
-        // 查询云教练订单
-		/*BigDecimal cloudAmount = BigDecimal.ZERO;
-		List<Integer> studentIds = new ArrayList<Integer>();
-		studentIds.add(studentId);
-		List<CloudTeacherOrder> studentCloudTeacherOrders = cloudTeacherOrderService.getStudentCloudTeacherOrders(studentIds, musicGroupId);
-		if (studentCloudTeacherOrders != null && studentCloudTeacherOrders.size() > 0) {
-			Date nowDate = new Date();
-			for (CloudTeacherOrder cloudTeacherOrder : studentCloudTeacherOrders) {
-				if (cloudTeacherOrder.getEndTime() == null
-						|| DateUtil.stringToDate(DateUtil.format(cloudTeacherOrder.getEndTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT),
-								DateUtil.ISO_EXPANDED_DATE_FORMAT).compareTo(
-								DateUtil.stringToDate(DateUtil.format(nowDate, DateUtil.ISO_EXPANDED_DATE_FORMAT), DateUtil.ISO_EXPANDED_DATE_FORMAT)) >= 0) {
-					cloudAmount = cloudAmount.add(cloudTeacherOrder.getAmount());
-				}
-			}
-		}
-
-		map.put(OrderDetailTypeEnum.CLOUD_TEACHER.getCode(), cloudAmount);*/
-
         return map;
     }
 

+ 7 - 15
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysUserCashAccountLogServiceImpl.java

@@ -1,18 +1,14 @@
 package com.ym.mec.biz.service.impl;
 
+import com.ym.mec.biz.dal.dao.SysUserCashAccountLogDao;
+import com.ym.mec.biz.dal.entity.SysUserCashAccountLog;
 import com.ym.mec.biz.service.SysConfigService;
-import com.ym.mec.biz.service.SysTenantConfigService;
+import com.ym.mec.biz.service.SysUserCashAccountLogService;
 import com.ym.mec.common.constant.CommonConstants;
 import com.ym.mec.common.dal.BaseDAO;
-import com.ym.mec.common.page.PageInfo;
-import com.ym.mec.common.page.QueryInfo;
-import com.ym.mec.common.tenant.TenantContextHolder;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import com.ym.mec.common.service.impl.BaseServiceImpl;
-import com.ym.mec.biz.dal.entity.SysUserCashAccountLog;
-import com.ym.mec.biz.service.SysUserCashAccountLogService;
-import com.ym.mec.biz.dal.dao.SysUserCashAccountLogDao;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
@@ -22,8 +18,6 @@ public class SysUserCashAccountLogServiceImpl extends BaseServiceImpl<Long, SysU
 	
 	@Autowired
 	private SysUserCashAccountLogDao sysUserCashAccountLogDao;
-	@Autowired
-	private SysTenantConfigService sysTenantConfigService;
 
 	@Override
 	public BaseDAO<Long, SysUserCashAccountLog> getDAO() {
@@ -32,28 +26,26 @@ public class SysUserCashAccountLogServiceImpl extends BaseServiceImpl<Long, SysU
 
 	@Override
 	public BigDecimal musicReturnFeeCharges(BigDecimal returnFee, Integer size) {
-		Integer tenantId = TenantContextHolder.getTenantId();
 		String configName = SysConfigService.MUSIC_COURSE_START_RETURN_FEE_CHARGES;
 		if(size == null || size == 0){
 			configName = SysConfigService.MUSIC_RETURN_FEE_CHARGES;
 		}
-		return calcCharges(returnFee,sysTenantConfigService.getTenantConfigValue(configName, tenantId));
+		return calcCharges(returnFee,configName);
 	}
 
 	@Override
 	public BigDecimal vipReturnFeeCharges(BigDecimal returnFee, Integer size) {
-		Integer tenantId = TenantContextHolder.getTenantId();
 		String configName = SysConfigService.VIP_1VN_COURSE_NOT_START_RETURN_FEE_CHARGES;
 		if(size == null || size <= 1){
 			configName = SysConfigService.VIP_1V1_COURSE_NOT_START_RETURN_FEE_CHARGES;
 		}
-		return calcCharges(returnFee,sysTenantConfigService.getTenantConfigValue(configName, tenantId));
+		return calcCharges(returnFee,configName);
 	}
 
 	private BigDecimal calcCharges(BigDecimal returnFee,String configValue){
 		double returnFeeCharges = 1;
 		if(StringUtils.isNotEmpty(configValue)){
-			returnFeeCharges = 1 - (Double.parseDouble(configValue) / 100);
+			returnFeeCharges = Double.parseDouble(configValue) / 100;
 		}
 		return returnFee.multiply(new BigDecimal(returnFeeCharges)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
 	}

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

@@ -3220,12 +3220,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             throw new BizException("未找到对应班级");
         }
         bigDecimal = sysUserCashAccountLogService.vipReturnFeeCharges(bigDecimal, vipGroupCategory == null ? 0 : vipGroupCategory.getStudentNum());
-//		if(vipGroupCategory == null || vipGroupCategory.getStudentNum() <= 1){
-//            bigDecimal = bigDecimal.multiply(new BigDecimal(0.8)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
-//        }else{
-//            bigDecimal = bigDecimal.multiply(new BigDecimal(0.7)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
-//        }
-
         result.put("suplusCourseFee", bigDecimal);
 
         if (VipGroupStatusEnum.APPLYING.equals(vipGroup.getStatus())) {
@@ -3234,12 +3228,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
                 BigDecimal suplusCourseOriginalFee = studentPaymentOrder.getActualAmount().add(studentPaymentOrder.getBalancePaymentAmount());
                 result.put("suplusCourseOriginalFee", suplusCourseOriginalFee);
                 result.put("suplusCourseFee", sysUserCashAccountLogService.vipReturnFeeCharges(suplusCourseOriginalFee, vipGroupCategory == null ? 0 : vipGroupCategory.getStudentNum()));
-
-//				if(vipGroupCategory == null || vipGroupCategory.getStudentNum() <= 1){
-//					result.put("suplusCourseFee", suplusCourseOriginalFee.multiply(new BigDecimal(0.8)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP));
-//				}else{
-//					result.put("suplusCourseFee", suplusCourseOriginalFee.multiply(new BigDecimal(0.7)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP));
-//				}
             }
         }
         return result;