MCPcopy Index your code
hub / github.com/FloatTech/ZeroBot-Plugin / GetScoreByUID

Method GetScoreByUID

plugin/score/model.go:71–77  ·  view source on GitHub ↗

GetScoreByUID 取得分数

(uid int64)

Source from the content-addressed store, hash-verified

69
70// GetScoreByUID 取得分数
71func (sdb *scoredb) GetScoreByUID(uid int64) (s scoretable) {
72 sdb.scoremu.Lock()
73 defer sdb.scoremu.Unlock()
74 db := sdb.db
75 db.Model(&scoretable{}).FirstOrCreate(&s, "uid = ? ", uid)
76 return s
77}
78
79// InsertOrUpdateScoreByUID 插入或更新分数
80func (sdb *scoredb) InsertOrUpdateScoreByUID(uid int64, score int) (err error) {

Callers 1

initFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected