jimmyyem před 4 měsíci
rodič
revize
074dd4cc62

+ 9 - 2
desc/wechat/chat_records.api

@@ -100,7 +100,11 @@ type (
 	}
 	GptMessageResp {
 		BaseDataInfo
-		Data []Message `json:"data"`
+		Data GptMessageList `json:"data"`
+	}
+	GptMessageList {
+		HasMore bool `json:"hasMore"`
+		Data []Message  `json:"data"`
 	}
 	Message {
 		Id *string `json:"id"`
@@ -116,12 +120,15 @@ type (
 	}
 	GptsSessionResp {
 		BaseDataInfo
+		Data GptsSessionList `json:"data"`
+	}
+	GptsSessionList {
+		HasMore bool `json:"hasMore"`
 		Data []Session `json:"data"`
 	}
 	Session {
 		Id *string `json:"id"`
 		Name *string `json:"name"`
-		Status *string `json:"status"`
 		CreatedAt *int `json:"createdAt"`
 		Inputs interface{} `json:"inputs"`
 	}

+ 2 - 1
internal/logic/chatrecords/gpts_get_api_message_logic.go

@@ -48,8 +48,9 @@ func (l *GptsGetApiMessageLogic) GptsGetApiMessage(req *types.GptMessageReq, tok
 		return nil, err
 	}
 
+	resp.Data.HasMore = response.HasMore
 	for _, v := range response.Data {
-		resp.Data = append(resp.Data, types.Message{
+		resp.Data.Data = append(resp.Data.Data, types.Message{
 			Id:             &v.ID,
 			ConversationId: &v.ConversationId,
 			Answer:         &v.Answer,

+ 2 - 1
internal/logic/chatrecords/gpts_get_api_session_logic.go

@@ -48,8 +48,9 @@ func (l *GptsGetApiSessionLogic) GptsGetApiSession(req *types.GptsSessionReq, to
 		return nil, err
 	}
 
+	resp.Data.HasMore = response.HasMore
 	for _, v := range response.Data {
-		resp.Data = append(resp.Data, types.Session{
+		resp.Data.Data = append(resp.Data.Data, types.Session{
 			Id:        &v.ID,
 			Name:      &v.Name,
 			Inputs:    &v.Inputs,

+ 1 - 1
internal/logic/employee/get_employee_search_logic.go

@@ -48,8 +48,8 @@ func (l *GetEmployeeSearchLogic) GetEmployeeSearch(req *types.EmployeeListReq, t
 
 	employeeIds := make([]uint64, 0)
 	allocagent, err := l.svcCtx.DB.AllocAgent.Query().Where(
-		allocagent.UserIDEQ(userId),
 		allocagent.Or(
+			allocagent.UserIDEQ(userId),
 			allocagent.OrganizationID(organizationID),
 		),
 	).Only(l.ctx)

+ 12 - 3
internal/types/types.go

@@ -2382,7 +2382,12 @@ type GptMessageReq struct {
 // swagger:model GptMessageResp
 type GptMessageResp struct {
 	BaseDataInfo
-	Data []Message `json:"data"`
+	Data GptMessageList `json:"data"`
+}
+
+type GptMessageList struct {
+	HasMore bool      `json:"hasMore"`
+	Data    []Message `json:"data"`
 }
 
 type Message struct {
@@ -2403,13 +2408,17 @@ type GptsSessionReq struct {
 // swagger:model GptsSessionResp
 type GptsSessionResp struct {
 	BaseDataInfo
-	Data []Session `json:"data"`
+	Data GptsSessionList `json:"data"`
+}
+
+type GptsSessionList struct {
+	HasMore bool      `json:"hasMore"`
+	Data    []Session `json:"data"`
 }
 
 type Session struct {
 	Id        *string     `json:"id"`
 	Name      *string     `json:"name"`
-	Status    *string     `json:"status"`
 	CreatedAt *int        `json:"createdAt"`
 	Inputs    interface{} `json:"inputs"`
 }