Пример #1
0
        /// <summary>
        /// 判断当前期在数据库是否已经存在
        /// </summary>
        /// <param name="issueNo"></param>
        /// <returns></returns>
        private static bool Exists(long issueNo, string lotteryCode, string dataSource)
        {
            string     sql = $"select * from open_result where issue_number = {issueNo} and lottery_code = '{lotteryCode}' and data_source = '{dataSource}'";
            OpenResult o   = MysqlHelper.GetOne <OpenResult>(sql);

            return(o != null && o.id > 0);
        }
Пример #2
0
        private static bool Exist(string lotteryCode)
        {
            string sql = $"select * from lottery where code = '{lotteryCode}'";

            return(MysqlHelper.GetOne <OpenResult>(sql) != null);
        }
Пример #3
0
        /// <summary>
        /// 根据id获取日志信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static AppLog GetLogById(string id)
        {
            string sql = $"select log_message from app_log where id = {id}";

            return(MysqlHelper.GetOne <AppLog>(sql));
        }