From e97e53162321e9bef9c7448a2acf86469e97f96a Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Thu, 2 Jan 2025 10:45:05 +0800 Subject: [PATCH] fix statistics --- statistics/task/excelmgr.go | 2 +- worldsrv/etcd.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/statistics/task/excelmgr.go b/statistics/task/excelmgr.go index 7d579e7..1dbc3d9 100644 --- a/statistics/task/excelmgr.go +++ b/statistics/task/excelmgr.go @@ -234,7 +234,7 @@ func insertData(db *gorm.DB, tableName string, header []string, rows [][]string) insertSQL := fmt.Sprintf("INSERT INTO `%s` (%s) VALUES (%s)", tableName, "`"+strings.Join(header, "`,`")+"`", placeholders) - for _, row := range rows { + for _, row := range rows[1:] { // 确保每行数据长度和表头一致 if len(row) < len(header) { for len(row) < len(header) { diff --git a/worldsrv/etcd.go b/worldsrv/etcd.go index 31f1f90..fd7125f 100644 --- a/worldsrv/etcd.go +++ b/worldsrv/etcd.go @@ -112,7 +112,6 @@ func init() { etcd.Register(etcd.ETCDKEY_PigBankProp, webapi.GamePigBankPropConfig{}, platformConfigEvent) // 红包配置 etcd.Register(etcd.ETCDKEY_REDPACKET, webapi.RedPacketConfig{}, platformConfigEvent) - } func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {