|
@@ -64,10 +64,10 @@ func RefreshEdbDataFromFubao(edbInfoId int, edbCode, startDate string, fubaoData
|
|
|
|
|
|
existCondition += " AND edb_info_id=? "
|
|
|
existPars = append(existPars, edbInfoId)
|
|
|
- if startDate != "" {
|
|
|
- existCondition += " AND data_time>=? "
|
|
|
- existPars = append(existPars, startDate)
|
|
|
- }
|
|
|
+ //if startDate != "" {
|
|
|
+ // existCondition += " AND data_time>=? "
|
|
|
+ // existPars = append(existPars, startDate)
|
|
|
+ //}
|
|
|
|
|
|
existList, err := GetEdbDataByCondition(source, existCondition, existPars)
|
|
|
if err != nil {
|
|
@@ -87,17 +87,12 @@ func RefreshEdbDataFromFubao(edbInfoId int, edbCode, startDate string, fubaoData
|
|
|
addSql := ` INSERT INTO edb_data_fubao(edb_info_id,edb_code,data_time,value,create_time,modify_time,data_timestamp) values `
|
|
|
var isAdd bool
|
|
|
|
|
|
- for k, dataItem := range fubaoData.ReturnValue.Data {
|
|
|
+ for _, dataItem := range fubaoData.ReturnValue.Data {
|
|
|
|
|
|
dataTime, err := time.ParseInLocation(utils.FormatDate, dataItem.Datadate, time.Local)
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|
|
|
- if k < 3 {
|
|
|
- fmt.Println("dataItem.Datadate start")
|
|
|
- fmt.Println(dataItem.Datadate)
|
|
|
- fmt.Println("dataItem.Datadate end")
|
|
|
- }
|
|
|
|
|
|
if findItem, ok := existMap[dataItem.Datadate]; !ok {
|
|
|
timestamp := dataTime.UnixNano() / 1e6
|
|
@@ -129,10 +124,6 @@ func RefreshEdbDataFromFubao(edbInfoId int, edbCode, startDate string, fubaoData
|
|
|
isFindConfigDateRealData = true
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- if dataItem.Datadate == startDate {
|
|
|
- break
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
// 处理手工数据补充的配置
|