protected override LotteryRD ProcessRequest(DTO.Base.APIRequest <LotteryRP> pRequest) { var rd = new LotteryRD();//返回值 var bllPrize = new LPrizesBLL(this.CurrentUserInfo); var para = pRequest.Parameters; if (para.EventId != null && para.EventId != "") { try { if (string.IsNullOrEmpty(para.ShareUserId)) { rd.ResultMsg = "该活动未分享"; return(rd); } else { rd = bllPrize.CheckIsWinnerForShareForRedis(para.ShareUserId, para.EventId, para.Type, this.CurrentUserInfo); } } catch (Exception ex) { rd.ResultMsg = ex.Message.ToString(); } } else { rd.ResultMsg = "参数EventId有误"; } return(rd); }
public void GetContact() { try { var numCount = 30; var customerIDs = CustomerBLL.Instance.GetCustomerList(); CC_Connection connection = new CC_Connection(); LoggingSessionInfo _loggingSessionInfo = new LoggingSessionInfo(); LoggingManager CurrentLoggingManager = new LoggingManager(); foreach (var customer in customerIDs) { var count = RedisOpenAPI.Instance.CCContact().GetContactLength(new CC_Contact { CustomerId = customer.Key }); if (count.Code != ResponseCode.Success) { continue; } if (count.Result <= 0) { continue; } _loggingSessionInfo.ClientID = customer.Key; CurrentLoggingManager.Connection_String = customer.Value; _loggingSessionInfo.CurrentLoggingManager = CurrentLoggingManager; var lPrizeBll = new LPrizesBLL(_loggingSessionInfo); if (count.Result < numCount) { numCount = Convert.ToInt32(count.Result); } BaseService.WriteLog("触点:" + customer.Key + "_" + customer.Value + ",数量" + numCount.ToString()); for (var i = 0; i < numCount; i++) { var response = RedisOpenAPI.Instance.CCContact().GetContact(new CC_Contact { CustomerId = customer.Key }); if (response.Code == ResponseCode.Success) { lPrizeBll.CheckIsWinnerForShareForRedis(response.Result.VipId, response.Result.EventId, response.Result.ContactType, _loggingSessionInfo); } } BaseService.WriteLog("触点结束"); } } catch (Exception ex) { BaseService.WriteLog("触点异常" + ex.Message.ToString()); } }