|
@@ -194,14 +194,15 @@ func GetNewIndexAndDataFromJiaYue() (indexList []*response.IndexResp, err error)
|
|
|
//indexPars = append(indexPars, timeBefore.Format(utils.FormatDateTime))
|
|
|
|
|
|
// TODO:测试
|
|
|
- //dataCond += " AND INDEX_DATE >= TO_DATE (:1, 'yyyy-mm-dd')"
|
|
|
endTime := time.Date(2023, 6, 8, 0, 0, 0, 0, time.Local).Format(utils.FormatDateTime)
|
|
|
- indexCond += fmt.Sprintf(`CREATE_TIME <= TO_DATE ('%s', 'YYYY-MM-DD HH24:MI:SS')`, endTime)
|
|
|
- //indexPars = append(indexPars, endTime)
|
|
|
+ indexCond += fmt.Sprintf(`CREATE_TIME <= TO_DATE (:1, 'YYYY-MM-DD HH24:MI:SS')`)
|
|
|
+ indexPars = append(indexPars, endTime)
|
|
|
sourceArr := []string{"bloomberg", "bloomberg_tmp"}
|
|
|
if len(sourceArr) > 0 {
|
|
|
- indexCond += ` AND SOURCE_TYPE IN (:1)`
|
|
|
- indexPars = append(indexPars, sourceArr)
|
|
|
+ indexCond += fmt.Sprintf(` AND SOURCE_TYPE IN (%s)`, utils.GetOracleInReplace(len(sourceArr)))
|
|
|
+ for _, s := range sourceArr {
|
|
|
+ indexPars = append(indexPars, s)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
indexes, e := jiayue.GetDictIndex(indexCond, indexPars, "CREATE_TIME ASC")
|