using System.Collections.Generic;
using Library;

namespace AppConfig
{
    public class Base
    {
        public static string SqlConn = Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString();
        public static string SpSqlConn = Library.ConfigurationManager.AppSettings["SpSqlConnStr"].ToString();
        public static string StatSqlConn = Library.ConfigurationManager.AppSettings["StatSqlConnStr"].ToString();
        public static string ProfitSqlConn = Library.ConfigurationManager.AppSettings["ProfitSqlConnStr"].ToString();

        //交易统计表
        public static string CreateTradeDaySummary = "SET NAMES utf8mb4;" +
                                                    "SET FOREIGN_KEY_CHECKS = 0;" +
                                                    "CREATE TABLE `TradeDaySummary#DateTime#` (" +
                                                    "`Id` int(11) NOT NULL AUTO_INCREMENT," +
                                                    "`Sort` int(11) NOT NULL DEFAULT '0'," +
                                                    "`QueryCount` int(11) NOT NULL DEFAULT '0'," +
                                                    "`Status` int(11) NOT NULL DEFAULT '0'," +
                                                    "`Version` int(11) NOT NULL DEFAULT '0'," +
                                                    "`CreateDate` datetime DEFAULT NULL," +
                                                    "`UpdateDate` datetime DEFAULT NULL," +
                                                    "`CreateMan` varchar(50) DEFAULT NULL," +
                                                    "`UpdateMan` varchar(50) DEFAULT NULL," +
                                                    "`SeoTitle` varchar(100) DEFAULT NULL," +
                                                    "`SeoKeyword` varchar(200) DEFAULT NULL," +
                                                    "`SeoDescription` varchar(500) DEFAULT NULL," +
                                                    "`TopUserId` int(11) NOT NULL DEFAULT '0'," +
                                                    "`HelpNonDirectNonQrDebitTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`HelpDirectNonQrDebitTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`HelpNonDirectQrDebitTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`HelpDirectQrDebitTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`HelpNonDirectDebitCapNum` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`HelpNonDirectDebitCapTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`HelpNonDirectDebitTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`HelpDirectDebitCapNum` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`HelpDirectDebitCapTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`HelpDirectDebitTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`HelpNonDirectNonQrCreditTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`HelpDirectNonQrCreditTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`HelpNonDirectQrCreditTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`HelpDirectQrCreditTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`HelpNonDirectCreditTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`HelpDirectCreditTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`HelpNonDirectTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`HelpDirectTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`NotHelpNonDirectNonQrDebitTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`NotHelpDirectNonQrDebitTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`NotHelpNonDirectQrDebitTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`NotHelpDirectQrDebitTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`NotHelpNonDirectDebitCapNum` int(11) NOT NULL DEFAULT '0'," +
                                                    "`NotHelpNonDirectDebitCapTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`NotHelpNonDirectDebitTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`NotHelpDirectDebitCapNum` int(11) NOT NULL DEFAULT '0'," +
                                                    "`NotHelpDirectDebitCapTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`NotHelpDirectDebitTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`NotHelpNonDirectNonQrCreditTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`NotHelpDirectNonQrCreditTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`NotHelpNonDirectQrCreditTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`NotHelpDirectQrCreditTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`NotHelpNonDirectCreditTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`NotHelpDirectCreditTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`NotHelpNonDirectTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`NotHelpDirectTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`MgrName` varchar(32) DEFAULT NULL," +
                                                    "`MgrNo` varchar(16) DEFAULT NULL," +
                                                    "`BrandId` int(11) NOT NULL DEFAULT '0'," +
                                                    "`TradeMonth` varchar(6) DEFAULT NULL," +
                                                    "`TradeDate` varchar(8) DEFAULT NULL," +
                                                    "`UserId` int(11) NOT NULL DEFAULT '0'," +
                                                    "`PayType` int(11) NOT NULL DEFAULT '0'," +
                                                    "`VipFlag` int(11) NOT NULL DEFAULT '0'," +
                                                    "`ProfitNonDirectNonQrDebitTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`ProfitDirectNonQrDebitTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`ProfitNonDirectQrDebitTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`ProfitDirectQrDebitTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`ProfitNonDirectDebitCapNum` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`ProfitNonDirectDebitCapTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`ProfitNonDirectDebitTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`ProfitDirectDebitCapNum` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`ProfitDirectDebitCapTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`ProfitDirectDebitTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`ProfitNonDirectNonQrCreditTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`ProfitDirectNonQrCreditTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`ProfitNonDirectQrCreditTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`ProfitDirectQrCreditTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`ProfitNonDirectCreditTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`ProfitDirectCreditTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`ProfitNonDirectTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`ProfitDirectTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "PRIMARY KEY (`Id`) USING BTREE," +
                                                    "KEY `TradeDaySummaryIndex` (`UserId`,`BrandId`,`QueryCount`,`VipFlag`,`PayType`,`SeoTitle`)" +
                                                    ") ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;" +
                                                    "SET FOREIGN_KEY_CHECKS = 1;";

        //交易记录表
        public static string CreateTradeRecord = "CREATE TABLE `TradeRecord#DateTime#` (" +
                                                "`Id` int(11) NOT NULL AUTO_INCREMENT," +
                                                "`Sort` int(11) NOT NULL DEFAULT '0'," +
                                                "`QueryCount` int(11) NOT NULL DEFAULT '0'," +
                                                "`Status` int(11) NOT NULL DEFAULT '0'," +
                                                "`Version` int(11) NOT NULL DEFAULT '0'," +
                                                "`CreateDate` datetime DEFAULT NULL," +
                                                "`UpdateDate` datetime DEFAULT NULL," +
                                                "`CreateMan` varchar(50) DEFAULT NULL," +
                                                "`UpdateMan` varchar(50) DEFAULT NULL," +
                                                "`SeoTitle` varchar(100) DEFAULT NULL," +
                                                "`SeoKeyword` varchar(200) DEFAULT NULL," +
                                                "`SeoDescription` varchar(500) DEFAULT NULL," +
                                                "`MerUserId` int(11) NOT NULL DEFAULT '0'," +
                                                "`TopUserId` int(11) NOT NULL DEFAULT '0'," +
                                                "`Remark` varchar(64) DEFAULT NULL," +
                                                "`BrandId` int(11) NOT NULL DEFAULT '0'," +
                                                "`DirectFlag` bit(1) NOT NULL DEFAULT b'0'," +
                                                "`CapFlag` int(11) NOT NULL DEFAULT '0'," +
                                                "`QrPayFlag` int(11) NOT NULL DEFAULT '0'," +
                                                "`BankCardType` int(11) NOT NULL DEFAULT '0'," +
                                                "`TradeAmount` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                "`TradeSerialNo` varchar(48) DEFAULT NULL," +
                                                "`ClearDate` datetime DEFAULT NULL," +
                                                "`TradeDate` datetime DEFAULT NULL," +
                                                "`SnNo` varchar(32) DEFAULT NULL," +
                                                "`MerBuddyType` int(11) NOT NULL DEFAULT '0'," +
                                                "`HelpMonthCount` int(11) NOT NULL DEFAULT '0'," +
                                                "`MerHelpFlag` bit(1) NOT NULL DEFAULT b'0'," +
                                                "`MerNo` varchar(32) DEFAULT NULL," +
                                                "`MerchantId` int(11) NOT NULL DEFAULT '0'," +
                                                "`UserId` int(11) NOT NULL DEFAULT '0'," +
                                                "`RecordNo` varchar(50) DEFAULT NULL," +
                                                "`ParentNav` mediumtext," +
                                                "`PayType` int(11) NOT NULL DEFAULT '0'," +
                                                "`VipFlag` int(11) NOT NULL DEFAULT '0'," +
                                                "`ActStatus` int(11) NOT NULL DEFAULT '0'," +
                                                "PRIMARY KEY (`Id`)," +
                                                "KEY `TradeRecordIndex` (`BrandId`,`UserId`,`MerchantId`,`MerNo`,`SnNo`,`CreateDate`)" +
                                                ") ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;";

