|
@@ -28,7 +28,7 @@ type RankPeriodEndTime struct { |
|
@@ -28,7 +28,7 @@ type RankPeriodEndTime struct { |
28
|
func AutoCreateRankPeriod() error {
|
28
|
func AutoCreateRankPeriod() error {
|
29
|
log.Info("计划任务:【自动创建赛季】")
|
29
|
log.Info("计划任务:【自动创建赛季】")
|
30
|
//获取需要执行自动创建的榜单记录
|
30
|
//获取需要执行自动创建的榜单记录
|
31
|
- sql1 := `ELECT a.id AS rank_type_id,a.auto_period,UNIX_TIMESTAMP(a.create_at) AS create_time
|
31
|
+ sql1 := `SELECT a.id AS rank_type_id,a.auto_period,UNIX_TIMESTAMP(a.create_at) AS create_time
|
32
|
,a.company_id
|
32
|
,a.company_id
|
33
|
FROM rank_type AS a
|
33
|
FROM rank_type AS a
|
34
|
JOIN company AS b ON a.company_id=b.id AND b.enable=1 AND b.delete_at=0
|
34
|
JOIN company AS b ON a.company_id=b.id AND b.enable=1 AND b.delete_at=0
|
|
@@ -98,6 +98,7 @@ LOOP0: |
|
@@ -98,6 +98,7 @@ LOOP0: |
98
|
CreateAt: nowTime,
|
98
|
CreateAt: nowTime,
|
99
|
UpdateAt: nowTime,
|
99
|
UpdateAt: nowTime,
|
100
|
Status: models.RANKPERIOD_STATUS_NOT,
|
100
|
Status: models.RANKPERIOD_STATUS_NOT,
|
|
|
101
|
+ IsAuto: 1,
|
101
|
}
|
102
|
}
|
102
|
if t, ok := rankPeriodMap[v.RankTypeId]; ok {
|
103
|
if t, ok := rankPeriodMap[v.RankTypeId]; ok {
|
103
|
s := time.Unix(t, 0).Format("2006-01-02")
|
104
|
s := time.Unix(t, 0).Format("2006-01-02")
|