Commit 090a6c4f authored by hujiebin's avatar hujiebin

Update userNoble.go

parent 11bf81f5
......@@ -24,7 +24,7 @@ func (ub *UserNoble) UpdateEndTime(db *gorm.DB, endTime time.Time) (int64, error
// 延长贵族
func (ub *UserNoble) ExtenedEndTime(db *gorm.DB, day int) (int64, error) {
r := db.Model(&UserNoble{}).Where("id = ?", ub.ID).Update("end_time", gorm.Expr("DATE_ADD(end_time,INTERVAL ? day)", day))
r := db.Model(&UserNoble{}).Where("user_id = ? AND level = ?", ub.UserId, ub.Level).Update("end_time", gorm.Expr("DATE_ADD(end_time,INTERVAL ? day)", day))
return r.RowsAffected, r.Error
}
......
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