Skip to content

Commit

Permalink
๐Ÿ› ไผ˜ๅŒ–ๅ็‰‡้€ป่พ‘
Browse files Browse the repository at this point in the history
  • Loading branch information
guohuiyuan committed May 22, 2024
1 parent 1d69f80 commit 051b9a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugin/chatcount/chatcount.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func init() {
text.WriteString("็ฌฌ")
text.WriteString(strconv.Itoa(i + 1))
text.WriteString("ๅ:")
text.WriteString(ctx.GetGroupMemberInfo(ctx.Event.GroupID, chatTimeList[i].UserID, false).Get("nickname").Str)
text.WriteString(ctx.CardOrNickName(chatTimeList[i].UserID))
text.WriteString(" - ")
text.WriteString(strconv.FormatInt(chatTimeList[i].TodayTime/60, 10))
text.WriteString("ๅˆ†้’Ÿ\n")
Expand Down
4 changes: 2 additions & 2 deletions plugin/chatcount/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (ctdb *chattimedb) updateChatTime(gid, uid int64) (todayTime int64, remindF
func (ctdb *chattimedb) getChatTime(gid, uid int64) (todayTime int64, totalTime int64) {
db := (*gorm.DB)(ctdb)
st := ChatTime{}
_ = db.Model(&ChatTime{}).Where("group_id = ? and user_id = ?", gid, uid).First(&st)
db.Model(&ChatTime{}).Where("group_id = ? and user_id = ?", gid, uid).First(&st)
todayTime = st.TodayTime / 60
totalTime = st.TotalTime / 60
return
Expand All @@ -114,7 +114,7 @@ func (ctdb *chattimedb) getChatTime(gid, uid int64) (todayTime int64, totalTime
// getChatRank ่Žทๅพ—ๆฐด็พคๆŽ’ๅ
func (ctdb *chattimedb) getChatRank(gid int64) (chatTimeList []ChatTime) {
db := (*gorm.DB)(ctdb)
_ = db.Model(&ChatTime{}).Where("group_id = ?", gid).Order("today_time DESC").Find(&chatTimeList)
db.Model(&ChatTime{}).Where("group_id = ?", gid).Order("today_time DESC").Find(&chatTimeList)
return
}

Expand Down

0 comments on commit 051b9a3

Please sign in to comment.