feat: 添加流程执行查询接口及模型类型与节点名称优化

This commit is contained in:
2026-05-12 14:31:51 +08:00
parent 7c26914353
commit 68576b2132
5 changed files with 25 additions and 3 deletions

View File

@@ -25,6 +25,16 @@ var FlowExecutionService = &flowExecutionService{}
type flowExecutionService struct{}
func (s *flowExecutionService) Get(ctx context.Context, req *flowDto.GetFlowExecutionReq) (res *flowDto.VOFlowExecution, err error) {
r, err := flowDao.FlowExecutionDao.Get(ctx, req)
if err != nil {
return nil, err
}
res = new(flowDto.VOFlowExecution)
err = gconv.Struct(r, &res)
return res, err
}
func (s *flowExecutionService) List(ctx context.Context, req *flowDto.ListFlowExecutionReq) (res *flowDto.ListFlowExecutionTreeRes, err error) {
user, err := utils.GetUserInfo(ctx)
if err != nil {
@@ -121,7 +131,7 @@ func (s *flowExecutionService) List(ctx context.Context, req *flowDto.ListFlowEx
// 组装节点
node := flowDto.FlowNode{
FlowName: displayFlowName,
FlowId: execution.FlowUserId,
Id: execution.Id,
SessionId: gconv.String(execution.SessionId),
Items: tempItems,
}

View File

@@ -25,6 +25,7 @@ func (s *nodeLibraryService) GetNodeLibrary(ctx context.Context, req *nodeDto.Wo
{
NodeCode: node.NodeTypeTextModel,
NodeName: node.NodeNameTextModel,
ModelType: node.ModelTypeText,
SkillOption: true,
FormConfig: []node.NodeFormField{}, // 技能下拉
ModelConfig: []node.ModelItem{},
@@ -32,6 +33,7 @@ func (s *nodeLibraryService) GetNodeLibrary(ctx context.Context, req *nodeDto.Wo
{
NodeCode: node.NodeTypeImageModel,
NodeName: node.NodeNameImageModel,
ModelType: node.ModelTypeImage,
SkillOption: true,
FormConfig: []node.NodeFormField{}, // 技能下拉
ModelConfig: []node.ModelItem{},