/// <summary> /// 团长订单的订单来源类型和订单来源值处理 /// </summary> /// <param name="teamDetailList"></param> /// <returns></returns> public bool UpdateTeamHeadSource(IList <TeamDetailEntity> teamDetailList) { //LogHelper.Info("--------TeamPayAfter----开始Source:"); OrderInfoSourceEntity orderInfoSource = null; //LogHelper.Info("--------TeamPayAfter----开始Source:teamDetailList=" + teamDetailList); foreach (TeamDetailEntity teamDetail in teamDetailList) { /// 判断是团长 if (teamDetail.UserId == teamDetail.TeamHead) { /// 团长订单的订单来源类型和订单来源值不为空 if (teamDetail.OrderSourceType != 0 && !string.IsNullOrEmpty(teamDetail.OrderSourceValue)) { orderInfoSource = new OrderInfoSourceEntity(); orderInfoSource.TeamCode = teamDetail.TeamCode; orderInfoSource.OrderSourceType = teamDetail.OrderSourceType; orderInfoSource.OrderSourceValue = teamDetail.OrderSourceValue; orderInfoSource.DividedAmount = teamDetail.DividedAmount; orderInfoSource.DividedPercent = teamDetail.DividedPercent; } } } //LogHelper.Info("--------TeamPayAfter----开始Source:orderInfoSource=" + orderInfoSource); /// 订单来源值对象为空 if (orderInfoSource == null) { return(false); } //LogHelper.Info("--------TeamPayAfter----开始团成员订单订单来源相关值的更新:teamDetailList=" + teamDetailList); foreach (TeamDetailEntity teamDetail in teamDetailList) { /// 判断是团员 if (teamDetail.UserId != teamDetail.TeamHead) { /// 团成员订单订单来源相关值的更新 buyOrderManager.TeamMemberOrderUpdatePayOK(orderInfoSource); } } return(true); }