Esempio n. 1
0
        public ResultMessage <IList <PlanInfo> > PlanList(int sid)
        {
            string msg;

            try
            {
                var result = _lotteryServer.GetPlanList(sid, out msg);
                return(result == null ? new ResultMessage <IList <PlanInfo> >(ResultCode.Fail, msg)
                    : new ResultMessage <IList <PlanInfo> >(result));
            }
            catch (Exception e)
            {
                return(new ResultMessage <IList <PlanInfo> >(ResultCode.Fail, e.Message));
            }
        }
Esempio n. 2
0
        private string GetLotteryPlanByCode(WechatMsg wechatMsg)
        {
            var    respMsg  = new StringBuilder(wechatMsg.ResponseMsg + ":\r\n");
            string msg      = "";
            var    planList = lotteryServer.GetPlanList((int)wechatMsg.Sid, out msg);

            var count = 1;

            LogHelper.Logger.Info("取到的计划:" + planList.Count);
            if (planList.Count > 0)
            {
                foreach (var plan in planList)
                {
                    respMsg.Append(plan.PlanName + ":\r\n" + plan.PlanUrl + "\r\n");
                    count++;
                }
            }
            else
            {
                respMsg.Append("计划库中还没有存在该类型的计划");
            }
            return(respMsg.ToString());
        }