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