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

Method getUserEquip

plugin/mcfish/main.go:348–360  ·  view source on GitHub ↗

获取装备信息

(uid int64)

Source from the content-addressed store, hash-verified

346
347// 获取装备信息
348func (sql *fishdb) getUserEquip(uid int64) (userInfo equip, err error) {
349 sql.Lock()
350 defer sql.Unlock()
351 err = sql.db.Create("equips", &userInfo)
352 if err != nil {
353 return
354 }
355 if !sql.db.CanFind("equips", "WHERE ID = ?", uid) {
356 return
357 }
358 err = sql.db.Find("equips", &userInfo, "WHERE ID = ?", uid)
359 return
360}
361
362// 更新装备信息
363func (sql *fishdb) updateUserEquip(userInfo equip) (err error) {

Callers 3

initFunction · 0.80
initFunction · 0.80
initFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected