|
@@ -214,16 +214,25 @@ public class GroupClassServiceImpl implements GroupClassService {
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public HttpResponseResult quitActivityGive(Integer activityUserMapperId,Boolean confirmReturnActivityGive,Integer studentId){
|
|
|
+ public HttpResponseResult quitActivityGive(Integer activityUserMapperId,boolean confirmReturnActivityGive,Integer studentId){
|
|
|
if(activityUserMapperId != null){
|
|
|
ActivityUserMapper activityUserMapper = activityUserMapperDao.get(activityUserMapperId);
|
|
|
if(activityUserMapper != null){
|
|
|
if(activityUserMapper.getReturnFee()){
|
|
|
- throw new BizException("当前课程组无法退费,请联系管理员");
|
|
|
+ return BaseController.succeed();
|
|
|
}
|
|
|
- if(!confirmReturnActivityGive && activityUserMapper.getGiveMemberFlag() != 0 && activityUserMapper.getGiveVipFlag() != 0 && activityUserMapper.getGivePracticeFlag() != 0){
|
|
|
- return BaseController.failed(HttpStatus.PARTIAL_CONTENT,"当前课程组为活动购买,退费会退还活动相关所有赠送,是否继续退费?");
|
|
|
+ if(!confirmReturnActivityGive){
|
|
|
+ if(activityUserMapper.getGiveMemberFlag() != 0){
|
|
|
+ return BaseController.failed(HttpStatus.PARTIAL_CONTENT,"当前课程组为活动购买,退费会退还赠送的会员,是否继续退费?");
|
|
|
+ }
|
|
|
+ if(activityUserMapper.getGiveVipFlag() != 0){
|
|
|
+ return BaseController.failed(HttpStatus.PARTIAL_CONTENT,"当前课程组为活动购买,退费会退还赠送的VIP课,是否继续退费?");
|
|
|
+ }
|
|
|
+ if(activityUserMapper.getGivePracticeFlag() != 0){
|
|
|
+ return BaseController.failed(HttpStatus.PARTIAL_CONTENT,"当前课程组为活动购买,退费会退还赠送的网管课,是否继续退费?");
|
|
|
+ }
|
|
|
}
|
|
|
+ activityUserMapper.setReturnFee(true);
|
|
|
Date now = new Date();
|
|
|
if(activityUserMapper.getGiveMemberFlag() == 2){
|
|
|
VipGroupActivity activity = vipGroupActivityDao.get(activityUserMapper.getActivityId());
|
|
@@ -301,6 +310,7 @@ public class GroupClassServiceImpl implements GroupClassService {
|
|
|
practiceGroupService.update(practiceGroup);
|
|
|
}
|
|
|
}
|
|
|
+ activityUserMapperDao.update(activityUserMapper);
|
|
|
}
|
|
|
return BaseController.succeed();
|
|
|
}
|