// Code scaffolded by goctl. Safe to edit. // goctl 1.10.1 package ai import ( "context" "fmt" "github.com/zeromicro/go-zero/core/logx" "sundynix-micro-go/app/plant/api/internal/svc" ) type GetAiChatHistoryLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } // 聊天历史 func NewGetAiChatHistoryLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetAiChatHistoryLogic { return &GetAiChatHistoryLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } // GetAiChatHistory TODO: 完善 AI 聊天历史查询 func (l *GetAiChatHistoryLogic) GetAiChatHistory() (interface{}, error) { userId := fmt.Sprintf("%v", l.ctx.Value("userId")) l.Logger.Infof("get ai chat history for user: %s", userId) // 待实现:从 sundynix_ai_chat_history 表分页查询 return map[string]interface{}{"list": []interface{}{}}, nil }