Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9989e78b
authored
Apr 09, 2026
by
Jony.L
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加workflowCode字段
parent
2d25e4b2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
computility-module-external/src/main/java/com/luhu/computility/module/external/controller/openapi/OpenApiController.java
+5
-3
computility-module-external/src/main/java/com/luhu/computility/module/external/controller/openapi/service/OpenApiService.java
+1
-1
computility-module-external/src/main/java/com/luhu/computility/module/external/controller/openapi/service/OpenApiServiceImpl.java
+2
-1
No files found.
computility-module-external/src/main/java/com/luhu/computility/module/external/controller/openapi/OpenApiController.java
View file @
9989e78b
...
@@ -98,13 +98,15 @@ public class OpenApiController {
...
@@ -98,13 +98,15 @@ public class OpenApiController {
@PostMapping
(
value
=
"/generate-face-swap-video"
,
consumes
=
MediaType
.
MULTIPART_FORM_DATA_VALUE
)
@PostMapping
(
value
=
"/generate-face-swap-video"
,
consumes
=
MediaType
.
MULTIPART_FORM_DATA_VALUE
)
@Parameters
({
@Parameters
({
@Parameter
(
name
=
"image"
,
description
=
"图片文件"
),
@Parameter
(
name
=
"image"
,
description
=
"图片文件"
),
@Parameter
(
name
=
"url"
,
description
=
"图片链接"
)
@Parameter
(
name
=
"url"
,
description
=
"图片链接"
),
@Parameter
(
name
=
"workflowCode"
,
description
=
"工作流编码,不传则默认运行乔峰工作流"
)
})
})
@Operation
(
summary
=
"ai换脸-视频换脸;ai换脸-上传图片+视频流生成"
,
description
=
"ai换脸-上传图片+视频流生成"
)
@Operation
(
summary
=
"ai换脸-视频换脸;ai换脸-上传图片+视频流生成"
,
description
=
"ai换脸-上传图片+视频流生成"
)
@ApiSignature
@ApiSignature
public
CommonResult
<
GenerateFaceSwapRespDTO
>
faceVideoGenerate
(
@RequestPart
(
value
=
"image"
,
required
=
false
)
MultipartFile
image
,
public
CommonResult
<
GenerateFaceSwapRespDTO
>
faceVideoGenerate
(
@RequestPart
(
value
=
"image"
,
required
=
false
)
MultipartFile
image
,
@RequestParam
(
value
=
"url"
,
required
=
false
)
String
url
)
{
@RequestParam
(
value
=
"url"
,
required
=
false
)
String
url
,
return
openApiService
.
faceVideoGenerate
(
image
,
url
);
@RequestParam
(
value
=
"workflowCode"
,
required
=
false
)
String
workflowCode
)
{
return
openApiService
.
faceVideoGenerate
(
image
,
url
,
workflowCode
);
}
}
...
...
computility-module-external/src/main/java/com/luhu/computility/module/external/controller/openapi/service/OpenApiService.java
View file @
9989e78b
...
@@ -40,7 +40,7 @@ public interface OpenApiService {
...
@@ -40,7 +40,7 @@ public interface OpenApiService {
CommonResult
<
CeateVideoStreamRespDTO
>
ceateVideoStream
(
CeateVideoStreamReqDTO
ceateVideoStreamReqDTO
);
CommonResult
<
CeateVideoStreamRespDTO
>
ceateVideoStream
(
CeateVideoStreamReqDTO
ceateVideoStreamReqDTO
);
CommonResult
<
GenerateFaceSwapRespDTO
>
faceVideoGenerate
(
MultipartFile
image
,
String
url
);
CommonResult
<
GenerateFaceSwapRespDTO
>
faceVideoGenerate
(
MultipartFile
image
,
String
url
,
String
workflowCode
);
CommonResult
<
ViewSourceRespDTO
>
viewVideo
(
ViewVideoReqDTO
viewVideoReqDTO
);
CommonResult
<
ViewSourceRespDTO
>
viewVideo
(
ViewVideoReqDTO
viewVideoReqDTO
);
...
...
computility-module-external/src/main/java/com/luhu/computility/module/external/controller/openapi/service/OpenApiServiceImpl.java
View file @
9989e78b
...
@@ -216,7 +216,7 @@ public class OpenApiServiceImpl implements OpenApiService {
...
@@ -216,7 +216,7 @@ public class OpenApiServiceImpl implements OpenApiService {
@Override
@Override
public
CommonResult
<
GenerateFaceSwapRespDTO
>
faceVideoGenerate
(
MultipartFile
image
,
String
url
)
{
public
CommonResult
<
GenerateFaceSwapRespDTO
>
faceVideoGenerate
(
MultipartFile
image
,
String
url
,
String
workflowCode
)
{
if
(
ObjectUtils
.
isEmpty
(
image
)
&&
StringUtils
.
isEmpty
(
url
))
{
if
(
ObjectUtils
.
isEmpty
(
image
)
&&
StringUtils
.
isEmpty
(
url
))
{
return
error
(
GlobalResponseCodeConstants
.
IMAGE_EXCEPTION
.
getCode
(),
return
error
(
GlobalResponseCodeConstants
.
IMAGE_EXCEPTION
.
getCode
(),
GlobalResponseCodeConstants
.
IMAGE_EXCEPTION
.
getMsg
());
GlobalResponseCodeConstants
.
IMAGE_EXCEPTION
.
getMsg
());
...
@@ -230,6 +230,7 @@ public class OpenApiServiceImpl implements OpenApiService {
...
@@ -230,6 +230,7 @@ public class OpenApiServiceImpl implements OpenApiService {
}
else
{
}
else
{
formMaps
.
put
(
"url"
,
url
);
formMaps
.
put
(
"url"
,
url
);
}
}
formMaps
.
put
(
"workflowCode"
,
workflowCode
);
return
sendFormRequestWithFiles
(
imageToVideoUrl
,
formMaps
,
GenerateFaceSwapRespDTO
.
class
,
AiGeneratedFileType
.
VIDEO
.
getValue
());
return
sendFormRequestWithFiles
(
imageToVideoUrl
,
formMaps
,
GenerateFaceSwapRespDTO
.
class
,
AiGeneratedFileType
.
VIDEO
.
getValue
());
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment