|
@@ -2,6 +2,7 @@ package agent_base
|
|
|
|
|
|
import (
|
|
import (
|
|
"context"
|
|
"context"
|
|
|
|
+ "fmt"
|
|
"github.com/zeromicro/go-zero/core/errorx"
|
|
"github.com/zeromicro/go-zero/core/errorx"
|
|
"wechat-api/hook/fastgpt"
|
|
"wechat-api/hook/fastgpt"
|
|
|
|
|
|
@@ -36,8 +37,18 @@ func (l *GetAgentBaseListLogic) GetAgentBaseList(req *types.DataListReq) (*types
|
|
return nil, errorx.NewInvalidArgumentError("fastgpt get data list failed " + err.Error())
|
|
return nil, errorx.NewInvalidArgumentError("fastgpt get data list failed " + err.Error())
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ resp2, err := fastgpt.GetCollectionDetail(*req.CollectionId)
|
|
|
|
+ fmt.Printf("resp2=%v resp2.Data=%v resp2.Data.UpdateTime=%v\n", resp2, resp2.Data, resp2.Data.UpdateTime)
|
|
|
|
+ fmt.Println(resp2.Data.UpdateTime.UnixMilli(), resp2.Code)
|
|
|
|
+ if err != nil {
|
|
|
|
+ return nil, errorx.NewInvalidArgumentError("fastgpt get collection detail failed " + err.Error())
|
|
|
|
+ }
|
|
|
|
+
|
|
dataResp.Data = types.BatchSimpleInfo{}
|
|
dataResp.Data = types.BatchSimpleInfo{}
|
|
dataResp.Data.Total = uint64(resp.Data.Total)
|
|
dataResp.Data.Total = uint64(resp.Data.Total)
|
|
|
|
+ if resp2.Code == 200 {
|
|
|
|
+ dataResp.Data.UpdatedAt = resp2.Data.UpdateTime.UnixMilli()
|
|
|
|
+ }
|
|
if resp.Code == 200 && resp.Data.Total > 0 {
|
|
if resp.Code == 200 && resp.Data.Total > 0 {
|
|
for _, val := range resp.Data.Data {
|
|
for _, val := range resp.Data.Data {
|
|
dataResp.Data.Data = append(dataResp.Data.Data, types.DataSimpleInfo{
|
|
dataResp.Data.Data = append(dataResp.Data.Data, types.DataSimpleInfo{
|