Sfoglia il codice sorgente

Merge branch 'aj_commit' into debug

longyu 2 anni fa
parent
commit
c6d074035f
3 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 1 0
      .gitignore
  2. 4 0
      controller/chart/chart_info.go
  3. 1 0
      services/comment/comment.go

+ 1 - 0
.gitignore

@@ -2,6 +2,7 @@
 /log
 latest_log
 /config/config.yaml
+/config/config_release.yaml
 .DS_Store
 go.sum
 /binlog

+ 4 - 0
controller/chart/chart_info.go

@@ -110,6 +110,10 @@ func GetChartInfoDetail(c *gin.Context) {
 		} else {
 			startDate = startDate + "-01"
 		}
+		//兼容日期数据为2022-09的错误
+		if strings.Count(startDate, "-") == 1 {
+			startDate = startDate + "-01"
+		}
 	case 7:
 		startDate = "2018-01-01"
 	case 8:

+ 1 - 0
services/comment/comment.go

@@ -101,6 +101,7 @@ func Comment(user user.UserInfo, req reqComment.ReqComment) (ret response.RespCo
 		ModifyTime: now,
 		OldReportId:    req.OldReportId,
 		OldReportChapterId: req.OldReportChapterId,
+		IsHot: 1,
 	}
 	err = commentInfo.Create()
 	if err != nil {