Browse Source

统计今日应更新

xyxie 1 year ago
parent
commit
9c071a0421
1 changed files with 3 additions and 2 deletions
  1. 3 2
      services/edb_info_stat.go

+ 3 - 2
services/edb_info_stat.go

@@ -116,9 +116,10 @@ func SetMysteelChemicalEdbInfoUpdateStat(needStat bool) (err error) {
 	weekNeedRefreshMap := make(map[string]struct{})
 	if week >= 3 && week <= 6 {
 		endDate := utils.GetNowWeekMonday().Format(utils.FormatDate)
-		cond := ` AND frequency = ? AND end_date < ? AND is_stop = 0`
+		nowDate := time.Now().Format(utils.FormatDate)
+		cond := ` AND frequency = ? AND (end_date < ? or end_date=?) AND is_stop = 0`
 		var tmpPars []interface{}
-		tmpPars = append(tmpPars, "周度", endDate)
+		tmpPars = append(tmpPars, "周度", endDate, nowDate)
 		//查询所有需要当日刷新的周度指标
 		indexTotal, tErr := indexObj.GetIndexByCondition(cond, tmpPars)
 		if tErr != nil {