Referral or Affiliate Code tracking Module in ASP.NET

module define:

public class HttpModuleTrack : IHttpModule, IRequiresSessionState
{
        #region IHttpModule 成员
        public void Dispose()
        {
        }

        public void Init(HttpApplication context)
        {
            context.AcquireRequestState += new EventHandler(context_AcquireRequestState);
        }

        void context_AcquireRequestState(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(HttpContext.Current.Request.QueryString["a"]))
            {
                HttpContext.Current.Session["affiliateid"] = HttpContext.Current.Request.QueryString["a"]; 
            }
            if (!string.IsNullOrEmpty(HttpContext.Current.Request.QueryString["b"]))
            {
                HttpContext.Current.Session["bannerid"] = HttpContext.Current.Request.QueryString["b"];
            }
        }
        #endregion
}

web.config:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
select a.*, b.name activityName, c.name productName, c.member_max memberMax, d.status as complete, group_concat(if(e.face_value is null, "", e.face_value) separator "\n") as rewardAmount, group_concat(if(e.coupon_code is null, "", e.coupon_code ) separator "\n") as couponCode , group_concat(if(e.coupon_id is null, "", e.coupon_id) separator "\n") as caId from marketing_group_tool_group_member a left join marketing_group_tool_group_info d on a.group_id = d.id left join marketing_group_tool_activity b on a.activity_id = b.activity_id left join marketing_group_tool_product_base c on a.product_id = c.product_id left join marketing_group_tool_send_coupon_record e on (a.group_id = e.group_id and a.card_no = e.card_no) left join wx_recommend_organization organization on b.organization_id = organization.id where ((organization.tree_id between 2002000000000000 and 2002999999999999) or (organization.tree_id between 1000000000000000 and 1999999999999999) or (organization.tree_id between 2000000000000000 and 2999999999999999) or (organization.tree_id between 3000000000000000 and 3999999999999999) or (organization.tree_id between 4000000000000000 and 4999999999999999) or (organization.tree_id between 6000000000000000 and 6999999999999999) or (organization.tree_id between 5000000000000000 and 5999999999999999) or (organization.tree_id between 10000000000000000 and 10999999999999999) or (organization.tree_id between 8000000000000000 and 8999999999999999) or (organization.tree_id between 9000000000000000 and 9999999999999999) or (organization.tree_id between 11000000000000000 and 11999999999999999) or (organization.tree_id between 12000000000000000 and 12999999999999999) or (organization.tree_id between 13000000000000000 and 13999999999999999) or (organization.tree_id between 14000000000000000 and 14999999999999999) or (organization.tree_id between 15000000000000000 and 15999999999999999) or (organization.tree_id between 16000000000000000 and 16999999999999999) or (organization.tree_id between 17000000000000000 and 17999999999999999) ) and 1 = 1 group by a.id, a.activity_id , a.group_id , a.product_id , a.activity_referral_code, a.product_referral_code , a.openid , a.unionid , a.nickname , a.head_img , a.mobile , a.is_sub_buy , a.is_sub_progress , a.is_sub_success , a.sort , a.card_no , a.create_time , a.is_received_notice , a.is_received_progress , a.is_received_success , b.name, c.name, c.member_max , d.status order by a.id desc limit 0,20;
06-13

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值