|  | @@ -15,6 +15,7 @@ import com.ym.mec.common.service.impl.BaseServiceImpl;
 | 
	
		
			
				|  |  |  import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  | +import org.springframework.transaction.annotation.Transactional;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import java.util.ArrayList;
 | 
	
		
			
				|  |  |  import java.util.List;
 | 
	
	
		
			
				|  | @@ -86,6 +87,7 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	@Override
 | 
	
		
			
				|  |  | +	@Transactional(rollbackFor = Exception.class)
 | 
	
		
			
				|  |  |  	public void updateVipGroupActivity(VipGroupActivityAddDto vipGroupActivityAddDto, Integer operatorId) {
 | 
	
		
			
				|  |  |  		VipGroupActivity oldVipGroupActivity = vipGroupActivityDao.get(vipGroupActivityAddDto.getId());
 | 
	
		
			
				|  |  |  		if(Objects.isNull(oldVipGroupActivity)){
 | 
	
	
		
			
				|  | @@ -94,6 +96,47 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
 | 
	
		
			
				|  |  |  		if(Objects.isNull(vipGroupActivityAddDto.getOrganId())){
 | 
	
		
			
				|  |  |  			throw new BizException("请指定部门!");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		if(Objects.nonNull(vipGroupActivityAddDto.getVipGroupSalarySettlement().getOnlineSalarySettlement())){
 | 
	
		
			
				|  |  | +			switch (vipGroupActivityAddDto.getVipGroupSalarySettlement().getOnlineSalarySettlement().getSalarySettlementType()){
 | 
	
		
			
				|  |  | +				case TEACHER_DEFAULT:
 | 
	
		
			
				|  |  | +					vipGroupActivityAddDto.getVipGroupSalarySettlement().getOnlineSalarySettlement().setSettlementValue(null);
 | 
	
		
			
				|  |  | +					break;
 | 
	
		
			
				|  |  | +				case RATIO_DISCOUNT:
 | 
	
		
			
				|  |  | +					if(Objects.isNull(vipGroupActivityAddDto.getVipGroupSalarySettlement().getOnlineSalarySettlement().getSettlementValue())){
 | 
	
		
			
				|  |  | +						throw new BizException("请指定线下课单价折算比例");
 | 
	
		
			
				|  |  | +					}
 | 
	
		
			
				|  |  | +					break;
 | 
	
		
			
				|  |  | +				case FIXED_SALARY:
 | 
	
		
			
				|  |  | +					if(Objects.isNull(vipGroupActivityAddDto.getVipGroupSalarySettlement().getOnlineSalarySettlement().getSettlementValue())){
 | 
	
		
			
				|  |  | +						throw new BizException("请指定线下课固定课酬");
 | 
	
		
			
				|  |  | +					}
 | 
	
		
			
				|  |  | +					break;
 | 
	
		
			
				|  |  | +				default:
 | 
	
		
			
				|  |  | +					throw new BizException("未指定课酬结算标准!");
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		if(Objects.nonNull(vipGroupActivityAddDto.getVipGroupSalarySettlement().getOfflineSalarySettlement())){
 | 
	
		
			
				|  |  | +			switch (vipGroupActivityAddDto.getVipGroupSalarySettlement().getOfflineSalarySettlement().getSalarySettlementType()){
 | 
	
		
			
				|  |  | +				case TEACHER_DEFAULT:
 | 
	
		
			
				|  |  | +					vipGroupActivityAddDto.getVipGroupSalarySettlement().getOfflineSalarySettlement().setSettlementValue(null);
 | 
	
		
			
				|  |  | +					break;
 | 
	
		
			
				|  |  | +				case RATIO_DISCOUNT:
 | 
	
		
			
				|  |  | +					if(Objects.isNull(vipGroupActivityAddDto.getVipGroupSalarySettlement().getOfflineSalarySettlement().getSettlementValue())){
 | 
	
		
			
				|  |  | +						throw new BizException("请指定线线上课单价折算比例");
 | 
	
		
			
				|  |  | +					}
 | 
	
		
			
				|  |  | +					break;
 | 
	
		
			
				|  |  | +				case FIXED_SALARY:
 | 
	
		
			
				|  |  | +					if(Objects.isNull(vipGroupActivityAddDto.getVipGroupSalarySettlement().getOfflineSalarySettlement().getSettlementValue())){
 | 
	
		
			
				|  |  | +						throw new BizException("请指定线上课固定课酬");
 | 
	
		
			
				|  |  | +					}
 | 
	
		
			
				|  |  | +					break;
 | 
	
		
			
				|  |  | +				default:
 | 
	
		
			
				|  |  | +					throw new BizException("未指定课酬结算标准!");
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  		vipGroupActivityAddDto.setSalarySettlementJson(JSON.toJSONString(vipGroupActivityAddDto.getVipGroupSalarySettlement()));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		super.update(vipGroupActivityAddDto);
 |