|
@@ -385,6 +385,10 @@ func GetNeedDateData(needDateTime time.Time, dataList []*models.EdbDataList, edb
|
|
|
for tmpDateTime := needDateTime; tmpDateTime.After(minDateTime) || tmpDateTime.Equal(minDateTime); tmpDateTime = tmpDateTime.AddDate(0, 0, -1) {
|
|
|
tmpDate := tmpDateTime.Format(utils.FormatDate)
|
|
|
if tmpValue, ok := edbDataMap[tmpDate]; ok { //如果能找到数据,那么就返回
|
|
|
+ // 数据为0,也直接返回,做无值处理
|
|
|
+ if tmpValue == 0 {
|
|
|
+ return
|
|
|
+ }
|
|
|
findDateTime, _ = time.ParseInLocation(utils.FormatDate, tmpDate, time.Local)
|
|
|
findDataValue = tmpValue
|
|
|
isFind = true
|