        //商户交易额统计
        public static string CreatePosMerchantTradeSummay = "CREATE TABLE `PosMerchantTradeSummay#DateTime#` (" +
                                                            "`Id` int(11) NOT NULL AUTO_INCREMENT," +
                                                            "`Sort` int(11) NOT NULL DEFAULT '0'," +
                                                            "`QueryCount` int(11) NOT NULL DEFAULT '0'," +
                                                            "`Status` int(11) NOT NULL DEFAULT '0'," +
                                                            "`CreateDate` datetime DEFAULT NULL," +
                                                            "`UpdateDate` datetime DEFAULT NULL," +
                                                            "`SeoTitle` varchar(100) DEFAULT NULL," +
                                                            "`SeoKeyword` varchar(200) DEFAULT NULL," +
                                                            "`SeoDescription` varchar(500) DEFAULT NULL," +
                                                            "`BrandId` int(11) NOT NULL DEFAULT '0'," +
                                                            "`TradeAmount` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                            "`TradeDate` varchar(8) DEFAULT NULL," +
                                                            "`TradeMonth` varchar(6) DEFAULT NULL," +
                                                            "`MerchantId` int(11) NOT NULL DEFAULT '0'," +
                                                            "PRIMARY KEY (`Id`)," +
                                                            "KEY `PosMerchantTradeSummayIndex` (`MerchantId`,`BrandId`)" +
                                                            ") ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;";

        //收支明细
        public static string CreateUserAccountRecord = "CREATE TABLE `UserAccountRecord#DateTime#` (" +
                                                        "`Id` int(11) NOT NULL AUTO_INCREMENT," +
                                                        "`Sort` int(11) NOT NULL DEFAULT '0'," +
                                                        "`QueryCount` int(11) NOT NULL DEFAULT '0'," +
                                                        "`Status` int(11) NOT NULL DEFAULT '0'," +
                                                        "`Version` int(11) NOT NULL DEFAULT '0'," +
                                                        "`CreateDate` datetime DEFAULT NULL," +
                                                        "`UpdateDate` datetime DEFAULT NULL," +
                                                        "`CreateMan` varchar(50) DEFAULT NULL," +
                                                        "`UpdateMan` varchar(50) DEFAULT NULL," +
                                                        "`SeoTitle` varchar(100) DEFAULT NULL," +
                                                        "`SeoKeyword` varchar(200) DEFAULT NULL," +
                                                        "`SeoDescription` varchar(500) DEFAULT NULL," +
                                                        "`TransRecordNo` varchar(32) DEFAULT NULL," +
                                                        "`Remark` varchar(64) DEFAULT NULL," +
                                                        "`AfterBalanceAmount` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                        "`BeforeBalanceAmount` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                        "`AfterFreezeAmount` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                        "`BeforeFreezeAmount` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                        "`AfterTotalAmount` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                        "`BeforeTotalAmount` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                        "`ChangeAmount` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                        "`ProductType` int(11) NOT NULL DEFAULT '0'," +
                                                        "`ChangeType` int(11) NOT NULL DEFAULT '0'," +
                                                        "`UserId` int(11) NOT NULL DEFAULT '0'," +
                                                        "`Kind` int(11) NOT NULL DEFAULT '0'," +
                                                        "PRIMARY KEY (`Id`)," +
                                                        "KEY `UserAccountRecordIndex` (`UserId`,`ChangeType`,`CreateDate`)" +
                                                        ") ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;";

        //激活量统计
        public static string CreateUserTradeMonthSummary = "CREATE TABLE `UserTradeMonthSummary#DateTime#` (" +
                                                            "`Id` int(11) NOT NULL AUTO_INCREMENT," +
                                                            "`Sort` int(11) NOT NULL DEFAULT '0'," +
                                                            "`QueryCount` int(11) NOT NULL DEFAULT '0'," +
                                                            "`Status` int(11) NOT NULL DEFAULT '0'," +
                                                            "`Version` int(11) NOT NULL DEFAULT '0'," +
                                                            "`CreateDate` datetime DEFAULT NULL," +
                                                            "`UpdateDate` datetime DEFAULT NULL," +
                                                            "`CreateMan` varchar(50) DEFAULT NULL," +
                                                            "`UpdateMan` varchar(50) DEFAULT NULL," +
                                                            "`SeoTitle` varchar(100) DEFAULT NULL," +
                                                            "`SeoKeyword` varchar(200) DEFAULT NULL," +
                                                            "`SeoDescription` varchar(500) DEFAULT NULL," +
                                                            "`Remark` varchar(64) DEFAULT NULL," +
                                                            "`ActiveBuddyMerStatus` int(11) NOT NULL DEFAULT '0'," +
                                                            "`MallPosOrderStatus` int(11) NOT NULL DEFAULT '0'," +
                                                            "`DebitCapTradeNum` int(11) NOT NULL DEFAULT '0'," +
                                                            "`DebitCapTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                            "`DebitNotCapTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                            "`CreditTradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                            "`TradeAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                            "`StatType` int(11) NOT NULL DEFAULT '0'," +
                                                            "`BrandId` int(11) NOT NULL DEFAULT '0'," +
                                                            "`TradeMonth` varchar(6) DEFAULT NULL," +
                                                            "`UserId` int(11) NOT NULL DEFAULT '0'," +
                                                            "PRIMARY KEY (`Id`)," +
                                                            "KEY `UserTradeMonthSummaryIndex` (`UserId`,`BrandId`,`SeoTitle`)" +
                                                            ") ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;";

        //SP绑定记录表
        public static string CreateSpBindRecord = "CREATE TABLE `BindRecord#DateTime#` (" +
                                                "`Id` int(11) NOT NULL AUTO_INCREMENT," +
                                                "`Sort` int(11) NOT NULL DEFAULT '0'," +
                                                "`QueryCount` int(11) NOT NULL DEFAULT '0'," +
                                                "`Status` int(11) NOT NULL DEFAULT '0'," +
                                                "`CreateDate` datetime DEFAULT NULL," +
                                                "`UpdateDate` datetime DEFAULT NULL," +
                                                "`SeoTitle` varchar(100) DEFAULT NULL," +
                                                "`SeoKeyword` varchar(200) DEFAULT NULL," +
                                                "`SeoDescription` mediumtext," +
                                                "`ChannelSerial` varchar(50) DEFAULT NULL," +
                                                "`UpdateTime` datetime DEFAULT NULL," +
                                                "`CreateTime` datetime DEFAULT NULL," +
                                                "`Remark` varchar(64) DEFAULT NULL," +
                                                "`MerNewSnNo` varchar(32) DEFAULT NULL," +
                                                "`ProductType` varchar(32) DEFAULT NULL," +
                                                "`MerStatus` varchar(16) DEFAULT NULL," +
                                                "`MerOperateType` varchar(16) DEFAULT NULL," +
                                                "`MerOperateDate` datetime DEFAULT NULL," +
                                                "`MerSnNo` varchar(32) DEFAULT NULL," +
                                                "`MerName` varchar(32) DEFAULT NULL," +
                                                "`AgentName` varchar(64) DEFAULT NULL," +
                                                "`MerNo` varchar(32) DEFAULT NULL," +
                                                "`Field5` varchar(50) DEFAULT NULL," +
                                                "`Field4` varchar(50) DEFAULT NULL," +
                                                "`Field3` varchar(50) DEFAULT NULL," +
                                                "`Field2` varchar(50) DEFAULT NULL," +
                                                "`Field1` varchar(50) DEFAULT NULL," +
                                                "PRIMARY KEY (`Id`)," +
                                                "KEY `BindRecordIndex` (`MerSnNo`,`MerNo`,`CreateTime`)" +
                                                ") ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;";

