|
@@ -2,9 +2,9 @@ package agent
|
|
|
|
|
|
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,12 +65,19 @@ func (l *GetAgentListLogic) GetAgentList(req *types.AgentListReq) (*types.AgentL
|
|
|
resp.Data.Total = data.PageDetails.Total
|
|
|
|
|
|
for _, v := range data.List {
|
|
|
+
|
|
|
+ // 这里是获得数据集合的修改时间
|
|
|
+ var updatedAt int64
|
|
|
+ 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(v.UpdatedAt.UnixMilli()),
|
|
|
+ UpdatedAt: pointy.GetPointer(updatedAt),
|
|
|
},
|
|
|
Name: &v.Name,
|
|
|
Role: &v.Role,
|