Joburgess 4 år sedan
förälder
incheckning
bc041fe868

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/VipGroupApplyDto.java

@@ -18,6 +18,9 @@ public class VipGroupApplyDto {
     @ApiModelProperty(value = "课程计划列表",required = false)
     private List<CourseSchedule> courseSchedules;
 
+    @ApiModelProperty(value = "课程组只能是正常状态")
+    private Boolean onlyProgress;
+
     private BigDecimal singleClassPrice;
 
     public BigDecimal getSingleClassPrice() {
@@ -53,4 +56,12 @@ public class VipGroupApplyDto {
     public void setCourseSchedules(List<CourseSchedule> courseSchedules) {
         this.courseSchedules = courseSchedules;
     }
+
+    public Boolean getOnlyProgress() {
+        return onlyProgress;
+    }
+
+    public void setOnlyProgress(Boolean onlyProgress) {
+        this.onlyProgress = onlyProgress;
+    }
 }

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

@@ -345,6 +345,11 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             }
         }
 
+        if(vipGroup.getOnlyProgress()){
+			vipGroupApplyBaseInfoDto.setAuditStatus(AuditStatusEnum.PASS);
+			vipGroupApplyBaseInfoDto.setStatus(VipGroupStatusEnum.PROGRESS);
+		}
+
 		vipGroupDao.insert(vipGroupApplyBaseInfoDto);
 
         vipGroup.getVipGroupApplyBaseInfo().setId(vipGroupApplyBaseInfoDto.getId());

+ 1 - 0
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherVipGroupController.java

@@ -77,6 +77,7 @@ public class TeacherVipGroupController extends BaseController {
 		vipGroupApplyDto.getVipGroupApplyBaseInfo().setOrganId(teacher.getTeacherOrganId());
 		vipGroupApplyDto.getVipGroupApplyBaseInfo().setRegistrationStartTime(new Date());
 		vipGroupApplyDto.getVipGroupApplyBaseInfo().setPaymentExpireDate(DateUtil.addDays(vipGroupApplyDto.getVipGroupApplyBaseInfo().getRegistrationStartTime(),1));
+		vipGroupApplyDto.setOnlyProgress(true);
 		vipGroupService.createVipGroup(vipGroupApplyDto);
 		vipGroupService.addVipGroupStudents(vipGroupApplyDto.getVipGroupApplyBaseInfo().getId(), Arrays.stream(vipGroupApplyDto.getVipGroupApplyBaseInfo().getStudentIdList().split(",")).map(Integer::valueOf).collect(Collectors.toList()));
 		return succeed();