فهرست منبع

Merge remote-tracking branch 'origin/rag/3.1' into debug

Roc 2 هفته پیش
والد
کامیت
7ae9960c0e
3فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 1 0
      controllers/llm/report.go
  2. 1 1
      models/report.go
  3. 2 1
      services/llm_report.go

+ 1 - 0
controllers/llm/report.go

@@ -240,4 +240,5 @@ func (c *RagEtaReportController) ArticleDel() {
 //	for _, v := range idList {
 //		cache.RagEtaReportOpToCache(v, 0, "publish")
 //	}
+//	fmt.Println("写入完成")
 //}

+ 1 - 1
models/report.go

@@ -1700,7 +1700,7 @@ type ReportShartUrlResp struct {
 
 func GetAllPublishReportId() (items []int, err error) {
 	o := global.DbMap[utils.DbNameReport]
-	sql := `SELECT  a.id FROM report as a WHERE 1=1 AND state in (2,6) limit 20`
+	sql := `SELECT  a.id FROM report as a WHERE 1=1 AND state in (2,6) `
 	err = o.Raw(sql).Find(&items).Error
 	return
 }

+ 2 - 1
services/llm_report.go

@@ -154,9 +154,10 @@ func handleReportAddOrModifyKnowledge(reportId, reportChapterId int, title, auth
 		item.Title = title
 		item.Author = author
 		item.TextContent = textContent
+		item.IsPublished = 1
 		item.PublishTime = publishTime
 		item.ModifyTime = time.Now()
-		err = item.Update([]string{"author", "text_content", "publish_time", "modify_time"})
+		err = item.Update([]string{"author", "text_content", "is_published", "publish_time", "modify_time"})
 	} else {
 		// 无数据的时候,需要新增
 		err = nil