Beispiel #1
0
        /// <summary>
        /// 会员绑定查询品牌会员接口
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button9_Click(object sender, EventArgs e)
        {
            dt_Dyn_QueryMemberShipBinding_req req = new dt_Dyn_QueryMemberShipBinding_req();

            req.LOYALTY_BRAND = AppConfig.LOYALTY_BRAND; //忠诚度品牌
            req.SOURCE_SYSTEM = AppConfig.SOURCE_SYSTEM; //来源系统
            req.VGROUP        = AppConfig.VGROUP;        //销售组织
            req.DATA_SOURCE   = AppConfig.DATA_SOURCE;   //数据来源
            req.MOB_NUMBER    = "15222196580";

            dt_Dyn_QueryMemberShipBinding_reqITEM[] item = new dt_Dyn_QueryMemberShipBinding_reqITEM[]
            {
                //佰草集
                new dt_Dyn_QueryMemberShipBinding_reqITEM()
                {
                    DATA_SOURCE2   = "0002",
                    LOYALTY_BRAND2 = "28",
                    VGROUP2        = "C004"
                },
                //高夫
                new dt_Dyn_QueryMemberShipBinding_reqITEM()
                {
                    DATA_SOURCE2   = "0006",
                    LOYALTY_BRAND2 = "30",
                    VGROUP2        = "C003"
                }
            };
            req.BRANDLIST = item;

            dt_Dyn_QueryMemberShipBinding_res res = WebHmjApiHelp.QueryMemberShipBinding(req, true);
        }
Beispiel #2
0
        /// <summary>
        /// 会员绑定查询品牌会员接口
        /// </summary>
        /// <param name="req"></param>
        /// <returns></returns>
        public static dt_Dyn_QueryMemberShipBinding_res QueryMemberShipBinding(dt_Dyn_QueryMemberShipBinding_req req,
                                                                               bool isdebug = false)
        {
            string   reqStr    = js.Serialize(req);
            string   resStr    = string.Empty;
            DateTime?timeStart = null;
            DateTime?timeEnd   = null;
            string   isok      = "OK";

            try
            {
                timeStart = DateTime.Now;
                logger.Info("会员绑定查询品牌会员接口si_Dyn_QueryMemberShipBinding_obService请求信息:" + reqStr);
                si_Dyn_QueryMemberShipBinding_obService web = new si_Dyn_QueryMemberShipBinding_obService();

                dt_Dyn_QueryMemberShipBinding_res res = web.si_Dyn_QueryMemberShipBinding_ob(req);

                resStr  = js.Serialize(res);
                timeEnd = DateTime.Now;
                logger.Info("响应信息" + resStr + "\r\n");

                if (res == null)
                {
                    isok = "NO";
                }

                return(res);
            }
            catch (Exception ex)
            {
                resStr = ex.Message;
                isok   = "NO";
                return(null);
            }
            finally
            {
                if (!isdebug)
                {
                    datalog.DataInfo(reqStr, resStr, timeStart, timeEnd, 0, SystemCode.QueryMemberShipBinding.ToString(), isok);
                }
            }
        }
Beispiel #3
0
        /// <summary>
        /// 自己封装耗时的方法
        /// </summary>
        /// <returns></returns>
        public static Task SendTmpsByMember(List <MEMBER_EX> his)
        {
            return(Task.Run(() =>
            {
                foreach (MEMBER_EX item in his)
                {
                    dt_Dyn_QueryMemberShipBinding_req req = new dt_Dyn_QueryMemberShipBinding_req();
                    req.LOYALTY_BRAND = AppConfig.LOYALTY_BRAND; //忠诚度品牌
                    req.SOURCE_SYSTEM = AppConfig.SOURCE_SYSTEM; //来源系统
                    req.VGROUP = AppConfig.VGROUP;               //销售组织
                    req.DATA_SOURCE = AppConfig.DATA_SOURCE;     //数据来源
                    req.MOB_NUMBER = item.MEMBERNO;

                    dt_Dyn_QueryMemberShipBinding_reqITEM[] items = new dt_Dyn_QueryMemberShipBinding_reqITEM[]
                    {
                        //佰草集
                        new dt_Dyn_QueryMemberShipBinding_reqITEM()
                        {
                            DATA_SOURCE2 = "0002",
                            LOYALTY_BRAND2 = "28",
                            VGROUP2 = "C004"
                        },
                        //高夫
                        new dt_Dyn_QueryMemberShipBinding_reqITEM()
                        {
                            DATA_SOURCE2 = "0006",
                            LOYALTY_BRAND2 = "30",
                            VGROUP2 = "C003"
                        }
                    };
                    req.BRANDLIST = items;

                    dt_Dyn_QueryMemberShipBinding_res res = WebHmjApiHelp.QueryMemberShipBinding(req);

                    bool isbingd = false;

                    if (res != null && res.ZRETURN == "Y")
                    {
                        foreach (dt_Dyn_QueryMemberShipBinding_resITEM model in res.BRANDLIST)
                        {
                            if (model.IF_BINDING == "0")
                            {
                                isbingd = true;
                            }
                        }
                    }

                    //发送模板
                    if (isbingd)
                    {
                        dt_Dyn_DispMemQuick_req w = new dt_Dyn_DispMemQuick_req();
                        w.DATA_SOURCE = AppConfig.DATA_SOURCE;
                        w.LOYALTY_BRAND = AppConfig.LOYALTY_BRAND; //忠诚度品牌
                        w.SOURCE_SYSTEM = AppConfig.SOURCE_SYSTEM; //来源系统
                        w.VGROUP = AppConfig.VGROUP;               //销售组织
                        w.ACCOUNT_ID = item.MEMBERNO;              //2002652891
                        dt_Dyn_DispMemQuick_res dt = WebHmjApiHelp.DispMemQuick(w);

                        dt_Dyn_DispMemQuick_resITEM newmeber = new dt_Dyn_DispMemQuick_resITEM();

                        if (dt.I_ZCRMT316 != null || dt.I_ZCRMT316.Length > 0)
                        {
                            newmeber = dt.I_ZCRMT316[0];
                        }

                        var openid = item.OPENID;
                        var tempId = "6D5qBE3AxWyGeiAcMmK_NDMtiCbIDq79Ap98gZ358IQ";
                        var redirect_url = AppConfig.HmjWebApp + "assets/hmjweixin/html/hytq.html";
                        var p1 = "恭喜您成为华美家会员,您有以下权益可领取!";
                        var p2 = Utility.GetMemberLvl(newmeber.ZTIER);
                        var p3 = "升级至等级" + Utility.GetMemberLvl(newmeber.ZTIER);// + "会员";  20180417注释,因为Utility.GetMemberLvl(newmeber.ZTIER)已含会员两字
                        var p4 = DateTime.Now.ToString("yyyy年MM月dd日");
                        var p5 = "转换品牌积分至华美家,即可享受权益。如不转换,可能会影响您的积分正常使用。了解更多会员权益,点击查看>";

                        mymember.SendTmpPublicFunc(true, openid, tempId, redirect_url, p1, p2, p3, p4, p5);
                    }
                }
            }));
        }