コード例 #1
0
        public string BettAutoInsert()
        {
            var    list = LotteryOrderBusiness.GetBettAutoByStatus();
            string msg  = "";

            list.ForEach(x =>
            {
                string errmsg = "";

                var issuenum = GetIssueNum(x.ComNum - 1, x.JsonContent);
                issuenum     = string.IsNullOrEmpty(issuenum) ? "0" : issuenum;
                var lottery  = LotteryResultBusiness.GetLotteryResult(x.CPCode, "1,2", "desc");
                if (IsEquelNum(x.CPCode, lottery.IssueNum, issuenum))
                {
                    var totalmuch = GetIssueNum(x.ComNum, x.JsonContent, 1);
                    var pMuch     = string.IsNullOrEmpty(totalmuch) ? x.BMuch : Convert.ToInt32(totalmuch);
                    int comnum    = x.ComNum + 1;
                    try
                    {
                        if (!string.IsNullOrEmpty(issuenum))
                        {
                            LotteryOrderBusiness.CreateLotteryOrder(x.BCode + comnum, issuenum, x.Type, x.TypeName, x.CPCode,
                                                                    x.CPName,
                                                                    x.Content, x.Num, x.PayFee * pMuch / x.PMuch, x.UserID, pMuch, x.RPoint, x.IP, 0, 5, x.BCode, x.ModelName, x.MType,
                                                                    ref errmsg);
                            if (!string.IsNullOrEmpty(errmsg))
                            {
                                errmsg = issuenum + ":" + errmsg + ";";
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        errmsg = x.BCode + "第" + comnum + "期插入失败";

                        // L.Log("[BettAutoInsert] ", x.BCode + "第" + comnum + "期插入失败");
                    }
                    msg += errmsg;
                    LotteryOrderBusiness.UpdateBettAutoByCode(x.BCode, comnum, pMuch * x.PayFee, errmsg);
                }
            });
            return(msg);
        }
コード例 #2
0
 public bool UpdByStatusAndOpenTime(string cpcode, string opentime)
 {
     return(LotteryResultBusiness.UpdateByStatusAndOpentTime(cpcode, opentime));
 }
コード例 #3
0
        public bool OpenSysLotteryResult(string issnum, string cpcode)
        {
            var s = LotteryResultBusiness.UpdateSysLotteryResult(issnum, cpcode, 0);

            return(s);
        }
コード例 #4
0
 public void CheckSysLottery()
 {
     LotteryResultBusiness.CheckSysLottery();
 }
コード例 #5
0
        public bool OpenLotteryResult(string result, string issnum, string cpcode)
        {
            var s = LotteryResultBusiness.UpdateSD11X5Result(result, issnum, cpcode);

            return(s);
        }
コード例 #6
0
 public void InsertAllLottery()
 {
     LotteryResultBusiness.InsertAllLottery();
 }