fix statistics

This commit is contained in:
sk 2025-01-02 10:45:05 +08:00
parent 280de58880
commit e97e531623
2 changed files with 1 additions and 2 deletions

View File

@ -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) 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) { if len(row) < len(header) {
for len(row) < len(header) { for len(row) < len(header) {

View File

@ -112,7 +112,6 @@ func init() {
etcd.Register(etcd.ETCDKEY_PigBankProp, webapi.GamePigBankPropConfig{}, platformConfigEvent) etcd.Register(etcd.ETCDKEY_PigBankProp, webapi.GamePigBankPropConfig{}, platformConfigEvent)
// 红包配置 // 红包配置
etcd.Register(etcd.ETCDKEY_REDPACKET, webapi.RedPacketConfig{}, platformConfigEvent) etcd.Register(etcd.ETCDKEY_REDPACKET, webapi.RedPacketConfig{}, platformConfigEvent)
} }
func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) { func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {