/**Begin 代发处理 新增字段 **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_AGENTPAYBILLENTRY_E' AND KSQL_COL_NAME IN ('FENTRYMATCHAMOUNT')) 
 ALTER TABLE T_CAS_AGENTPAYBILLENTRY_E ADD (FENTRYMATCHAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_AGENTPAYBILLENTRY_E' AND KSQL_COL_NAME IN ('FENTRYUNMATCHAMOUNT')) 
 ALTER TABLE T_CAS_AGENTPAYBILLENTRY_E ADD (FENTRYUNMATCHAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_AGENTPAYBILLENTRY_E' AND KSQL_COL_NAME IN ('FENTRYMATCHFLAG')) 
 ALTER TABLE T_CAS_AGENTPAYBILLENTRY_E ADD (FENTRYMATCHFLAG VARCHAR(50) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_AGENTPAYBILL_E' AND KSQL_COL_NAME IN ('FMATCHAMOUNT')) 
 ALTER TABLE T_CAS_AGENTPAYBILL_E ADD (FMATCHAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_AGENTPAYBILL_E' AND KSQL_COL_NAME IN ('FUNMATCHAMOUNT')) 
 ALTER TABLE T_CAS_AGENTPAYBILL_E ADD (FUNMATCHAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_AGENTPAYBILL_E' AND KSQL_COL_NAME IN ('FISMATCHBYHEAD')) 
 ALTER TABLE T_CAS_AGENTPAYBILL_E ADD (FISMATCHBYHEAD CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_AGENTPAYBILL_E' AND KSQL_COL_NAME IN ('FMATCHFLAG')) 
 ALTER TABLE T_CAS_AGENTPAYBILL_E ADD (FMATCHFLAG VARCHAR(50) DEFAULT '0' NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_AGENTPAYBILLENTRY_E' AND KSQL_COL_NAME IN ('FENTRYMATCHERRMSG')) 
 ALTER TABLE T_CAS_AGENTPAYBILLENTRY_E ADD (FENTRYMATCHERRMSG NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_AGENTPAYBILL_E' AND KSQL_COL_NAME IN ('FMATCHERRMSG')) 
 ALTER TABLE T_CAS_AGENTPAYBILL_E ADD (FMATCHERRMSG NVARCHAR(50) DEFAULT ' ' NOT NULL );