소스 검색

fix:隐藏updatedAt

jimmyyem 22 시간 전
부모
커밋
2702732ae6
1개의 변경된 파일8개의 추가작업 그리고 10개의 파일을 삭제
  1. 8 10
      internal/logic/agent/get_agent_list_logic.go

+ 8 - 10
internal/logic/agent/get_agent_list_logic.go

@@ -4,7 +4,6 @@ import (
 	"context"
 	"wechat-api/ent/agent"
 	"wechat-api/ent/predicate"
-	"wechat-api/hook/fastgpt"
 	"wechat-api/internal/svc"
 	"wechat-api/internal/types"
 	"wechat-api/internal/utils/dberrorhandler"
@@ -65,21 +64,20 @@ func (l *GetAgentListLogic) GetAgentList(req *types.AgentListReq) (*types.AgentL
 	resp.Data.Total = data.PageDetails.Total
 
 	for _, v := range data.List {
-
 		// 这里是获得数据集合的修改时间
-		var updatedAt int64
-		if v.CollectionID != "" {
-			info, err := fastgpt.GetCollectionDetail(v.CollectionID)
-			if err == nil {
-				updatedAt = info.Data.UpdateTime.UnixMilli()
-			}
-		}
+		//var updatedAt int64
+		//if v.CollectionID != "" {
+		//	info, err := fastgpt.GetCollectionDetail(v.CollectionID)
+		//	if err == nil {
+		//		updatedAt = info.Data.UpdateTime.UnixMilli()
+		//	}
+		//}
 		resp.Data.Data = append(resp.Data.Data,
 			types.AgentInfo{
 				BaseIDInfo: types.BaseIDInfo{
 					Id:        &v.ID,
 					CreatedAt: pointy.GetPointer(v.CreatedAt.UnixMilli()),
-					UpdatedAt: pointy.GetPointer(updatedAt),
+					UpdatedAt: pointy.GetPointer(v.UpdatedAt.UnixMilli()),
 				},
 				Name:         &v.Name,
 				Role:         &v.Role,