作者 yangfu

榜单更新

@@ -102,7 +102,7 @@ func updateRankPeriodStatus(fromStatus int, toStatus int) { @@ -102,7 +102,7 @@ func updateRankPeriodStatus(fromStatus int, toStatus int) {
102 sql = `update rank_period set status=?,update_at=NOW() where status=? and UNIX_TIMESTAMP(end_time)<? ` 102 sql = `update rank_period set status=?,update_at=NOW() where status=? and UNIX_TIMESTAMP(end_time)<? `
103 ) 103 )
104 if toStatus == protocol.RankPeriodBegin { 104 if toStatus == protocol.RankPeriodBegin {
105 - sql = `update rank_period set status=?,update_at=NOW() where status=? and UNIX_TIMESTAMP(begin_time)>? ` 105 + sql = `update rank_period set status=?,update_at=NOW() where status=? and ?>UNIX_TIMESTAMP(begin_time) `
106 } 106 }
107 orm := orm.NewOrm() 107 orm := orm.NewOrm()
108 if _, err := orm.Raw(sql, toStatus, fromStatus, time.Now().Unix()).Exec(); err != nil { 108 if _, err := orm.Raw(sql, toStatus, fromStatus, time.Now().Unix()).Exec(); err != nil {