mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-12 18:20:27 +00:00
fix:修复sql错误 (#85)
* fix:捕获协程异常 * feat:添加睡眠时间 * feat:添加睡眠管理功能 * fix:修改对标时间 * fix:修复sql错误 * feat:添加书评功能 * fix:调整格式 * fix:去掉recover * feat:更新文档 Co-authored-by: Guohuiyuan <haibaraguo@yeahka.com>
This commit is contained in:
@@ -102,7 +102,7 @@ func (sdb *SleepDB) GetUp(groupId, userId int64) (position int, sleepTime time.D
|
||||
sleepTime = now.Sub(st.SleepTime)
|
||||
db.Debug().Model(&SleepManage{}).Where("group_id = ? and user_id = ?", groupId, userId).Update(
|
||||
map[string]interface{}{
|
||||
"get_up_time": now,
|
||||
"sleep_time": now,
|
||||
})
|
||||
}
|
||||
db.Debug().Model(&SleepManage{}).Where("group_id = ? and sleep_time <= ? and sleep_time >= ?", groupId, now, today).Count(&position)
|
||||
|
||||
Reference in New Issue
Block a user