//protected string SendQrCodeWxMessage(string pRequest) //{ // var rp = pRequest.DeserializeJSONTo<APIRequest<SendQrCodeWxMessageRP>>(); // if (rp.CustomerID == null || string.IsNullOrEmpty(rp.CustomerID)) // { // throw new APIException("缺少参数【CustomerID】或参数值为空") { ErrorCode = 121 }; // } // if (rp.OpenID == null || string.IsNullOrEmpty(rp.OpenID)) // { // throw new APIException("缺少参数【OpenID】或参数值为空") { ErrorCode = 122 }; // } // if (rp.UserID == null || string.IsNullOrEmpty(rp.UserID)) // { // throw new APIException("缺少参数【UserID】或参数值为空") { ErrorCode = 123 }; // } // if (rp.Parameters.QrCodeId == null || string.IsNullOrEmpty(rp.Parameters.QrCodeId)) // { // throw new APIException("缺少参数【QrCodeId】或参数值为空") { ErrorCode = 124 }; // } // var loggingSessionInfo = Default.GetBSLoggingSession(rp.CustomerID, "1"); // var eventsBll = new LEventsBLL(loggingSessionInfo); // var qrCodeBll = new WQRCodeManagerBLL(loggingSessionInfo); // var qrCodeEntity = qrCodeBll.QueryByEntity(new WQRCodeManagerEntity() // { // CustomerId = rp.CustomerID, // QRCode = rp.Parameters.QrCodeId // }, null).FirstOrDefault(); // if (qrCodeEntity != null) // { // var wapplicationBll = new WApplicationInterfaceBLL(loggingSessionInfo); // var wappEntity = wapplicationBll.QueryByEntity(new WApplicationInterfaceEntity() // { // CustomerId = rp.CustomerID // }, null).FirstOrDefault(); // var weixinId = ""; // if (wappEntity != null) // { // weixinId = wappEntity.WeiXinID; // } // if (weixinId != "") // { // eventsBll.QrCodeHandlerText(qrCodeEntity.QRCodeId.ToString(), loggingSessionInfo, // weixinId, 4, rp.OpenID, base.httpContext); // } // } // var rd = new EmptyResponseData(); // var rsp = new SuccessResponse<IAPIResponseData>(rd); // return rsp.ToJSON(); //} #region 获取红包列表 public string GetEventUserPrizeList(string pRequest) { var rp = pRequest.DeserializeJSONTo <APIRequest <GetEventUserPrizeListRP> >(); var rd = new GetEventUserPirzeListRD(); if (rp.Parameters.EventId == "" || string.IsNullOrEmpty(rp.Parameters.EventId)) { throw new APIException("活动标识不能为空") { ErrorCode = 121 }; } if (rp.UserID == "" || string.IsNullOrEmpty(rp.UserID)) { throw new APIException("会员标识不能为空") { ErrorCode = 121 }; } if (rp.CustomerID == "" || string.IsNullOrEmpty(rp.CustomerID)) { throw new APIException("客户标识不能为空") { ErrorCode = 121 }; } var loggingSessionInfo = Default.GetBSLoggingSession(rp.CustomerID, "1"); LPrizePoolsBLL poolsServer = new LPrizePoolsBLL(loggingSessionInfo); var ds = poolsServer.GetUserPrizeWinnerLog(rp.Parameters.EventId, rp.UserID); if (ds.Tables[0].Rows.Count > 0) { var temp = ds.Tables[0].AsEnumerable().Select(t => new GetEventUserPrizeListInfo() { PrizeDesc = t["PrizeDesc"].ToString(), CreateTime = t["CreateTime"].ToString() }); rd.GetEventUserPirzeList = temp.ToArray(); } var rsp = new SuccessResponse <IAPIResponseData>(rd); return(rsp.ToJSON()); }