//A---->B---->C
        //1,C报名支付后,B获取500, A获取200
        public async Task ScoreRule(Enroll enroll, Member member, bool bIsPaid, bool bIsSaveToDb = true)//C
        {
            if (member == null)
            {
                return;
            }

            MemberHelper memberHelper = new MemberHelper();

            Member referee = null;

            if (member.RefereeId > 0)
            {
                referee = await memberHelper.GetByIdAsync(member.RefereeId, false);//B
            }
            if (referee == null)
            {
                return;
            }

            if (enroll.RefereeId != referee.Id)
            {
                return;
            }

            //B获取500
            await memberHelper.AddScore(referee, SystemConfigModel.Instance.RefereeScore, SystemConfigModel.Instance.RefereeScoreDescription, bIsPaid, bIsSaveToDb);

            Member parent = null;

            if (referee.RefereeId > 0)
            {
                parent = await memberHelper.GetByIdAsync(referee.RefereeId);//A
            }

            if (parent == null)
            {
                return;
            }
            //A获取200
            await memberHelper.AddScore(parent, SystemConfigModel.Instance.ParentRefereeScore, SystemConfigModel.Instance.ParentRefereeScoreDescription, bIsPaid, bIsSaveToDb);
        }
        public async Task SetPayStatus(Enroll model)
        {
            Enroll enroll = await GetEnroll(model.Id, false);

            if (enroll == null || enroll.Status == model.Status)
            {
                return;
            }
            MemberHelper memberHelper = new MemberHelper();
            Member       member       = await memberHelper.GetByIdAsync(model.MemberId);

            await SetPayStatus(enroll, member, model.Status, model.PayType);
        }