public ActionResult GetLuckyTicketLogList()
        {
            GetCampaign_LuckyTicketLogListByMemberArgs args = RequestArgs <GetCampaign_LuckyTicketLogListByMemberArgs>();

            if (args == null)
            {
                return(RespondResult(false, "参数无效。"));
            }

            args.MemberId = MemberContext.Member.Id;
            args.DomainId = DomainContext.Domain.Id;
            args.AppId    = DomainContext.AppId;

            GetItemListResult result = _campaignManager.LuckyTicket.GetMemberLuckyTicketLogList(args);

            //为自己生成一个
            if (result.Page == 1 && result.TotalCount == 0)
            {
                Campaign_LuckyTicketLogEntity createLuckyTicketLogArgs = new Campaign_LuckyTicketLogEntity();
                createLuckyTicketLogArgs.CampaignId = args.CampaignId;
                createLuckyTicketLogArgs.Domain     = DomainContext.Domain.Id;
                createLuckyTicketLogArgs.Member     = MemberContext.Member.Id;
                createLuckyTicketLogArgs.FromOpenId = MemberContext.Member.OpenId;
                _campaignManager.LuckyTicket.CreateLuckyTicketLog(createLuckyTicketLogArgs);
                result = _campaignManager.LuckyTicket.GetMemberLuckyTicketLogList(args);
            }

            return(RespondDataResult(result));
        }
        /// <summary>
        /// 获取指定会员的号码列表
        /// </summary>
        /// <param name="args"></param>
        /// <returns></returns>
        public GetItemListResult GetMemberLuckyTicketLogList(GetCampaign_LuckyTicketLogListByMemberArgs args)
        {
            List <CommandParameter> parameterList = new List <CommandParameter>();

            parameterList.Add(new CommandParameter("@page", args.Page));
            parameterList.Add(new CommandParameter("@pageSize", args.PageSize));
            parameterList.Add(new CommandParameter("@campaignId", args.CampaignId));
            parameterList.Add(new CommandParameter("@memberId", args.MemberId));

            DataSet dsResult =
                _campaignManager.DataBase.ExecuteDataSet(CommandType.StoredProcedure, "GetCampaign_LuckyTicketLogListByMember",
                                                         parameterList, new string[] { "result" });

            if (dsResult.Tables[0].Rows.Count == 0 && args.Page > 1)
            {
                args.Page--;
                return(GetMemberLuckyTicketLogList(args));
            }

            GetItemListResult result = new GetItemListResult();

            result.ItemList = dsResult.Tables[0];

            int totalCount = int.Parse(dsResult.Tables[1].Rows[0][0].ToString());

            result.TotalCount = totalCount;
            result.TotalPage  = totalCount / args.PageSize;
            if (totalCount % args.PageSize > 0)
            {
                result.TotalPage++;
            }
            result.Page = args.Page;

            return(result);
        }