예제 #1
0
        /// 消费优惠券
        public static ConsumeWxCouponResult consumeCoupon(string ip, string companyCode, string couponflag, out string errorDesc)
        {
            var json = new JavaScriptSerializer().Serialize(new
            {
                operationType = "consumeCoupon",
                companyCode   = companyCode,
                couponflag    = couponflag
            });

            return(HttpCon <ConsumeWxCouponResult> .run_json(ip, json, out errorDesc));
        }
예제 #2
0
        //查询某店铺
        public static Customer queryCustomer(string ip, string companyCode, out string errorDesc)
        {
            string json = new JavaScriptSerializer().Serialize(new
            {
                operationType = "queryCompany",
                companyCode   = companyCode
            });

            var jsresut = HttpCon <Customer> .run_json(ip, json, out errorDesc);

            return(jsresut);
        }
예제 #3
0
        /// 发放 多人、多种、多数量  优惠券
        public static bool extendMultiCoupon(string ip, string companyCode, List <int> couponids, List <string> openids, List <int> numbers, out string errorDesc)
        {
            var json = new JavaScriptSerializer().Serialize(new
            {
                operationType = "extendMultiCoupon",
                openid        = new JavaScriptSerializer().Serialize(openids),
                couponid      = new JavaScriptSerializer().Serialize(couponids),
                number        = new JavaScriptSerializer().Serialize(numbers),
                companyCode   = companyCode
            });

            return(HttpCon <bool> .run_json_for_succes(ip, json, out errorDesc));
        }
예제 #4
0
        /// 发放优惠券
        public static bool extendCoupon(string ip, string companyCode, string isBatch, int couponid, string openid, out string errorDesc)
        {
            var json = new JavaScriptSerializer().Serialize(new
            {
                operationType = "extendCoupon",
                openid        = openid,
                couponid      = couponid,
                isBatch       = isBatch,
                companyCode   = companyCode
            });

            return(HttpCon <bool> .run_json_for_succes(ip, json, out errorDesc));
        }
예제 #5
0
        /// 查询某店某用户的优惠券记录,包括使用和未使用的
        public static ShopUserCoupontResult queryCouponByUser(string ip, string companyCode, string openid, out string errorDesc)
        {
            string json = new JavaScriptSerializer().Serialize(new
            {
                operationType = "queryCouponByUser",
                openid        = openid,
                companyCode   = companyCode
            });

            var jsonResult = HttpCon <ShopUserCoupontResult> .run_json(ip, json, out errorDesc);

            return(jsonResult);
        }
예제 #6
0
        //查询指定时间范围内的优惠券使用记录
        public static List <userCoupon> queryCouponRecords(string ip, string companyCode, string openid, string startTime, string endTime, out string errorDesc)
        {
            var json = new JavaScriptSerializer().Serialize(new
            {
                operationType = "queryCouponRecords",
                companyCode   = companyCode,
                openid        = openid,
                startTime     = startTime,
                endTime       = endTime
            });

            return(HttpCon <List <userCoupon> > .run_json(ip, json, out errorDesc));
        }
예제 #7
0
        //查询多个店的业绩
        public static List <ShopYeJi> queryYeJi(string ip, List <string> companyCodes, string date, string dateType, out string errorDesc)
        {
            string json = new JavaScriptSerializer().Serialize(new
            {
                operationType = "queryMultiData",
                table         = "account",
                companyCode   = new JavaScriptSerializer().Serialize(companyCodes),
                dateType      = dateType,
                date          = date
            });

            var jsresut = HttpCon <List <ShopYeJi> > .run_json(ip, json, out errorDesc);

            return(jsresut);
        }
예제 #8
0
        /// 查找门店优惠券
        public static List <ShopCoupon> queryCouponByCompany(string ip, string companyCode, out string errorDesc)
        {
            string json = new JavaScriptSerializer().Serialize(new
            {
                operationType = "queryCouponByCompany",
                companyCode   = companyCode
            });

            var jsonResult = HttpCon <ShopCouponResult> .run_json(ip, json, out errorDesc);

            if (jsonResult == null)
            {
                return(null);
            }
            return(jsonResult.couponStatList);
        }
예제 #9
0
        //查询店铺的微信客户反馈
        public static List <WxFeedback> queryCommentByCompany(string ip, string companyCode, out string errorDesc)
        {
            string json = new JavaScriptSerializer().Serialize(new
            {
                operationType = "queryCommentByCompany",
                companyCode   = companyCode
            });

            var feedback = HttpCon <WxFeedBackResult> .run_json(ip, json, out errorDesc);

            if (feedback == null)
            {
                return(null);
            }

            return(feedback.commentList);
        }
예제 #10
0
        //公司注册
        public static bool registerCompany(string ip, string companyCode, string companyName, string companyTel, string companyAddr, out string errorDesc)
        {
            string json = new JavaScriptSerializer().Serialize(new
            {
                data = new JavaScriptSerializer().Serialize(new
                {
                    companyName = companyName,
                    companyTel  = companyTel,
                    companyAdd  = companyAddr
                                  //registerDate = "2014-05-01",
                                  //dueDate = "2014-05-08"
                }),
                operationType = "registerCompany",
                companyCode   = companyCode
            });

            return(HttpCon <bool> .run_json_for_succes(ip, json, out errorDesc));
        }
예제 #11
0
        public static List <WxUser> queryWxUser(string ip, string nickName, string companyCode, out string errorDesc)
        {
            string json = new JavaScriptSerializer().Serialize(new
            {
                operationType = "queryWxUser",
                nickName      = nickName,
                companyCode   = companyCode
            });

            var jsonResult = HttpCon <WxUserResult> .run_json(ip, json, out errorDesc);

            if (jsonResult == null)
            {
                return(null);
            }

            return(jsonResult.wxUserList);
        }
예제 #12
0
        //上传优惠券
        public static bool uploadCoupon(string ip, int id, string companyCode, double value, string descp, string title, string isDeleted, out string errorDesc)
        {
            var json = new JavaScriptSerializer().Serialize(new
            {
                operationType = "upLoadCoupon",
                data          = new JavaScriptSerializer().Serialize(new
                {
                    id        = id,
                    value     = value,
                    descp     = descp,
                    title     = title,
                    isDeleted = isDeleted
                }),
                companyCode = companyCode
            });

            return(HttpCon <bool> .run_json_for_succes(ip, json, out errorDesc));
        }