GetSignInByUID 取得签到次数
(uid int64)
| 101 | |
| 102 | // GetSignInByUID 取得签到次数 |
| 103 | func (sdb *scoredb) GetSignInByUID(uid int64) (si signintable) { |
| 104 | sdb.scoremu.Lock() |
| 105 | defer sdb.scoremu.Unlock() |
| 106 | db := sdb.db |
| 107 | db.Model(&signintable{}).FirstOrCreate(&si, "uid = ? ", uid) |
| 108 | return si |
| 109 | } |
| 110 | |
| 111 | // InsertOrUpdateSignInCountByUID 插入或更新签到次数 |
| 112 | func (sdb *scoredb) InsertOrUpdateSignInCountByUID(uid int64, count int) (err error) { |