Commit 5880cbca authored by chenweijian's avatar chenweijian

开斋节活动

parent 333269a1
......@@ -25,7 +25,7 @@ type UserOnMic struct {
// 允许返回gorm.ErrRecordNotFound
func GetUserOnMic(model *domain.Model, userId mysql.ID, tz timezone_e.Timezone) (*UserOnMic, error) {
res := new(UserOnMic)
day := time.Now().Format("2006-01-02")
day := time.Now().In(timezone_e.TimezoneLocMap[tz]).Format("2006-01-02")
if err := model.DB().Where("date = ? AND user_id = ? AND tz = ?", day, userId, tz).First(res).Error; err != nil {
return nil, err
}
......
......@@ -553,6 +553,8 @@ func OnMic() {
} else {
model.Log.Infof("cron micIn IncrUserOnMic success,userId:%v", event.UserId)
}
// 处理活动数据
go rpc.AddActPoint(model, event.UserId, 1)
return nil
})
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment