1 Star 0 Fork 0

liuxuezhan / mylib

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
CF_TransferBattleProcessingScoreReward.go 1.85 KB
一键复制 编辑 原始数据 按行查看 历史
liuxuezhan 提交于 2020-10-14 10:09 . 'new mylib'
package CSV
import (
"fmt"
"sort"
"gitee.com/liuxuezhan/mylib/Utils/wsort"
)
type CF_TransferBattleProcessingScoreReward_DataEntry struct {
ID int64
MainCityLevel int64
ScoreGoal string
RewardValue string
LeagueScoreGoal string
LeagueRewardValue string
}
type CF_TransferBattleProcessingScoreReward struct {
BaseManager
m_kDataEntryTable map[int64]*CF_TransferBattleProcessingScoreReward_DataEntry
m_kIdList []int64
}
func (this *CF_TransferBattleProcessingScoreReward) Init() {
this.m_kDataEntryTable = make(map[int64]*CF_TransferBattleProcessingScoreReward_DataEntry)
this.m_kIdList = make([]int64, 0)
kSqlCMD := "SELECT * FROM TransferBattleProcessingScoreReward"
if data, ok := sqliteconn.Query(kSqlCMD); ok {
for i := 0; i < len(data); i++ {
kNewEntry := new(CF_TransferBattleProcessingScoreReward_DataEntry)
kNewEntry.ID = ConvertToInt64(data[i]["ID"])
kNewEntry.MainCityLevel = ConvertToInt64(data[i]["MainCityLevel"])
kNewEntry.ScoreGoal = data[i]["ScoreGoal"]
kNewEntry.RewardValue = data[i]["RewardValue"]
kNewEntry.LeagueScoreGoal = data[i]["LeagueScoreGoal"]
kNewEntry.LeagueRewardValue = data[i]["LeagueRewardValue"]
this.m_kDataEntryTable[kNewEntry.ID] = kNewEntry
this.m_kIdList = append(this.m_kIdList, kNewEntry.ID)
}
} else {
fmt.Println("Query from db3 failed!")
}
sort.Sort(wsort.Int64Slice(this.m_kIdList))
}
func (this *CF_TransferBattleProcessingScoreReward) GetEntryPtr(id int64) *CF_TransferBattleProcessingScoreReward_DataEntry {
if !this.ContainsID(id) {
return nil
}
return this.m_kDataEntryTable[id]
}
func (this *CF_TransferBattleProcessingScoreReward) GetIDList() []int64 {
return this.m_kIdList
}
func (this *CF_TransferBattleProcessingScoreReward) ContainsID(id int64) bool {
if _, ok := this.m_kDataEntryTable[id]; ok {
return true
}
return false
}
1
https://gitee.com/liuxuezhan/mylib.git
git@gitee.com:liuxuezhan/mylib.git
liuxuezhan
mylib
mylib
v1.1.3

搜索帮助