        //SP商户信息
        public static string CreateSpMerchants = "CREATE TABLE `Merchants#DateTime#` (" +
                                                "`Id` int(11) NOT NULL AUTO_INCREMENT," +
                                                "`Sort` int(11) NOT NULL DEFAULT '0'," +
                                                "`QueryCount` int(11) NOT NULL DEFAULT '0'," +
                                                "`Status` int(11) NOT NULL DEFAULT '0'," +
                                                "`CreateDate` datetime DEFAULT NULL," +
                                                "`UpdateDate` datetime DEFAULT NULL," +
                                                "`SeoTitle` varchar(100) DEFAULT NULL," +
                                                "`SeoKeyword` varchar(200) DEFAULT NULL," +
                                                "`SeoDescription` varchar(500) DEFAULT NULL," +
                                                "`AgentNo` varchar(32) DEFAULT NULL," +
                                                "`SnNo` varchar(32) DEFAULT NULL," +
                                                "`UpdateTime` datetime DEFAULT NULL," +
                                                "`CreateTime` datetime DEFAULT NULL," +
                                                "`Remark` varchar(64) DEFAULT NULL," +
                                                "`City` varchar(32) DEFAULT NULL," +
                                                "`Province` varchar(32) DEFAULT NULL," +
                                                "`ProductType` varchar(32) DEFAULT NULL," +
                                                "`MerStatus` varchar(16) DEFAULT NULL," +
                                                "`MerAuditDate` datetime DEFAULT NULL," +
                                                "`MerRegDate` datetime DEFAULT NULL," +
                                                "`MerIdcardNo` varchar(18) DEFAULT NULL," +
                                                "`MerMobile` varchar(11) DEFAULT NULL," +
                                                "`MerRealName` varchar(16) DEFAULT NULL," +
                                                "`AgentName` varchar(64) DEFAULT NULL," +
                                                "`MerName` varchar(32) DEFAULT NULL," +
                                                "`MerNo` varchar(32) DEFAULT NULL," +
                                                "`Field5` varchar(50) DEFAULT NULL," +
                                                "`Field4` varchar(50) DEFAULT NULL," +
                                                "`Field3` varchar(50) DEFAULT NULL," +
                                                "`Field2` varchar(50) DEFAULT NULL," +
                                                "`Field1` varchar(50) DEFAULT NULL," +
                                                "PRIMARY KEY (`Id`)," +
                                                "KEY `MerchantsIndex` (`MerNo`,`SnNo`,`CreateDate`)" +
                                                ") ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;";

        //SP押金记录
        public static string CreateSpActivateRecord = "CREATE TABLE `ActivateRecord#DateTime#` (" +
                                                     "`Id` int(11) NOT NULL AUTO_INCREMENT," +
                                                     "`Sort` int(11) NOT NULL DEFAULT '0'," +
                                                     "`QueryCount` int(11) NOT NULL DEFAULT '0'," +
                                                     "`Status` int(11) NOT NULL DEFAULT '0'," +
                                                     "`CreateDate` datetime DEFAULT NULL," +
                                                     "`UpdateDate` datetime DEFAULT NULL," +
                                                     "`SeoTitle` varchar(100) DEFAULT NULL," +
                                                     "`SeoKeyword` varchar(200) DEFAULT NULL," +
                                                     "`SeoDescription` mediumtext," +
                                                     "`ProductType` varchar(32) DEFAULT NULL," +
                                                     "`AgentNo` varchar(32) DEFAULT NULL," +
                                                     "`Remark` varchar(64) DEFAULT NULL," +
                                                     "`BizEnterName` varchar(32) DEFAULT NULL," +
                                                     "`BizEnterNo` varchar(16) DEFAULT NULL," +
                                                     "`MerIdcardNo` varchar(18) DEFAULT NULL," +
                                                     "`MerRealName` varchar(16) DEFAULT NULL," +
                                                     "`ActivateDate` datetime DEFAULT NULL," +
                                                     "`ActivateStatus` varchar(20) DEFAULT NULL," +
                                                     "`AssessMonthCount` varchar(8) DEFAULT NULL," +
                                                     "`AssessMonth` varchar(8) DEFAULT NULL," +
                                                     "`MerRegDate` datetime DEFAULT NULL," +
                                                     "`SnNo` varchar(32) DEFAULT NULL," +
                                                     "`MerMobile` varchar(32) DEFAULT NULL," +
                                                     "`MerName` varchar(32) DEFAULT NULL," +
                                                     "`MerNo` varchar(32) DEFAULT NULL," +
                                                     "`ChannelSerial` varchar(50) DEFAULT NULL," +
                                                     "`Field5` varchar(50) DEFAULT NULL," +
                                                     "`Field4` varchar(50) DEFAULT NULL," +
                                                     "`Field3` varchar(50) DEFAULT NULL," +
                                                     "`Field2` varchar(50) DEFAULT NULL," +
                                                     "`Field1` varchar(50) DEFAULT NULL," +
                                                     "PRIMARY KEY (`Id`)," +
                                                    "KEY `TradeRecordIndex` (`SnNo`,`ProductType`,`MerNo`,`ActivateDate`)" +
                                                     ") ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;";

        //SP交易记录表
        public static string CreateSpTradeRecord = "CREATE TABLE `TradeRecord#DateTime#` (" +
                                                    "`Id` int(11) NOT NULL AUTO_INCREMENT," +
                                                    "`Sort` int(11) NOT NULL DEFAULT '0'," +
                                                    "`QueryCount` int(11) NOT NULL DEFAULT '0'," +
                                                    "`Status` int(11) NOT NULL DEFAULT '0'," +
                                                    "`CreateDate` datetime DEFAULT NULL," +
                                                    "`UpdateDate` datetime DEFAULT NULL," +
                                                    "`SeoTitle` varchar(100) DEFAULT NULL," +
                                                    "`SeoKeyword` varchar(200) DEFAULT NULL," +
                                                    "`SeoDescription` mediumtext," +
                                                    "`ChannelSerial` varchar(50) DEFAULT NULL," +
                                                    "`AgentNo` varchar(32) DEFAULT NULL," +
                                                    "`ProductType` varchar(32) DEFAULT NULL," +
                                                    "`Remark` varchar(64) DEFAULT NULL," +
                                                    "`SettleMethod` varchar(16) DEFAULT NULL," +
                                                    "`SettleFee` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`BankCardNo` varchar(32) DEFAULT NULL," +
                                                    "`ReceiptType` varchar(16) DEFAULT NULL," +
                                                    "`IsStoreCashier` varchar(16) DEFAULT NULL," +
                                                    "`DigAmt` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`DigAmtFlag` varchar(4) DEFAULT NULL," +
                                                    "`MerMobile` varchar(11) DEFAULT NULL," +
                                                    "`DeviceType` varchar(16) DEFAULT NULL," +
                                                    "`TradeSnNo` varchar(50) DEFAULT NULL," +
                                                    "`BankCardType` varchar(16) DEFAULT NULL," +
                                                    "`SerEntryMode` varchar(32) DEFAULT NULL," +
                                                    "`TradeType` varchar(32) DEFAULT NULL," +
                                                    "`TradeTime` varchar(8) DEFAULT NULL," +
                                                    "`TradeDate` varchar(8) DEFAULT NULL," +
                                                    "`ErrorMsg` varchar(32) DEFAULT NULL," +
                                                    "`ErrorCode` varchar(16) DEFAULT NULL," +
                                                    "`TradeStatus` varchar(16) DEFAULT NULL," +
                                                    "`DiscountRateFlag` varchar(16) DEFAULT NULL," +
                                                    "`BankAuthCode` varchar(32) DEFAULT NULL," +
                                                    "`TradeReferNo` varchar(32) DEFAULT NULL," +
                                                    "`TradeAmount` decimal(18,2) NOT NULL DEFAULT '0.00'," +
                                                    "`MerName` varchar(50) DEFAULT NULL," +
                                                    "`MerNo` varchar(50) DEFAULT NULL," +
                                                    "`TradeSerialNo` varchar(100) DEFAULT NULL," +
                                                    "`Field5` varchar(50) DEFAULT NULL," +
                                                    "`Field4` varchar(50) DEFAULT NULL," +
                                                    "`Field3` varchar(50) DEFAULT NULL," +
                                                    "`Field2` varchar(50) DEFAULT NULL," +
                                                    "`Field1` varchar(50) DEFAULT NULL," +
                                                    "PRIMARY KEY (`Id`)," +
                                                    "KEY `TradeRecordIndex` (`TradeSnNo`,`ProductType`,`MerNo`,`CreateDate`)" +
                                                    ") ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;";
    }
}

//增加的字段
// Alter table TradeRecord add RdsStat int not null default 0 COMMENT 'Rds分表统计标记';
// Alter table UserAccountRecord add RdsStat int not null default 0 COMMENT 'Rds分表统计标记';
// Alter table BindRecord add RdsStat int not null default 0 COMMENT 'Rds分表统计标记';
// Alter table Merchants add RdsStat int not null default 0 COMMENT 'Rds分表统计标记';
// Alter table ActivateRecord add RdsStat int not null default 0 COMMENT 'Rds分表统计标记';
// Alter table TradeRecord add RdsStat int not null default 0 COMMENT 'Rds分表统计标记';