Merge pull request '🐛 Fix a bug.' (#19) from hotfix into main
All checks were successful
BuildImage / build-image (push) Successful in 1m15s
All checks were successful
BuildImage / build-image (push) Successful in 1m15s
Reviewed-on: #19
This commit is contained in:
commit
b46271a111
@ -1,7 +1,6 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"go-wechat/common/types"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -13,7 +12,7 @@ type Friend struct {
|
||||
Nickname string `json:"nickname"` // 昵称
|
||||
Pinyin string `json:"pinyin"` // 昵称拼音大写首字母
|
||||
PinyinAll string `json:"pinyinAll"` // 昵称全拼
|
||||
LastActive types.DateTime `json:"lastActive"` // 最后活跃时间
|
||||
LastActive time.Time `json:"lastActive"` // 最后活跃时间
|
||||
EnableAi bool `json:"enableAI" gorm:"type:tinyint(1) default 0 not null"` // 是否使用AI
|
||||
AiModel string `json:"aiModel"` // AI模型
|
||||
EnableChatRank bool `json:"enableChatRank" gorm:"type:tinyint(1) default 0 not null"` // 是否使用聊天排行
|
||||
|
@ -73,7 +73,7 @@ func updateLastActive(msg entity.Message) {
|
||||
err = client.MySQL.Model(&entity.GroupUser{}).
|
||||
Where("group_id = ?", msg.FromUser).
|
||||
Where("wxid = ?", msg.GroupUser).
|
||||
Update("last_active", msg.CreateTime).Error
|
||||
Update("last_active", msg.CreateAt).Error
|
||||
if err != nil {
|
||||
log.Printf("更新群成员最后活跃时间失败, 错误信息: %v", err)
|
||||
}
|
||||
@ -81,7 +81,7 @@ func updateLastActive(msg entity.Message) {
|
||||
// 更新群或者好友活跃时间
|
||||
err = client.MySQL.Model(&entity.Friend{}).
|
||||
Where("wxid = ?", msg.FromUser).
|
||||
Update("last_active", msg.CreateTime).Error
|
||||
Update("last_active", msg.CreateAt).Error
|
||||
if err != nil {
|
||||
log.Printf("更新群或者好友活跃时间失败, 错误信息: %v", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user