// Code generated by xlsx2proto.
// DO NOT EDIT!

package main

import (
	"encoding/json"
	"fmt"
	"os"
	"runtime"
	"strconv"
	"strings"

	"github.com/tealeg/xlsx"
	"mongo.games.com/game/proto"
	"mongo.games.com/game/protocol/server"
)

var _ = strings.Split

func AgcConvertDB_ActSign(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_ActSignArray{
			Arr: make([]*server.DB_ActSign, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_ActSign{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.Type = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.Name = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.Item_Id = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.Grade = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_Activity1(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_Activity1Array{
			Arr: make([]*server.DB_Activity1, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_Activity1{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.Parameter = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.Turn = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				data.Title = proto.String(row.Cells[3].String())

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.Costype = proto.Int32(int32(temp))

				if len(row.Cells) < 5+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[5].String(), 10, 32)
				data.Costp = proto.Int32(int32(temp))

				if len(row.Cells) < 6+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[6].String(), 10, 32)
				data.Cost = proto.Int32(int32(temp))

				if len(row.Cells) < 7+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[7].String(), 10, 32)
				data.Typee = proto.Int32(int32(temp))

				if len(row.Cells) < 8+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[8].String(), 10, 32)
				data.Propid = proto.Int32(int32(temp))

				if len(row.Cells) < 9+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[9].String(), 10, 32)
				data.Value = proto.Int32(int32(temp))

				if len(row.Cells) < 10+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[10].String(), 10, 32)
				data.Getype = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_AnimalColor(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_AnimalColorArray{
			Arr: make([]*server.DB_AnimalColor, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_AnimalColor{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Desc = proto.String(row.Cells[1].String())

				if len(row.Cells) < 2+1 {
					break
				}

				arrStr = strings.Split(row.Cells[2].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[2].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.ColorChance = arrInt

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_ArtilleryRate(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_ArtilleryRateArray{
			Arr: make([]*server.DB_ArtilleryRate, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_ArtilleryRate{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.Shell = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.Level = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				data.Desc = proto.String(row.Cells[3].String())

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_ArtillerySkin(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_ArtillerySkinArray{
			Arr: make([]*server.DB_ArtillerySkin, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_ArtillerySkin{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Name = proto.String(row.Cells[1].String())

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.CannonId = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.Type = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.ExprieTime = proto.Int32(int32(temp))

				if len(row.Cells) < 5+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[5].String(), 10, 32)
				data.Show = proto.Int32(int32(temp))

				if len(row.Cells) < 6+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[6].String(), 10, 32)
				data.Order = proto.Int32(int32(temp))

				if len(row.Cells) < 7+1 {
					break
				}

				data.NameIcon = proto.String(row.Cells[7].String())

				if len(row.Cells) < 8+1 {
					break
				}

				data.PicIcon = proto.String(row.Cells[8].String())

				if len(row.Cells) < 9+1 {
					break
				}

				data.BaseIcon = proto.String(row.Cells[9].String())

				if len(row.Cells) < 10+1 {
					break
				}

				data.ShellIcon = proto.String(row.Cells[10].String())

				if len(row.Cells) < 11+1 {
					break
				}

				data.NetIcon = proto.String(row.Cells[11].String())

				if len(row.Cells) < 12+1 {
					break
				}

				arrStr = strings.Split(row.Cells[12].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[12].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Vip = arrInt

				if len(row.Cells) < 13+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[13].String(), 10, 32)
				data.Gold = proto.Int32(int32(temp))

				if len(row.Cells) < 14+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[14].String(), 10, 32)
				data.Diamond = proto.Int32(int32(temp))

				if len(row.Cells) < 15+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[15].String(), 10, 32)
				data.Income = proto.Int32(int32(temp))

				if len(row.Cells) < 16+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[16].String(), 10, 32)
				data.Speed = proto.Int32(int32(temp))

				if len(row.Cells) < 17+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[17].String(), 10, 32)
				data.Caught = proto.Int32(int32(temp))

				if len(row.Cells) < 18+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[18].String(), 10, 32)
				data.Introduce = proto.Int32(int32(temp))

				if len(row.Cells) < 19+1 {
					break
				}

				data.Source = proto.String(row.Cells[19].String())

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_BlackWhite(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_BlackWhiteArray{
			Arr: make([]*server.DB_BlackWhite, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_BlackWhite{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				arrStr = strings.Split(row.Cells[2].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[2].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.BlackOdds = arrInt

				if len(row.Cells) < 3+1 {
					break
				}

				arrStr = strings.Split(row.Cells[3].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[3].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.WhiteOdds = arrInt

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_CardsJD(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_CardsJDArray{
			Arr: make([]*server.DB_CardsJD, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_CardsJD{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Card1 = proto.String(row.Cells[1].String())

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.Card1Score = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.Card1HandNum = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				data.Change1Cards = proto.String(row.Cells[4].String())

				if len(row.Cells) < 5+1 {
					break
				}

				data.Card2 = proto.String(row.Cells[5].String())

				if len(row.Cells) < 6+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[6].String(), 10, 32)
				data.Card2Score = proto.Int32(int32(temp))

				if len(row.Cells) < 7+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[7].String(), 10, 32)
				data.Card2HandNum = proto.Int32(int32(temp))

				if len(row.Cells) < 8+1 {
					break
				}

				data.Change2Cards = proto.String(row.Cells[8].String())

				if len(row.Cells) < 9+1 {
					break
				}

				data.Card3 = proto.String(row.Cells[9].String())

				if len(row.Cells) < 10+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[10].String(), 10, 32)
				data.Card3Score = proto.Int32(int32(temp))

				if len(row.Cells) < 11+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[11].String(), 10, 32)
				data.Card3HandNum = proto.Int32(int32(temp))

				if len(row.Cells) < 12+1 {
					break
				}

				data.Change3Cards = proto.String(row.Cells[12].String())

				if len(row.Cells) < 13+1 {
					break
				}

				data.Card4 = proto.String(row.Cells[13].String())

				if len(row.Cells) < 14+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[14].String(), 10, 32)
				data.Card4Score = proto.Int32(int32(temp))

				if len(row.Cells) < 15+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[15].String(), 10, 32)
				data.Card4HandNum = proto.Int32(int32(temp))

				if len(row.Cells) < 16+1 {
					break
				}

				data.Change4Cards = proto.String(row.Cells[16].String())

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_CardsYuLe(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_CardsYuLeArray{
			Arr: make([]*server.DB_CardsYuLe, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_CardsYuLe{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Card1 = proto.String(row.Cells[1].String())

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.Card1Score = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.Card1HandNum = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				data.Change1Cards = proto.String(row.Cells[4].String())

				if len(row.Cells) < 5+1 {
					break
				}

				data.Card2 = proto.String(row.Cells[5].String())

				if len(row.Cells) < 6+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[6].String(), 10, 32)
				data.Card2Score = proto.Int32(int32(temp))

				if len(row.Cells) < 7+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[7].String(), 10, 32)
				data.Card2HandNum = proto.Int32(int32(temp))

				if len(row.Cells) < 8+1 {
					break
				}

				data.Change2Cards = proto.String(row.Cells[8].String())

				if len(row.Cells) < 9+1 {
					break
				}

				data.Card3 = proto.String(row.Cells[9].String())

				if len(row.Cells) < 10+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[10].String(), 10, 32)
				data.Card3Score = proto.Int32(int32(temp))

				if len(row.Cells) < 11+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[11].String(), 10, 32)
				data.Card3HandNum = proto.Int32(int32(temp))

				if len(row.Cells) < 12+1 {
					break
				}

				data.Change3Cards = proto.String(row.Cells[12].String())

				if len(row.Cells) < 13+1 {
					break
				}

				data.Card4 = proto.String(row.Cells[13].String())

				if len(row.Cells) < 14+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[14].String(), 10, 32)
				data.Card4Score = proto.Int32(int32(temp))

				if len(row.Cells) < 15+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[15].String(), 10, 32)
				data.Card4HandNum = proto.Int32(int32(temp))

				if len(row.Cells) < 16+1 {
					break
				}

				data.Change4Cards = proto.String(row.Cells[16].String())

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_ChessBilledRules(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_ChessBilledRulesArray{
			Arr: make([]*server.DB_ChessBilledRules, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_ChessBilledRules{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.TypeId = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.WinScore = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.LoseScore = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.DrawScore = proto.Int32(int32(temp))

				if len(row.Cells) < 5+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[5].String(), 10, 32)
				data.WinTimes = proto.Int32(int32(temp))

				if len(row.Cells) < 6+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[6].String(), 10, 32)
				data.OtherScore = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_ChessMatchRules(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_ChessMatchRulesArray{
			Arr: make([]*server.DB_ChessMatchRules, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_ChessMatchRules{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.ScoreMin = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.ScoreMax = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.MatchScoreMin = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.MatchScoreMax = proto.Int32(int32(temp))

				if len(row.Cells) < 5+1 {
					break
				}

				arrStr = strings.Split(row.Cells[5].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[5].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.MatchScoreLowStep = arrInt

				if len(row.Cells) < 6+1 {
					break
				}

				arrStr = strings.Split(row.Cells[6].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[6].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.MatchScoreHightStep = arrInt

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_ChessRank(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_ChessRankArray{
			Arr: make([]*server.DB_ChessRank, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_ChessRank{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.Score = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				data.Name = proto.String(row.Cells[2].String())

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_ClientVer(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_ClientVerArray{
			Arr: make([]*server.DB_ClientVer, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_ClientVer{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.PackageFlag = proto.String(row.Cells[1].String())

				if len(row.Cells) < 2+1 {
					break
				}

				data.PackVers = proto.String(row.Cells[2].String())

				if len(row.Cells) < 3+1 {
					break
				}

				data.GameVers = proto.String(row.Cells[3].String())

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_CrashSearch(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_CrashSearchArray{
			Arr: make([]*server.DB_CrashSearch, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_CrashSearch{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.Time = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.Price = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_Createroom(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_CreateroomArray{
			Arr: make([]*server.DB_Createroom, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_Createroom{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.GameId = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.GameSite = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				arrStr = strings.Split(row.Cells[3].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[3].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.GoldRange = arrInt

				if len(row.Cells) < 4+1 {
					break
				}

				arrStr = strings.Split(row.Cells[4].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[4].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.BetRange = arrInt

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_Fish(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_FishArray{
			Arr: make([]*server.DB_Fish, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_Fish{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Name = proto.String(row.Cells[1].String())

				if len(row.Cells) < 2+1 {
					break
				}

				data.NameE = proto.String(row.Cells[2].String())

				if len(row.Cells) < 3+1 {
					break
				}

				arrStr = strings.Split(row.Cells[3].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[3].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Gold = arrInt

				if len(row.Cells) < 4+1 {
					break
				}

				data.Icon = proto.String(row.Cells[4].String())

				if len(row.Cells) < 5+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[5].String(), 10, 32)
				data.Speed = proto.Int32(int32(temp))

				if len(row.Cells) < 6+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[6].String(), 10, 32)
				data.Exp = proto.Int32(int32(temp))

				if len(row.Cells) < 7+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[7].String(), 10, 32)
				data.FrameCnt = proto.Int32(int32(temp))

				if len(row.Cells) < 8+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[8].String(), 10, 32)
				data.FrameDelay = proto.Int32(int32(temp))

				if len(row.Cells) < 9+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[9].String(), 10, 32)
				data.Rate = proto.Int32(int32(temp))

				if len(row.Cells) < 10+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[10].String(), 10, 32)
				data.ShowType = proto.Int32(int32(temp))

				if len(row.Cells) < 11+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[11].String(), 10, 32)
				data.Show = proto.Int32(int32(temp))

				if len(row.Cells) < 12+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[12].String(), 10, 32)
				data.ShowScale = proto.Int32(int32(temp))

				if len(row.Cells) < 13+1 {
					break
				}

				arrStr = strings.Split(row.Cells[13].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[13].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.ShowPos = arrInt

				if len(row.Cells) < 14+1 {
					break
				}

				data.DieSound = proto.String(row.Cells[14].String())

				if len(row.Cells) < 15+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[15].String(), 10, 32)
				data.DieFrame = proto.Int32(int32(temp))

				if len(row.Cells) < 16+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[16].String(), 10, 32)
				data.DieRotate = proto.Int32(int32(temp))

				if len(row.Cells) < 17+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[17].String(), 10, 32)
				data.DieEffect = proto.Int32(int32(temp))

				if len(row.Cells) < 18+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[18].String(), 10, 32)
				data.DieShake = proto.Int32(int32(temp))

				if len(row.Cells) < 19+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[19].String(), 10, 32)
				data.ShakeRange = proto.Int32(int32(temp))

				if len(row.Cells) < 20+1 {
					break
				}

				data.Shape = proto.String(row.Cells[20].String())

				if len(row.Cells) < 21+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[21].String(), 10, 32)
				data.IsBoss = proto.Int32(int32(temp))

				if len(row.Cells) < 22+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[22].String(), 10, 32)
				data.ResId = proto.Int32(int32(temp))

				if len(row.Cells) < 23+1 {
					break
				}

				data.DieParticle = proto.String(row.Cells[23].String())

				if len(row.Cells) < 24+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[24].String(), 10, 32)
				data.GroupShape = proto.Int32(int32(temp))

				if len(row.Cells) < 25+1 {
					break
				}

				arrStr = strings.Split(row.Cells[25].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[25].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.GroupFishes = arrInt

				if len(row.Cells) < 26+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[26].String(), 10, 32)
				data.Zorder = proto.Int32(int32(temp))

				if len(row.Cells) < 27+1 {
					break
				}

				data.ResPng = proto.String(row.Cells[27].String())

				if len(row.Cells) < 28+1 {
					break
				}

				data.ResPlist = proto.String(row.Cells[28].String())

				if len(row.Cells) < 29+1 {
					break
				}

				data.ExportJson = proto.String(row.Cells[29].String())

				if len(row.Cells) < 30+1 {
					break
				}

				data.AimIcon = proto.String(row.Cells[30].String())

				if len(row.Cells) < 31+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[31].String(), 10, 32)
				data.GameId = proto.Int32(int32(temp))

				if len(row.Cells) < 32+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[32].String(), 10, 32)
				data.Sort = proto.Int32(int32(temp))

				if len(row.Cells) < 33+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[33].String(), 10, 32)
				data.FishType = proto.Int32(int32(temp))

				if len(row.Cells) < 34+1 {
					break
				}

				data.RandomCoin = proto.String(row.Cells[34].String())

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_FishOut(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_FishOutArray{
			Arr: make([]*server.DB_FishOut, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_FishOut{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.SceneType = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				data.Name = proto.String(row.Cells[2].String())

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.Exp = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				arrStr = strings.Split(row.Cells[4].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[4].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Multiple = arrInt

				if len(row.Cells) < 5+1 {
					break
				}

				arrStr = strings.Split(row.Cells[5].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[5].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Path = arrInt

				if len(row.Cells) < 6+1 {
					break
				}

				arrStr = strings.Split(row.Cells[6].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[6].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Count = arrInt

				if len(row.Cells) < 7+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[7].String(), 10, 32)
				data.RefreshInterval = proto.Int32(int32(temp))

				if len(row.Cells) < 8+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[8].String(), 10, 32)
				data.Speed = proto.Int32(int32(temp))

				if len(row.Cells) < 9+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[9].String(), 10, 32)
				data.Event = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_FishPath(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_FishPathArray{
			Arr: make([]*server.DB_FishPath, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_FishPath{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.AppearTime = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.DisappearTime = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_FishRoom(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_FishRoomArray{
			Arr: make([]*server.DB_FishRoom, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_FishRoom{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.RoomId = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				data.Name = proto.String(row.Cells[2].String())

				if len(row.Cells) < 3+1 {
					break
				}

				data.SumGold1 = proto.String(row.Cells[3].String())

				if len(row.Cells) < 4+1 {
					break
				}

				data.SumGold2 = proto.String(row.Cells[4].String())

				if len(row.Cells) < 5+1 {
					break
				}

				data.SumGold3 = proto.String(row.Cells[5].String())

				if len(row.Cells) < 6+1 {
					break
				}

				data.SumGold4 = proto.String(row.Cells[6].String())

				if len(row.Cells) < 7+1 {
					break
				}

				data.SumGold5 = proto.String(row.Cells[7].String())

				if len(row.Cells) < 8+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[8].String(), 10, 32)
				data.BossCDTime = proto.Int32(int32(temp))

				if len(row.Cells) < 9+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[9].String(), 10, 32)
				data.LittleBossCDTime = proto.Int32(int32(temp))

				if len(row.Cells) < 10+1 {
					break
				}

				data.EnableBoss = proto.String(row.Cells[10].String())

				if len(row.Cells) < 11+1 {
					break
				}

				data.EnableLittleBoss = proto.String(row.Cells[11].String())

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_FishSkill(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_FishSkillArray{
			Arr: make([]*server.DB_FishSkill, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_FishSkill{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Name = proto.String(row.Cells[1].String())

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.Vip = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.Consume = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				arrStr = strings.Split(row.Cells[4].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[4].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Item = arrInt

				if len(row.Cells) < 5+1 {
					break
				}

				arrStr = strings.Split(row.Cells[5].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[5].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.OtherConsumer = arrInt

				if len(row.Cells) < 6+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[6].String(), 10, 32)
				data.Multiple = proto.Int32(int32(temp))

				if len(row.Cells) < 7+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[7].String(), 10, 32)
				data.Duration = proto.Int32(int32(temp))

				if len(row.Cells) < 8+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[8].String(), 10, 32)
				data.SkillGroups = proto.Int32(int32(temp))

				if len(row.Cells) < 9+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[9].String(), 10, 32)
				data.GCD = proto.Int32(int32(temp))

				if len(row.Cells) < 10+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[10].String(), 10, 32)
				data.Cooldown = proto.Int32(int32(temp))

				if len(row.Cells) < 11+1 {
					break
				}

				data.Hidden = proto.String(row.Cells[11].String())

				if len(row.Cells) < 12+1 {
					break
				}

				data.Describe = proto.String(row.Cells[12].String())

				if len(row.Cells) < 13+1 {
					break
				}

				data.Boss = proto.String(row.Cells[13].String())

				if len(row.Cells) < 14+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[14].String(), 10, 32)
				data.Type = proto.Int32(int32(temp))

				if len(row.Cells) < 15+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[15].String(), 10, 32)
				data.Limit = proto.Int32(int32(temp))

				if len(row.Cells) < 16+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[16].String(), 10, 32)
				data.Mutex = proto.Int32(int32(temp))

				if len(row.Cells) < 17+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[17].String(), 10, 32)
				data.MutexTime = proto.Int32(int32(temp))

				if len(row.Cells) < 18+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[18].String(), 10, 32)
				data.Fury = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_FortuneGod_Odds(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_FortuneGod_OddsArray{
			Arr: make([]*server.DB_FortuneGod_Odds, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_FortuneGod_Odds{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Name = proto.String(row.Cells[1].String())

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.Rateodds3 = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.Rateodds4 = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.Rateodds5 = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_FortuneGod_TurnRate(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_FortuneGod_TurnRateArray{
			Arr: make([]*server.DB_FortuneGod_TurnRate, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_FortuneGod_TurnRate{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.ReturnRateMin = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.ReturnRateMax = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				arrStr = strings.Split(row.Cells[3].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[3].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Chance = arrInt

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_FortuneGod_Weight(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_FortuneGod_WeightArray{
			Arr: make([]*server.DB_FortuneGod_Weight, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_FortuneGod_Weight{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Name = proto.String(row.Cells[1].String())

				if len(row.Cells) < 2+1 {
					break
				}

				arrStr = strings.Split(row.Cells[2].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[2].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Weight = arrInt

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_FortuneGod_WeightCondition(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_FortuneGod_WeightConditionArray{
			Arr: make([]*server.DB_FortuneGod_WeightCondition, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_FortuneGod_WeightCondition{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.IsNew = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				arrStr = strings.Split(row.Cells[2].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[2].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.BetScope = arrInt

				if len(row.Cells) < 3+1 {
					break
				}

				arrStr = strings.Split(row.Cells[3].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[3].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.TrueCalcRate = arrInt

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.WeightId = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_GamMatchLV(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_GamMatchLVArray{
			Arr: make([]*server.DB_GamMatchLV, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_GamMatchLV{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				arrStr = strings.Split(row.Cells[1].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[1].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Star = arrInt

				if len(row.Cells) < 2+1 {
					break
				}

				data.Name = proto.String(row.Cells[2].String())

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.Star2 = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.AwardType1 = proto.Int32(int32(temp))

				if len(row.Cells) < 5+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[5].String(), 10, 32)
				data.AwardId1 = proto.Int32(int32(temp))

				if len(row.Cells) < 6+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[6].String(), 10, 32)
				data.Number1 = proto.Int32(int32(temp))

				if len(row.Cells) < 7+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[7].String(), 10, 32)
				data.AwardType2 = proto.Int32(int32(temp))

				if len(row.Cells) < 8+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[8].String(), 10, 32)
				data.AwardId2 = proto.Int32(int32(temp))

				if len(row.Cells) < 9+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[9].String(), 10, 32)
				data.Number2 = proto.Int32(int32(temp))

				if len(row.Cells) < 10+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[10].String(), 10, 32)
				data.AwardType3 = proto.Int32(int32(temp))

				if len(row.Cells) < 11+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[11].String(), 10, 32)
				data.AwardId3 = proto.Int32(int32(temp))

				if len(row.Cells) < 12+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[12].String(), 10, 32)
				data.Number3 = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_GameCoinPool(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_GameCoinPoolArray{
			Arr: make([]*server.DB_GameCoinPool, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_GameCoinPool{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 64)
				data.InitValue = proto.Int64(int64(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 64)
				data.LowerLimit = proto.Int64(int64(temp))

				if len(row.Cells) < 5+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[5].String(), 10, 64)
				data.UpperLimit = proto.Int64(int64(temp))

				if len(row.Cells) < 6+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[6].String(), 10, 64)
				data.QuDu = proto.Int64(int64(temp))

				if len(row.Cells) < 7+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[7].String(), 10, 32)
				data.UpperOdds = proto.Int32(int32(temp))

				if len(row.Cells) < 8+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[8].String(), 10, 32)
				data.UpperOddsMax = proto.Int32(int32(temp))

				if len(row.Cells) < 9+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[9].String(), 10, 32)
				data.LowerOdds = proto.Int32(int32(temp))

				if len(row.Cells) < 10+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[10].String(), 10, 32)
				data.LowerOddsMax = proto.Int32(int32(temp))

				if len(row.Cells) < 11+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[11].String(), 10, 32)
				data.ProfitRate = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_GameFree(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_GameFreeArray{
			Arr: make([]*server.DB_GameFree, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_GameFree{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Name = proto.String(row.Cells[1].String())

				if len(row.Cells) < 2+1 {
					break
				}

				data.Title = proto.String(row.Cells[2].String())

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.GameId = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.GameMode = proto.Int32(int32(temp))

				if len(row.Cells) < 5+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[5].String(), 10, 32)
				data.FreeMode = proto.Int32(int32(temp))

				if len(row.Cells) < 6+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[6].String(), 10, 32)
				data.GameRule = proto.Int32(int32(temp))

				if len(row.Cells) < 7+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[7].String(), 10, 32)
				data.GameType = proto.Int32(int32(temp))

				if len(row.Cells) < 8+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[8].String(), 10, 32)
				data.SceneType = proto.Int32(int32(temp))

				if len(row.Cells) < 9+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[9].String(), 10, 32)
				data.RankType = proto.Int32(int32(temp))

				if len(row.Cells) < 10+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[10].String(), 10, 32)
				data.SceneAdd = proto.Int32(int32(temp))

				if len(row.Cells) < 11+1 {
					break
				}

				data.Desc = proto.String(row.Cells[11].String())

				if len(row.Cells) < 12+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[12].String(), 10, 32)
				data.ShowType = proto.Int32(int32(temp))

				if len(row.Cells) < 13+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[13].String(), 10, 32)
				data.SubShowType = proto.Int32(int32(temp))

				if len(row.Cells) < 14+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[14].String(), 10, 32)
				data.Flag = proto.Int32(int32(temp))

				if len(row.Cells) < 15+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[15].String(), 10, 32)
				data.TestTakeCoin = proto.Int32(int32(temp))

				if len(row.Cells) < 16+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[16].String(), 10, 32)
				data.ShowId = proto.Int32(int32(temp))

				if len(row.Cells) < 17+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[17].String(), 10, 64)
				data.LimitCoin = proto.Int64(int64(temp))

				if len(row.Cells) < 18+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[18].String(), 10, 64)
				data.MaxCoinLimit = proto.Int64(int64(temp))

				if len(row.Cells) < 19+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[19].String(), 10, 32)
				data.ServiceFee = proto.Int32(int32(temp))

				if len(row.Cells) < 20+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[20].String(), 10, 64)
				data.LowerThanKick = proto.Int64(int64(temp))

				if len(row.Cells) < 21+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[21].String(), 10, 32)
				data.BaseScore = proto.Int32(int32(temp))

				if len(row.Cells) < 22+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[22].String(), 10, 32)
				data.Turn = proto.Int32(int32(temp))

				if len(row.Cells) < 23+1 {
					break
				}

				data.BetDec = proto.String(row.Cells[23].String())

				if len(row.Cells) < 24+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[24].String(), 10, 32)
				data.Bot = proto.Int32(int32(temp))

				if len(row.Cells) < 25+1 {
					break
				}

				arrStr = strings.Split(row.Cells[25].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[25].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Ai = arrInt

				if len(row.Cells) < 26+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[26].String(), 10, 32)
				data.Banker = proto.Int32(int32(temp))

				if len(row.Cells) < 27+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[27].String(), 10, 32)
				data.MaxChip = proto.Int32(int32(temp))

				if len(row.Cells) < 28+1 {
					break
				}

				arrStr = strings.Split(row.Cells[28].String(), "|")
				arrInt64 = nil
				if len(arrStr) > 0 && row.Cells[28].String() != "" {
					arrInt64 = make([]int64, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 64)
						arrInt64[i] = int64(temp)
					}
				}
				data.OtherIntParams = arrInt64

				if len(row.Cells) < 29+1 {
					break
				}

				arrStr = strings.Split(row.Cells[29].String(), "|")
				arrInt64 = nil
				if len(arrStr) > 0 && row.Cells[29].String() != "" {
					arrInt64 = make([]int64, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 64)
						arrInt64[i] = int64(temp)
					}
				}
				data.ChessScoreParams = arrInt64

				if len(row.Cells) < 30+1 {
					break
				}

				arrStr = strings.Split(row.Cells[30].String(), "|")
				arrInt64 = nil
				if len(arrStr) > 0 && row.Cells[30].String() != "" {
					arrInt64 = make([]int64, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 64)
						arrInt64[i] = int64(temp)
					}
				}
				data.RankScoreParams = arrInt64

				if len(row.Cells) < 31+1 {
					break
				}

				arrStr = strings.Split(row.Cells[31].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[31].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Jackpot = arrInt

				if len(row.Cells) < 32+1 {
					break
				}

				arrStr = strings.Split(row.Cells[32].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[32].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.RobotNumRng = arrInt

				if len(row.Cells) < 33+1 {
					break
				}

				arrStr = strings.Split(row.Cells[33].String(), "|")
				arrInt64 = nil
				if len(arrStr) > 0 && row.Cells[33].String() != "" {
					arrInt64 = make([]int64, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 64)
						arrInt64[i] = int64(temp)
					}
				}
				data.RobotTakeCoin = arrInt64

				if len(row.Cells) < 34+1 {
					break
				}

				arrStr = strings.Split(row.Cells[34].String(), "|")
				arrInt64 = nil
				if len(arrStr) > 0 && row.Cells[34].String() != "" {
					arrInt64 = make([]int64, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 64)
						arrInt64[i] = int64(temp)
					}
				}
				data.RobotLimitCoin = arrInt64

				if len(row.Cells) < 35+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[35].String(), 10, 32)
				data.BetLimit = proto.Int32(int32(temp))

				if len(row.Cells) < 36+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[36].String(), 10, 32)
				data.TaxRate = proto.Int32(int32(temp))

				if len(row.Cells) < 37+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[37].String(), 10, 32)
				data.SameIpLimit = proto.Int32(int32(temp))

				if len(row.Cells) < 38+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[38].String(), 10, 32)
				data.SamePlaceLimit = proto.Int32(int32(temp))

				if len(row.Cells) < 39+1 {
					break
				}

				data.GameDif = proto.String(row.Cells[39].String())

				if len(row.Cells) < 40+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[40].String(), 10, 32)
				data.GameClass = proto.Int32(int32(temp))

				if len(row.Cells) < 41+1 {
					break
				}

				data.PlatformName = proto.String(row.Cells[41].String())

				if len(row.Cells) < 42+1 {
					break
				}

				arrStr = strings.Split(row.Cells[42].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[42].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.MaxBetCoin = arrInt

				if len(row.Cells) < 43+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[43].String(), 10, 32)
				data.PlayNumLimit = proto.Int32(int32(temp))

				if len(row.Cells) < 44+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[44].String(), 10, 32)
				data.CreateRoomNum = proto.Int32(int32(temp))

				if len(row.Cells) < 45+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[45].String(), 10, 32)
				data.MatchTrueMan = proto.Int32(int32(temp))

				if len(row.Cells) < 46+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[46].String(), 10, 32)
				data.PlayerWaterRate = proto.Int32(int32(temp))

				if len(row.Cells) < 47+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[47].String(), 10, 32)
				data.MatchMode = proto.Int32(int32(temp))

				if len(row.Cells) < 48+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[48].String(), 10, 32)
				data.KillingRate = proto.Int32(int32(temp))

				if len(row.Cells) < 49+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[49].String(), 10, 32)
				data.BetWaterRate = proto.Int32(int32(temp))

				if len(row.Cells) < 50+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[50].String(), 10, 32)
				data.Lottery = proto.Int32(int32(temp))

				if len(row.Cells) < 51+1 {
					break
				}

				data.LotteryConfig = proto.String(row.Cells[51].String())

				if len(row.Cells) < 52+1 {
					break
				}

				arrStr = strings.Split(row.Cells[52].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[52].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.BalanceLine = arrInt

				if len(row.Cells) < 53+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[53].String(), 10, 32)
				data.JackpotRatio = proto.Int32(int32(temp))

				if len(row.Cells) < 54+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[54].String(), 10, 32)
				data.JackpotMin = proto.Int32(int32(temp))

				if len(row.Cells) < 55+1 {
					break
				}

				arrStr = strings.Split(row.Cells[55].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[55].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.ChessGradeLimit = arrInt

				if len(row.Cells) < 56+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[56].String(), 10, 32)
				data.LeaveDeduct = proto.Int32(int32(temp))

				if len(row.Cells) < 57+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[57].String(), 10, 32)
				data.LeaveCombat = proto.Int32(int32(temp))

				if len(row.Cells) < 58+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[58].String(), 10, 32)
				data.IntuseCannonMin = proto.Int32(int32(temp))

				if len(row.Cells) < 59+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[59].String(), 10, 32)
				data.IntuseCannonMax = proto.Int32(int32(temp))

				if len(row.Cells) < 60+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[60].String(), 10, 32)
				data.BossDrainageBet = proto.Int32(int32(temp))

				if len(row.Cells) < 61+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[61].String(), 10, 32)
				data.Draw = proto.Int32(int32(temp))

				if len(row.Cells) < 62+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[62].String(), 10, 64)
				data.Fluctuate = proto.Int64(int64(temp))

				if len(row.Cells) < 63+1 {
					break
				}

				data.FluctuateMax = proto.String(row.Cells[63].String())

				if len(row.Cells) < 64+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[64].String(), 10, 32)
				data.Ratio = proto.Int32(int32(temp))

				if len(row.Cells) < 65+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[65].String(), 10, 64)
				data.MinValue = proto.Int64(int64(temp))

				if len(row.Cells) < 66+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[66].String(), 10, 64)
				data.MaxValue = proto.Int64(int64(temp))

				if len(row.Cells) < 67+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[67].String(), 10, 32)
				data.DrainageBet = proto.Int32(int32(temp))

				if len(row.Cells) < 68+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[68].String(), 10, 32)
				data.DiamondDrop = proto.Int32(int32(temp))

				if len(row.Cells) < 69+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[69].String(), 10, 32)
				data.NegativeMax = proto.Int32(int32(temp))

				if len(row.Cells) < 70+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[70].String(), 10, 32)
				data.RatioMax = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_GameItem(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_GameItemArray{
			Arr: make([]*server.DB_GameItem, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_GameItem{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Name = proto.String(row.Cells[1].String())

				if len(row.Cells) < 2+1 {
					break
				}

				arrStr = strings.Split(row.Cells[2].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[2].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.ShowLocation = arrInt

				if len(row.Cells) < 3+1 {
					break
				}

				arrStr = strings.Split(row.Cells[3].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[3].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Classify = arrInt

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.Type = proto.Int32(int32(temp))

				if len(row.Cells) < 5+1 {
					break
				}

				arrStr = strings.Split(row.Cells[5].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[5].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Effect0 = arrInt

				if len(row.Cells) < 6+1 {
					break
				}

				arrStr = strings.Split(row.Cells[6].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[6].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Effect = arrInt

				if len(row.Cells) < 7+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[7].String(), 10, 32)
				data.SaleType = proto.Int32(int32(temp))

				if len(row.Cells) < 8+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[8].String(), 10, 32)
				data.SaleGold = proto.Int32(int32(temp))

				if len(row.Cells) < 9+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[9].String(), 10, 32)
				data.Composition = proto.Int32(int32(temp))

				if len(row.Cells) < 10+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[10].String(), 10, 32)
				data.CompositionMax = proto.Int32(int32(temp))

				if len(row.Cells) < 11+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[11].String(), 10, 32)
				data.Time = proto.Int32(int32(temp))

				if len(row.Cells) < 12+1 {
					break
				}

				data.Location = proto.String(row.Cells[12].String())

				if len(row.Cells) < 13+1 {
					break
				}

				data.Describe = proto.String(row.Cells[13].String())

				if len(row.Cells) < 14+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[14].String(), 10, 64)
				data.Num = proto.Int64(int64(temp))

				if len(row.Cells) < 15+1 {
					break
				}

				data.Value = proto.String(row.Cells[15].String())

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_GameMatchLevel(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_GameMatchLevelArray{
			Arr: make([]*server.DB_GameMatchLevel, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_GameMatchLevel{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.GameFreeId = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.MatchLevel = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.RobotUpRatio = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				arrStr = strings.Split(row.Cells[4].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[4].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.UpGrade = arrInt

				if len(row.Cells) < 5+1 {
					break
				}

				arrStr = strings.Split(row.Cells[5].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[5].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.UpGradeOdds = arrInt

				if len(row.Cells) < 6+1 {
					break
				}

				arrStr = strings.Split(row.Cells[6].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[6].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.DownGrade = arrInt

				if len(row.Cells) < 7+1 {
					break
				}

				arrStr = strings.Split(row.Cells[7].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[7].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.DownGradeOdds = arrInt

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_GameRule(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_GameRuleArray{
			Arr: make([]*server.DB_GameRule, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_GameRule{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Name = proto.String(row.Cells[1].String())

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.GameId = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.GameMode = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				arrStr = strings.Split(row.Cells[4].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[4].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Params = arrInt

				if len(row.Cells) < 5+1 {
					break
				}

				data.RuleDesc = proto.String(row.Cells[5].String())

				if len(row.Cells) < 6+1 {
					break
				}

				data.GameDif = proto.String(row.Cells[6].String())

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_GameSubsidy(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_GameSubsidyArray{
			Arr: make([]*server.DB_GameSubsidy, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_GameSubsidy{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.LimitNum = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.Get = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.Times = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_Game_Drop(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_Game_DropArray{
			Arr: make([]*server.DB_Game_Drop, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_Game_Drop{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.GameId = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.Bet = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.ItemName1 = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.ItemId1 = proto.Int32(int32(temp))

				if len(row.Cells) < 5+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[5].String(), 10, 32)
				data.Rate1 = proto.Int32(int32(temp))

				if len(row.Cells) < 6+1 {
					break
				}

				arrStr = strings.Split(row.Cells[6].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[6].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Amount1 = arrInt

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_Game_Introduction(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_Game_IntroductionArray{
			Arr: make([]*server.DB_Game_Introduction, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_Game_Introduction{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.Type = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				data.Name = proto.String(row.Cells[2].String())

				if len(row.Cells) < 3+1 {
					break
				}

				data.Story = proto.String(row.Cells[3].String())

				if len(row.Cells) < 4+1 {
					break
				}

				data.AwardTitle = proto.String(row.Cells[4].String())

				if len(row.Cells) < 5+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[5].String(), 10, 32)
				data.LevelMax = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_Game_Pet(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_Game_PetArray{
			Arr: make([]*server.DB_Game_Pet, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_Game_Pet{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.PetId = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				data.Name = proto.String(row.Cells[2].String())

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.Grade = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.Level = proto.Int32(int32(temp))

				if len(row.Cells) < 5+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[5].String(), 10, 32)
				data.Fragment = proto.Int32(int32(temp))

				if len(row.Cells) < 6+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[6].String(), 10, 32)
				data.Amount = proto.Int32(int32(temp))

				if len(row.Cells) < 7+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[7].String(), 10, 32)
				data.AwardType = proto.Int32(int32(temp))

				if len(row.Cells) < 8+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[8].String(), 10, 32)
				data.Award = proto.Int32(int32(temp))

				if len(row.Cells) < 9+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[9].String(), 10, 32)
				data.AwardRate = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_Game_Role(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_Game_RoleArray{
			Arr: make([]*server.DB_Game_Role, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_Game_Role{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.RoleId = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				data.Name = proto.String(row.Cells[2].String())

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.Grade = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.Level = proto.Int32(int32(temp))

				if len(row.Cells) < 5+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[5].String(), 10, 32)
				data.Fragment = proto.Int32(int32(temp))

				if len(row.Cells) < 6+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[6].String(), 10, 32)
				data.Amount = proto.Int32(int32(temp))

				if len(row.Cells) < 7+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[7].String(), 10, 32)
				data.AwardType = proto.Int32(int32(temp))

				if len(row.Cells) < 8+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[8].String(), 10, 32)
				data.Award = proto.Int32(int32(temp))

				if len(row.Cells) < 9+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[9].String(), 10, 32)
				data.AwardRate = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_GiftBox(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_GiftBoxArray{
			Arr: make([]*server.DB_GiftBox, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_GiftBox{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.Rate = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				if row.Cells[2].String() != "" {
					pairs := strings.Split(row.Cells[2].String(), ";")
					resultMap := make(map[int64]int64)
					for _, pair := range pairs {
						kv := strings.Split(pair, ",")
						key, err := strconv.ParseInt(kv[0], 10, 64)
						if err != nil {
							// 错误处理
							fmt.Println("无法转换为int64:", kv[0])
							continue
						}
						value, err := strconv.ParseInt(kv[1], 10, 64)
						if err != nil {
							// 错误处理
							fmt.Println("无法转换为int64:", kv[1])
							continue
						}
						resultMap[key] = value
					}
					data.ItemID = resultMap
				}

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_IceAgeElementRate(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_IceAgeElementRateArray{
			Arr: make([]*server.DB_IceAgeElementRate, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_IceAgeElementRate{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.ModeName = proto.String(row.Cells[1].String())

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.ModeType = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				arrStr = strings.Split(row.Cells[3].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[3].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Params = arrInt

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_Legend_Odds(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_Legend_OddsArray{
			Arr: make([]*server.DB_Legend_Odds, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_Legend_Odds{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Name = proto.String(row.Cells[1].String())

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.Rateodds3 = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.Rateodds4 = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.Rateodds5 = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_Legend_TurnRate(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_Legend_TurnRateArray{
			Arr: make([]*server.DB_Legend_TurnRate, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_Legend_TurnRate{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.ReturnRateMin = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.ReturnRateMax = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				arrStr = strings.Split(row.Cells[3].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[3].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Chance = arrInt

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_Legend_Weight(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_Legend_WeightArray{
			Arr: make([]*server.DB_Legend_Weight, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_Legend_Weight{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Name = proto.String(row.Cells[1].String())

				if len(row.Cells) < 2+1 {
					break
				}

				arrStr = strings.Split(row.Cells[2].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[2].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Weight = arrInt

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_Legend_WeightCondition(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_Legend_WeightConditionArray{
			Arr: make([]*server.DB_Legend_WeightCondition, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_Legend_WeightCondition{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.IsNew = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				arrStr = strings.Split(row.Cells[2].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[2].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.BetScope = arrInt

				if len(row.Cells) < 3+1 {
					break
				}

				arrStr = strings.Split(row.Cells[3].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[3].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.TrueCalcRate = arrInt

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.WeightId = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_MatchRank(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_MatchRankArray{
			Arr: make([]*server.DB_MatchRank, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_MatchRank{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				arrStr = strings.Split(row.Cells[1].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[1].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.RankStar = arrInt

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_Name(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_NameArray{
			Arr: make([]*server.DB_Name, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_Name{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Name = proto.String(row.Cells[1].String())

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_NameBoy(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_NameBoyArray{
			Arr: make([]*server.DB_NameBoy, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_NameBoy{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Name = proto.String(row.Cells[1].String())

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_NameGirl(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_NameGirlArray{
			Arr: make([]*server.DB_NameGirl, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_NameGirl{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Name = proto.String(row.Cells[1].String())

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_NewPlayer(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_NewPlayerArray{
			Arr: make([]*server.DB_NewPlayer, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_NewPlayer{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.Condition1 = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 64)
				data.ConditionValue1 = proto.Int64(int64(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.Condition2 = proto.Int32(int32(temp))

				if len(row.Cells) < 5+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[5].String(), 10, 64)
				data.ConditionValue2 = proto.Int64(int64(temp))

				if len(row.Cells) < 6+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[6].String(), 10, 32)
				data.Bond = proto.Int32(int32(temp))

				if len(row.Cells) < 7+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[7].String(), 10, 32)
				data.AddType = proto.Int32(int32(temp))

				if len(row.Cells) < 8+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[8].String(), 10, 64)
				data.AddMax = proto.Int64(int64(temp))

				if len(row.Cells) < 9+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[9].String(), 10, 64)
				data.AddMin = proto.Int64(int64(temp))

				if len(row.Cells) < 10+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[10].String(), 10, 32)
				data.TianHuRate = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_PhoneLottery(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_PhoneLotteryArray{
			Arr: make([]*server.DB_PhoneLottery, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_PhoneLottery{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.Type = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.Name = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.Item_Id = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.Grade = proto.Int32(int32(temp))

				if len(row.Cells) < 5+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[5].String(), 10, 32)
				data.Odd = proto.Int32(int32(temp))

				if len(row.Cells) < 6+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[6].String(), 10, 32)
				data.Oddrate1 = proto.Int32(int32(temp))

				if len(row.Cells) < 7+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[7].String(), 10, 32)
				data.Odd2 = proto.Int32(int32(temp))

				if len(row.Cells) < 8+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[8].String(), 10, 32)
				data.Oddrate2 = proto.Int32(int32(temp))

				if len(row.Cells) < 9+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[9].String(), 10, 32)
				data.Odd3 = proto.Int32(int32(temp))

				if len(row.Cells) < 10+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[10].String(), 10, 32)
				data.Oddrate3 = proto.Int32(int32(temp))

				if len(row.Cells) < 11+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[11].String(), 10, 32)
				data.Oddrate4 = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_PlayerExp(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_PlayerExpArray{
			Arr: make([]*server.DB_PlayerExp, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_PlayerExp{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.Exp = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_PlayerInfo(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_PlayerInfoArray{
			Arr: make([]*server.DB_PlayerInfo, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_PlayerInfo{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				data.City = proto.String(row.Cells[0].String())

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.Head = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				data.Name = proto.String(row.Cells[2].String())

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.Sex = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_PlayerType(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_PlayerTypeArray{
			Arr: make([]*server.DB_PlayerType, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_PlayerType{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Name = proto.String(row.Cells[1].String())

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.GameFreeId = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.PayLowerLimit = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.PayUpperLimit = proto.Int32(int32(temp))

				if len(row.Cells) < 5+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[5].String(), 10, 32)
				data.GameTimeLowerLimit = proto.Int32(int32(temp))

				if len(row.Cells) < 6+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[6].String(), 10, 32)
				data.GameTimeUpperLimit = proto.Int32(int32(temp))

				if len(row.Cells) < 7+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[7].String(), 10, 32)
				data.TotalInLowerLimit = proto.Int32(int32(temp))

				if len(row.Cells) < 8+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[8].String(), 10, 32)
				data.TotalInUpperLimit = proto.Int32(int32(temp))

				if len(row.Cells) < 9+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[9].String(), 10, 32)
				data.OddsLowerLimit = proto.Int32(int32(temp))

				if len(row.Cells) < 10+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[10].String(), 10, 32)
				data.OddsUpperLimit = proto.Int32(int32(temp))

				if len(row.Cells) < 11+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[11].String(), 10, 32)
				data.LuckyRate = proto.Int32(int32(temp))

				if len(row.Cells) < 12+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[12].String(), 10, 32)
				data.ChangeCardRate = proto.Int32(int32(temp))

				if len(row.Cells) < 13+1 {
					break
				}

				arrStr = strings.Split(row.Cells[13].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[13].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.CardValueRange = arrInt

				if len(row.Cells) < 14+1 {
					break
				}

				arrStr = strings.Split(row.Cells[14].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[14].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.MatchPriority = arrInt

				if len(row.Cells) < 15+1 {
					break
				}

				arrStr = strings.Split(row.Cells[15].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[15].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.ExcludeMatch = arrInt

				if len(row.Cells) < 16+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[16].String(), 10, 32)
				data.CardLibRate = proto.Int32(int32(temp))

				if len(row.Cells) < 17+1 {
					break
				}

				arrStr = strings.Split(row.Cells[17].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[17].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.CardLibArr = arrInt

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_PotOdd(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_PotOddArray{
			Arr: make([]*server.DB_PotOdd, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_PotOdd{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Name = proto.String(row.Cells[1].String())

				if len(row.Cells) < 2+1 {
					break
				}

				data.Title = proto.String(row.Cells[2].String())

				if len(row.Cells) < 3+1 {
					break
				}

				arrStr = strings.Split(row.Cells[3].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[3].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.VipOdd = arrInt

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_RankCycle(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_RankCycleArray{
			Arr: make([]*server.DB_RankCycle, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_RankCycle{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Start = proto.String(row.Cells[1].String())

				if len(row.Cells) < 2+1 {
					break
				}

				data.End = proto.String(row.Cells[2].String())

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_RankLevel(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_RankLevelArray{
			Arr: make([]*server.DB_RankLevel, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_RankLevel{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.RankType = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.Level = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				data.Name = proto.String(row.Cells[3].String())

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 64)
				data.Score = proto.Int64(int64(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_RankReward(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_RankRewardArray{
			Arr: make([]*server.DB_RankReward, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_RankReward{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.RankType = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.Level = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.Award1Id = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.Award1Num = proto.Int32(int32(temp))

				if len(row.Cells) < 5+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[5].String(), 10, 32)
				data.Award2Id = proto.Int32(int32(temp))

				if len(row.Cells) < 6+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[6].String(), 10, 32)
				data.Award2Num = proto.Int32(int32(temp))

				if len(row.Cells) < 7+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[7].String(), 10, 32)
				data.Award3Id = proto.Int32(int32(temp))

				if len(row.Cells) < 8+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[8].String(), 10, 32)
				data.Award3Num = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_Sensitive_Words(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_Sensitive_WordsArray{
			Arr: make([]*server.DB_Sensitive_Words, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_Sensitive_Words{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Sensitive_Words = proto.String(row.Cells[1].String())

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_Shop(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_ShopArray{
			Arr: make([]*server.DB_Shop, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_Shop{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.VipLevel = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.ItemId = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.Page = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.Order = proto.Int32(int32(temp))

				if len(row.Cells) < 5+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[5].String(), 10, 32)
				data.Type = proto.Int32(int32(temp))

				if len(row.Cells) < 6+1 {
					break
				}

				arrStr = strings.Split(row.Cells[6].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[6].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Location = arrInt

				if len(row.Cells) < 7+1 {
					break
				}

				data.Picture = proto.String(row.Cells[7].String())

				if len(row.Cells) < 8+1 {
					break
				}

				data.Name = proto.String(row.Cells[8].String())

				if len(row.Cells) < 9+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[9].String(), 10, 32)
				data.Ad = proto.Int32(int32(temp))

				if len(row.Cells) < 10+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[10].String(), 10, 32)
				data.AdTime = proto.Int32(int32(temp))

				if len(row.Cells) < 11+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[11].String(), 10, 32)
				data.RepeatTimes = proto.Int32(int32(temp))

				if len(row.Cells) < 12+1 {
					break
				}

				arrStr = strings.Split(row.Cells[12].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[12].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.CoolingTime = arrInt

				if len(row.Cells) < 13+1 {
					break
				}

				arrStr = strings.Split(row.Cells[13].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[13].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Label = arrInt

				if len(row.Cells) < 14+1 {
					break
				}

				arrStr = strings.Split(row.Cells[14].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[14].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.AddArea = arrInt

				if len(row.Cells) < 15+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[15].String(), 10, 32)
				data.Ratio = proto.Int32(int32(temp))

				if len(row.Cells) < 16+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[16].String(), 10, 32)
				data.Amount = proto.Int32(int32(temp))

				if len(row.Cells) < 17+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[17].String(), 10, 32)
				data.CostType = proto.Int32(int32(temp))

				if len(row.Cells) < 18+1 {
					break
				}

				arrStr = strings.Split(row.Cells[18].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[18].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.CostArea = arrInt

				if len(row.Cells) < 19+1 {
					break
				}

				if row.Cells[19].String() != "" {
					pairs := strings.Split(row.Cells[19].String(), ";")
					resultMap := make(map[int64]int64)
					for _, pair := range pairs {
						kv := strings.Split(pair, ",")
						key, err := strconv.ParseInt(kv[0], 10, 64)
						if err != nil {
							// 错误处理
							fmt.Println("无法转换为int64:", kv[0])
							continue
						}
						value, err := strconv.ParseInt(kv[1], 10, 64)
						if err != nil {
							// 错误处理
							fmt.Println("无法转换为int64:", kv[1])
							continue
						}
						resultMap[key] = value
					}
					data.Award = resultMap
				}

				if len(row.Cells) < 20+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[20].String(), 10, 32)
				data.EndTime = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_SlotRateWeight(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_SlotRateWeightArray{
			Arr: make([]*server.DB_SlotRateWeight, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_SlotRateWeight{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.GameFreeId = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.Pos = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				arrStr = strings.Split(row.Cells[3].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[3].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.NormCol1 = arrInt

				if len(row.Cells) < 4+1 {
					break
				}

				arrStr = strings.Split(row.Cells[4].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[4].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.NormCol2 = arrInt

				if len(row.Cells) < 5+1 {
					break
				}

				arrStr = strings.Split(row.Cells[5].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[5].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.NormCol3 = arrInt

				if len(row.Cells) < 6+1 {
					break
				}

				arrStr = strings.Split(row.Cells[6].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[6].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.NormCol4 = arrInt

				if len(row.Cells) < 7+1 {
					break
				}

				arrStr = strings.Split(row.Cells[7].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[7].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.NormCol5 = arrInt

				if len(row.Cells) < 8+1 {
					break
				}

				arrStr = strings.Split(row.Cells[8].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[8].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.FreeCol1 = arrInt

				if len(row.Cells) < 9+1 {
					break
				}

				arrStr = strings.Split(row.Cells[9].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[9].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.FreeCol2 = arrInt

				if len(row.Cells) < 10+1 {
					break
				}

				arrStr = strings.Split(row.Cells[10].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[10].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.FreeCol3 = arrInt

				if len(row.Cells) < 11+1 {
					break
				}

				arrStr = strings.Split(row.Cells[11].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[11].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.FreeCol4 = arrInt

				if len(row.Cells) < 12+1 {
					break
				}

				arrStr = strings.Split(row.Cells[12].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[12].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.FreeCol5 = arrInt

				if len(row.Cells) < 13+1 {
					break
				}

				arrStr = strings.Split(row.Cells[13].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[13].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.MaryOut = arrInt

				if len(row.Cells) < 14+1 {
					break
				}

				arrStr = strings.Split(row.Cells[14].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[14].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.MaryMid = arrInt

				if len(row.Cells) < 15+1 {
					break
				}

				arrStr = strings.Split(row.Cells[15].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[15].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.JackPot = arrInt

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_SystemChance(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_SystemChanceArray{
			Arr: make([]*server.DB_SystemChance, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_SystemChance{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Desc = proto.String(row.Cells[1].String())

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.ChanceType = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.Coin = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.Rate = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_Task(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_TaskArray{
			Arr: make([]*server.DB_Task, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_Task{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.ActivityType = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[4].String(), 10, 32)
				data.TaskType = proto.Int32(int32(temp))

				if len(row.Cells) < 5+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[5].String(), 10, 64)
				data.TargetTimes = proto.Int64(int64(temp))

				if len(row.Cells) < 6+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[6].String(), 10, 64)
				data.FinishTimes = proto.Int64(int64(temp))

				if len(row.Cells) < 7+1 {
					break
				}

				if row.Cells[7].String() != "" {
					pairs := strings.Split(row.Cells[7].String(), ";")
					resultMap := make(map[int64]int64)
					for _, pair := range pairs {
						kv := strings.Split(pair, ",")
						key, err := strconv.ParseInt(kv[0], 10, 64)
						if err != nil {
							// 错误处理
							fmt.Println("无法转换为int64:", kv[0])
							continue
						}
						value, err := strconv.ParseInt(kv[1], 10, 64)
						if err != nil {
							// 错误处理
							fmt.Println("无法转换为int64:", kv[1])
							continue
						}
						resultMap[key] = value
					}
					data.Award = resultMap
				}

				if len(row.Cells) < 8+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[8].String(), 10, 32)
				data.GameType = proto.Int32(int32(temp))

				if len(row.Cells) < 9+1 {
					break
				}

				arrStr = strings.Split(row.Cells[9].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[9].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Position = arrInt

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_ThirdPlatformGameMapping(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_ThirdPlatformGameMappingArray{
			Arr: make([]*server.DB_ThirdPlatformGameMapping, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_ThirdPlatformGameMapping{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[1].String(), 10, 32)
				data.SystemGameID = proto.Int32(int32(temp))

				if len(row.Cells) < 2+1 {
					break
				}

				data.ThirdPlatformName = proto.String(row.Cells[2].String())

				if len(row.Cells) < 3+1 {
					break
				}

				data.ThirdGameID = proto.String(row.Cells[3].String())

				if len(row.Cells) < 4+1 {
					break
				}

				data.Desc = proto.String(row.Cells[4].String())

				if len(row.Cells) < 5+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[5].String(), 10, 32)
				data.ScreenOrientationType = proto.Int32(int32(temp))

				if len(row.Cells) < 6+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[6].String(), 10, 32)
				data.ThirdID = proto.Int32(int32(temp))

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_Tips(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_TipsArray{
			Arr: make([]*server.DB_Tips, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_Tips{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				arrStr = strings.Split(row.Cells[1].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[1].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.GameId = arrInt

				if len(row.Cells) < 2+1 {
					break
				}

				data.Des = proto.String(row.Cells[2].String())

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func AgcConvertDB_VIP(fi, fo string) {
	xlsxFile, err := xlsx.OpenFile(fi)
	if err != nil {
		fmt.Println("excel file open error:", err, "filename:", fi)
		return
	}

	if err := recover(); err != nil {
		fmt.Println(" panic,error=", err)
		var buf [4096]byte
		lens := runtime.Stack(buf[:], false)
		fmt.Println("stack--->", string(buf[:lens]))
	}
	for _, sheet := range xlsxFile.Sheets {
		arr := &server.DB_VIPArray{
			Arr: make([]*server.DB_VIP, 0, len(sheet.Rows)),
		}

		for i, row := range sheet.Rows {
			if i <= 1 {
				continue
			}

			if len(row.Cells) == 0 {
				break
			}

			temp := int64(0)
			var arrInt []int32
			var arrInt64 []int64
			var arrStr []string
			var _ = arrInt
			var _ = arrStr
			var _ = arrInt64

			temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
			data := &server.DB_VIP{}

			for {

				if len(row.Cells) < 0+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[0].String(), 10, 32)
				data.Id = proto.Int32(int32(temp))

				if len(row.Cells) < 1+1 {
					break
				}

				data.Name = proto.String(row.Cells[1].String())

				if len(row.Cells) < 2+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[2].String(), 10, 32)
				data.Count = proto.Int32(int32(temp))

				if len(row.Cells) < 3+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[3].String(), 10, 32)
				data.VipExp = proto.Int32(int32(temp))

				if len(row.Cells) < 4+1 {
					break
				}

				arrStr = strings.Split(row.Cells[4].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[4].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Privilege1 = arrInt

				if len(row.Cells) < 5+1 {
					break
				}

				arrStr = strings.Split(row.Cells[5].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[5].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Privilege2 = arrInt

				if len(row.Cells) < 6+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[6].String(), 10, 32)
				data.ShopId2 = proto.Int32(int32(temp))

				if len(row.Cells) < 7+1 {
					break
				}

				arrStr = strings.Split(row.Cells[7].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[7].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Privilege3 = arrInt

				if len(row.Cells) < 8+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[8].String(), 10, 32)
				data.Privilege4 = proto.Int32(int32(temp))

				if len(row.Cells) < 9+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[9].String(), 10, 32)
				data.Privilege5 = proto.Int32(int32(temp))

				if len(row.Cells) < 10+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[10].String(), 10, 32)
				data.Privilege6 = proto.Int32(int32(temp))

				if len(row.Cells) < 11+1 {
					break
				}

				if row.Cells[11].String() != "" {
					pairs := strings.Split(row.Cells[11].String(), ";")
					resultMap := make(map[int64]int64)
					for _, pair := range pairs {
						kv := strings.Split(pair, ",")
						key, err := strconv.ParseInt(kv[0], 10, 64)
						if err != nil {
							// 错误处理
							fmt.Println("无法转换为int64:", kv[0])
							continue
						}
						value, err := strconv.ParseInt(kv[1], 10, 64)
						if err != nil {
							// 错误处理
							fmt.Println("无法转换为int64:", kv[1])
							continue
						}
						resultMap[key] = value
					}
					data.Privilege7 = resultMap
				}

				if len(row.Cells) < 12+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[12].String(), 10, 32)
				data.Privilege7Price = proto.Int32(int32(temp))

				if len(row.Cells) < 13+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[13].String(), 10, 32)
				data.ShopId7 = proto.Int32(int32(temp))

				if len(row.Cells) < 14+1 {
					break
				}

				temp, _ = strconv.ParseInt(row.Cells[14].String(), 10, 32)
				data.Privilege8 = proto.Int32(int32(temp))

				if len(row.Cells) < 15+1 {
					break
				}

				arrStr = strings.Split(row.Cells[15].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[15].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.Param = arrInt

				if len(row.Cells) < 16+1 {
					break
				}

				arrStr = strings.Split(row.Cells[16].String(), "|")
				arrInt = nil
				if len(arrStr) > 0 && row.Cells[16].String() != "" {
					arrInt = make([]int32, len(arrStr), len(arrStr))
					for i, v := range arrStr {
						temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32)
						arrInt[i] = int32(temp)
					}
				}
				data.RewardOutlineID = arrInt

				if len(row.Cells) < 17+1 {
					break
				}

				if row.Cells[17].String() != "" {
					pairs := strings.Split(row.Cells[17].String(), ";")
					resultMap := make(map[int64]int64)
					for _, pair := range pairs {
						kv := strings.Split(pair, ",")
						key, err := strconv.ParseInt(kv[0], 10, 64)
						if err != nil {
							// 错误处理
							fmt.Println("无法转换为int64:", kv[0])
							continue
						}
						value, err := strconv.ParseInt(kv[1], 10, 64)
						if err != nil {
							// 错误处理
							fmt.Println("无法转换为int64:", kv[1])
							continue
						}
						resultMap[key] = value
					}
					data.Award = resultMap
				}

				if len(row.Cells) < 18+1 {
					break
				}

				if row.Cells[18].String() != "" {
					arrStr = strings.Split(row.Cells[18].String(), "|")
					data.ParamName = arrStr
				}

				break
			}
			arr.Arr = append(arr.Arr, data)
		}

		byteData, err := proto.Marshal(arr)
		if err == nil {
			err := os.WriteFile(fo, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}

		byteData, err = json.MarshalIndent(arr, "", "\t")
		if err == nil {
			foJson := strings.Replace(fo, ".dat", ".json", -1)
			err := os.WriteFile(foJson, byteData, os.ModePerm)
			if err != nil {
				fmt.Println(err)
			}
		}
		break //only fetch first sheet
	}
}

func main() {

	AgcConvertDB_ActSign(`D:\trunk\src\games.yol.com\win88\xlsx\DB_ActSign.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_ActSign.dat`)

	AgcConvertDB_Activity1(`D:\trunk\src\games.yol.com\win88\xlsx\DB_Activity1.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_Activity1.dat`)

	AgcConvertDB_AnimalColor(`D:\trunk\src\games.yol.com\win88\xlsx\DB_AnimalColor.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_AnimalColor.dat`)

	AgcConvertDB_ArtilleryRate(`D:\trunk\src\games.yol.com\win88\xlsx\DB_ArtilleryRate.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_ArtilleryRate.dat`)

	AgcConvertDB_ArtillerySkin(`D:\trunk\src\games.yol.com\win88\xlsx\DB_ArtillerySkin.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_ArtillerySkin.dat`)

	AgcConvertDB_BlackWhite(`D:\trunk\src\games.yol.com\win88\xlsx\DB_BlackWhite.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_BlackWhite.dat`)

	AgcConvertDB_CardsJD(`D:\trunk\src\games.yol.com\win88\xlsx\DB_CardsJD.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_CardsJD.dat`)

	AgcConvertDB_CardsYuLe(`D:\trunk\src\games.yol.com\win88\xlsx\DB_CardsYuLe.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_CardsYuLe.dat`)

	AgcConvertDB_ChessBilledRules(`D:\trunk\src\games.yol.com\win88\xlsx\DB_ChessBilledRules.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_ChessBilledRules.dat`)

	AgcConvertDB_ChessMatchRules(`D:\trunk\src\games.yol.com\win88\xlsx\DB_ChessMatchRules.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_ChessMatchRules.dat`)

	AgcConvertDB_ChessRank(`D:\trunk\src\games.yol.com\win88\xlsx\DB_ChessRank.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_ChessRank.dat`)

	AgcConvertDB_ClientVer(`D:\trunk\src\games.yol.com\win88\xlsx\DB_ClientVer.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_ClientVer.dat`)

	AgcConvertDB_CrashSearch(`D:\trunk\src\games.yol.com\win88\xlsx\DB_CrashSearch.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_CrashSearch.dat`)

	AgcConvertDB_Createroom(`D:\trunk\src\games.yol.com\win88\xlsx\DB_Createroom.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_Createroom.dat`)

	AgcConvertDB_Fish(`D:\trunk\src\games.yol.com\win88\xlsx\DB_Fish.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_Fish.dat`)

	AgcConvertDB_FishOut(`D:\trunk\src\games.yol.com\win88\xlsx\DB_FishOut.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_FishOut.dat`)

	AgcConvertDB_FishPath(`D:\trunk\src\games.yol.com\win88\xlsx\DB_FishPath.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_FishPath.dat`)

	AgcConvertDB_FishRoom(`D:\trunk\src\games.yol.com\win88\xlsx\DB_FishRoom.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_FishRoom.dat`)

	AgcConvertDB_FishSkill(`D:\trunk\src\games.yol.com\win88\xlsx\DB_FishSkill.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_FishSkill.dat`)

	AgcConvertDB_FortuneGod_Odds(`D:\trunk\src\games.yol.com\win88\xlsx\DB_FortuneGod_Odds.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_FortuneGod_Odds.dat`)

	AgcConvertDB_FortuneGod_TurnRate(`D:\trunk\src\games.yol.com\win88\xlsx\DB_FortuneGod_TurnRate.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_FortuneGod_TurnRate.dat`)

	AgcConvertDB_FortuneGod_Weight(`D:\trunk\src\games.yol.com\win88\xlsx\DB_FortuneGod_Weight.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_FortuneGod_Weight.dat`)

	AgcConvertDB_FortuneGod_WeightCondition(`D:\trunk\src\games.yol.com\win88\xlsx\DB_FortuneGod_WeightCondition.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_FortuneGod_WeightCondition.dat`)

	AgcConvertDB_GamMatchLV(`D:\trunk\src\games.yol.com\win88\xlsx\DB_GamMatchLV.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_GamMatchLV.dat`)

	AgcConvertDB_GameCoinPool(`D:\trunk\src\games.yol.com\win88\xlsx\DB_GameCoinPool.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_GameCoinPool.dat`)

	AgcConvertDB_GameFree(`D:\trunk\src\games.yol.com\win88\xlsx\DB_GameFree.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_GameFree.dat`)

	AgcConvertDB_GameItem(`D:\trunk\src\games.yol.com\win88\xlsx\DB_GameItem.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_GameItem.dat`)

	AgcConvertDB_GameMatchLevel(`D:\trunk\src\games.yol.com\win88\xlsx\DB_GameMatchLevel.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_GameMatchLevel.dat`)

	AgcConvertDB_GameRule(`D:\trunk\src\games.yol.com\win88\xlsx\DB_GameRule.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_GameRule.dat`)

	AgcConvertDB_GameSubsidy(`D:\trunk\src\games.yol.com\win88\xlsx\DB_GameSubsidy.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_GameSubsidy.dat`)

	AgcConvertDB_Game_Drop(`D:\trunk\src\games.yol.com\win88\xlsx\DB_Game_Drop.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_Game_Drop.dat`)

	AgcConvertDB_Game_Introduction(`D:\trunk\src\games.yol.com\win88\xlsx\DB_Game_Introduction.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_Game_Introduction.dat`)

	AgcConvertDB_Game_Pet(`D:\trunk\src\games.yol.com\win88\xlsx\DB_Game_Pet.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_Game_Pet.dat`)

	AgcConvertDB_Game_Role(`D:\trunk\src\games.yol.com\win88\xlsx\DB_Game_Role.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_Game_Role.dat`)

	AgcConvertDB_GiftBox(`D:\trunk\src\games.yol.com\win88\xlsx\DB_GiftBox.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_GiftBox.dat`)

	AgcConvertDB_IceAgeElementRate(`D:\trunk\src\games.yol.com\win88\xlsx\DB_IceAgeElementRate.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_IceAgeElementRate.dat`)

	AgcConvertDB_Legend_Odds(`D:\trunk\src\games.yol.com\win88\xlsx\DB_Legend_Odds.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_Legend_Odds.dat`)

	AgcConvertDB_Legend_TurnRate(`D:\trunk\src\games.yol.com\win88\xlsx\DB_Legend_TurnRate.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_Legend_TurnRate.dat`)

	AgcConvertDB_Legend_Weight(`D:\trunk\src\games.yol.com\win88\xlsx\DB_Legend_Weight.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_Legend_Weight.dat`)

	AgcConvertDB_Legend_WeightCondition(`D:\trunk\src\games.yol.com\win88\xlsx\DB_Legend_WeightCondition.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_Legend_WeightCondition.dat`)

	AgcConvertDB_MatchRank(`D:\trunk\src\games.yol.com\win88\xlsx\DB_MatchRank.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_MatchRank.dat`)

	AgcConvertDB_Name(`D:\trunk\src\games.yol.com\win88\xlsx\DB_Name.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_Name.dat`)

	AgcConvertDB_NameBoy(`D:\trunk\src\games.yol.com\win88\xlsx\DB_NameBoy.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_NameBoy.dat`)

	AgcConvertDB_NameGirl(`D:\trunk\src\games.yol.com\win88\xlsx\DB_NameGirl.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_NameGirl.dat`)

	AgcConvertDB_NewPlayer(`D:\trunk\src\games.yol.com\win88\xlsx\DB_NewPlayer.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_NewPlayer.dat`)

	AgcConvertDB_PhoneLottery(`D:\trunk\src\games.yol.com\win88\xlsx\DB_PhoneLottery.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_PhoneLottery.dat`)

	AgcConvertDB_PlayerExp(`D:\trunk\src\games.yol.com\win88\xlsx\DB_PlayerExp.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_PlayerExp.dat`)

	AgcConvertDB_PlayerInfo(`D:\trunk\src\games.yol.com\win88\xlsx\DB_PlayerInfo.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_PlayerInfo.dat`)

	AgcConvertDB_PlayerType(`D:\trunk\src\games.yol.com\win88\xlsx\DB_PlayerType.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_PlayerType.dat`)

	AgcConvertDB_PotOdd(`D:\trunk\src\games.yol.com\win88\xlsx\DB_PotOdd.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_PotOdd.dat`)

	AgcConvertDB_RankCycle(`D:\trunk\src\games.yol.com\win88\xlsx\DB_RankCycle.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_RankCycle.dat`)

	AgcConvertDB_RankLevel(`D:\trunk\src\games.yol.com\win88\xlsx\DB_RankLevel.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_RankLevel.dat`)

	AgcConvertDB_RankReward(`D:\trunk\src\games.yol.com\win88\xlsx\DB_RankReward.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_RankReward.dat`)

	AgcConvertDB_Sensitive_Words(`D:\trunk\src\games.yol.com\win88\xlsx\DB_Sensitive_Words.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_Sensitive_Words.dat`)

	AgcConvertDB_Shop(`D:\trunk\src\games.yol.com\win88\xlsx\DB_Shop.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_Shop.dat`)

	AgcConvertDB_SlotRateWeight(`D:\trunk\src\games.yol.com\win88\xlsx\DB_SlotRateWeight.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_SlotRateWeight.dat`)

	AgcConvertDB_SystemChance(`D:\trunk\src\games.yol.com\win88\xlsx\DB_SystemChance.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_SystemChance.dat`)

	AgcConvertDB_Task(`D:\trunk\src\games.yol.com\win88\xlsx\DB_Task.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_Task.dat`)

	AgcConvertDB_ThirdPlatformGameMapping(`D:\trunk\src\games.yol.com\win88\xlsx\DB_ThirdPlatformGameMapping.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_ThirdPlatformGameMapping.dat`)

	AgcConvertDB_Tips(`D:\trunk\src\games.yol.com\win88\xlsx\DB_Tips.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_Tips.dat`)

	AgcConvertDB_VIP(`D:\trunk\src\games.yol.com\win88\xlsx\DB_VIP.xlsx`, `D:\trunk\src\games.yol.com\win88\data\DB_VIP.dat`)

}
