Explorar el Código

1、试听课
2、收费网管课活动

Joburgess hace 5 años
padre
commit
7537372136

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

@@ -185,10 +185,6 @@ public class EduPracticeGroupServiceImpl implements EduPracticeGroupService{
         Date now=new Date();
 
         int studentExitChargePractices = practiceGroupDao.checkStudentExitChargePractice(practiceGroupBuyParams.getStudentId());
-        Integer buyMonths=practiceGroupBuyParams.getBuyMonths();
-        if(!now.before(practicePromotionActivityStartDate)&&now.before(practiceBuyActivityExpireDate)&&studentExitChargePractices<=0){
-            practiceGroupBuyParams.setBuyMonths(2);
-        }
 
         LocalDate courseStartDay=LocalDate.now();
         LocalDate tempCourseLocalDate=LocalDate.parse("2020-03-01", DateUtil.dateFormatter);
@@ -291,7 +287,7 @@ public class EduPracticeGroupServiceImpl implements EduPracticeGroupService{
         }else{
             oneMonthPrice=practiceGroupBuyParams.getDrillTimesOnWeek()==1?practiceGroupSellPrice.getOnceOriginalPrice():practiceGroupSellPrice.getTwiceOriginalPrice();
         }
-        BigDecimal amount= oneMonthPrice.multiply(new BigDecimal(buyMonths));
+        BigDecimal amount= oneMonthPrice.multiply(new BigDecimal(practiceGroupBuyParams.getBuyMonths()));
 
         practiceGroupBuyParams.setDrillTimesJson(drillTimesObject.toJSONString());
         practiceGroupBuyParams.setOrganId(sysUser.getOrganId());

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

@@ -2706,10 +2706,6 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
         Date now=new Date();
 
         int studentExitChargePractices = practiceGroupDao.checkStudentExitChargePractice(practiceGroupBuyParams.getStudentId());
-        Integer buyMonths=practiceGroupBuyParams.getBuyMonths();
-        if(!now.before(practicePromotionActivityStartDate)&&now.before(practiceBuyActivityExpireDate)&&studentExitChargePractices<=0){
-            practiceGroupBuyParams.setBuyMonths(2);
-        }
 
         LocalDate courseStartDay=LocalDate.now();
         LocalDate tempCourseLocalDate=LocalDate.parse("2020-03-01", DateUtil.dateFormatter);
@@ -2827,7 +2823,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
         }else{
             oneMonthPrice=practiceGroupBuyParams.getDrillTimesOnWeek()==1?practiceGroupSellPrice.getOnceOriginalPrice():practiceGroupSellPrice.getTwiceOriginalPrice();
         }
-        BigDecimal amount= oneMonthPrice.multiply(new BigDecimal(buyMonths));
+        BigDecimal amount= oneMonthPrice.multiply(new BigDecimal(practiceGroupBuyParams.getBuyMonths()));
 
         practiceGroupBuyParams.setDrillTimesJson(drillTimesObject.toJSONString());
         practiceGroupBuyParams.setOrganId(sysUser.getOrganId());

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

@@ -539,7 +539,7 @@
                 AND (su.username_ LIKE CONCAT('%', #{search}, '%') OR su.phone_ LIKE CONCAT('%', #{search}, '%'))
             </if>
             AND su.id_ NOT IN (
-                SELECT student_id_ FROM practice_group WHERE type_='CHARGE' AND group_status_ IN ('NORMAL', 'FINISH')
+        SELECT DISTINCT pg.student_id_ FROM course_schedule_student_payment cssp LEFT JOIN practice_group pg ON pg.id_=cssp.music_group_id_ WHERE cssp.group_type_='PRACTICE' AND  pg.type_ = 'CHARGE'
             )
             AND NOT EXISTS (
                 SELECT user_id_ FROM course_schedule_student_payment cssp
@@ -569,7 +569,7 @@
                 AND (su.username_ LIKE CONCAT('%', #{search}, '%') OR su.phone_ LIKE CONCAT('%', #{search}, '%'))
             </if>
             AND su.id_ NOT IN (
-                SELECT student_id_ FROM practice_group WHERE type_='CHARGE' AND group_status_ IN ('NORMAL', 'FINISH')
+                SELECT DISTINCT pg.student_id_ FROM course_schedule_student_payment cssp LEFT JOIN practice_group pg ON pg.id_=cssp.music_group_id_ WHERE cssp.group_type_='PRACTICE' AND  pg.type_ = 'CHARGE'
             )
             AND NOT EXISTS (
                 SELECT user_id_ FROM course_schedule_student_payment cssp