zwxi 8 months ago
parent
commit
bfb33cda40
2 changed files with 8 additions and 2 deletions
  1. 7 1
      controllers/ai/ai_summary.go
  2. 1 1
      models/ai_summary/ai_summary.go

+ 7 - 1
controllers/ai/ai_summary.go

@@ -956,7 +956,6 @@ func (this *AiController) AiSummaryDetail() {
 	br.Ret = 200
 	br.Success = true
 	br.Msg = "获取成功"
-	br.Data = detail
 }
 
 // @Title 新增ai纪要
@@ -1017,10 +1016,17 @@ func (this *AiController) AddAiSummary() {
 		br.ErrMsg = "保存分类失败,Err:" + err.Error()
 		return
 	}
+	classify ,err := ai_summary.GetAiSummaryClassifyById(req.ClassifyId)
+	if err != nil {
+		br.Msg = "获取分类信息失败"
+		br.ErrMsg = "获取分类信息失败,Err:" + err.Error()
+		return
+	}
 
 	resp := ai_summary.AiSummaryAddResp{
 		AiSummaryId: int(id),
 		UniqueCode:  strconv.Itoa(req.ClassifyId) + "_" + strconv.Itoa(int(id)),
+		ParentId:    classify.ParentId,
 	}
 
 	br.Ret = 200

+ 1 - 1
models/ai_summary/ai_summary.go

@@ -64,7 +64,6 @@ func GetAiSummaryItemById(aiSummaryId int) (sandboxInfo *AiSummaryItems, err err
 	return
 }
 
-
 // DelAiSummaryById 根据纪要id删除纪要
 func DelAiSummaryById(aiSummaryId int) (err error) {
 	o := orm.NewOrm()
@@ -167,6 +166,7 @@ func GetAiSummaryMaxSort(classifyId int) (sort int, err error) {
 type AiSummaryAddResp struct {
 	AiSummaryId int
 	UniqueCode  string // 唯一编码
+	ParentId    int
 }
 
 type AiSummaryDetailResp struct {