Browse Source

fix: 图表开始时间至今

hsun 3 years ago
parent
commit
7493c36db2
1 changed files with 5 additions and 1 deletions
  1. 5 1
      controller/chart/chart_info.go

+ 5 - 1
controller/chart/chart_info.go

@@ -101,7 +101,11 @@ func GetChartInfoDetail(c *gin.Context)  {
 			endDate = endDate + "-01"
 		}
 	case 6:
-		startDate = startDate + "-01"
+		if startDate == "" && chartInfo.StartDate != "" {
+			startDate = chartInfo.StartDate
+		} else {
+			startDate = startDate + "-01"
+		}
 	case 7:
 		startDate = "2018-01-01"
 	case 8: