mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-23 07:41:53 +08:00
【增加】获取单个 image 接口
This commit is contained in:
parent
e97408b3ac
commit
9878abb03c
@ -36,6 +36,12 @@ public class AiImageController {
|
|||||||
return CommonResult.success(aiImageService.list(req));
|
return CommonResult.success(aiImageService.list(req));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "获取image信息", description = "获取image信息")
|
||||||
|
@GetMapping("/get")
|
||||||
|
public CommonResult<AiImageListRespVO> get(@RequestParam("id") Long id) {
|
||||||
|
return CommonResult.success(aiImageService.get(id));
|
||||||
|
}
|
||||||
|
|
||||||
@Operation(summary = "dall2/dall3绘画", description = "openAi dall3是付费的!")
|
@Operation(summary = "dall2/dall3绘画", description = "openAi dall3是付费的!")
|
||||||
@PostMapping("/dall")
|
@PostMapping("/dall")
|
||||||
public AiImageDallRespVO dallDrawing(@Validated @RequestBody AiImageDallReqVO req) {
|
public AiImageDallRespVO dallDrawing(@Validated @RequestBody AiImageDallReqVO req) {
|
||||||
|
@ -47,6 +47,14 @@ public interface AiImageConvert {
|
|||||||
*/
|
*/
|
||||||
List<AiImageListRespVO> convertAiImageListRespVO(List<AiImageDO> list);
|
List<AiImageListRespVO> convertAiImageListRespVO(List<AiImageDO> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 转换 - AiImageListRespVO
|
||||||
|
*
|
||||||
|
* @param aiImageDO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AiImageListRespVO convertAiImageListRespVO(AiImageDO aiImageDO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 转换 - AiImageMidjourneyOperationsVO
|
* 转换 - AiImageMidjourneyOperationsVO
|
||||||
*
|
*
|
||||||
|
@ -20,6 +20,14 @@ public interface AiImageService {
|
|||||||
*/
|
*/
|
||||||
PageResult<AiImageListRespVO> list(AiImageListReqVO req);
|
PageResult<AiImageListRespVO> list(AiImageListReqVO req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取 - image 信息
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AiImageListRespVO get(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ai绘画 - dall2/dall3 绘画
|
* ai绘画 - dall2/dall3 绘画
|
||||||
*
|
*
|
||||||
|
@ -92,6 +92,12 @@ public class AiImageServiceImpl implements AiImageService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AiImageListRespVO get(Long id) {
|
||||||
|
AiImageDO aiImageDO = aiImageMapper.selectById(id);
|
||||||
|
return AiImageConvert.INSTANCE.convertAiImageListRespVO(aiImageDO);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AiImageDallRespVO dallDrawing(AiImageDallReqVO req) {
|
public AiImageDallRespVO dallDrawing(AiImageDallReqVO req) {
|
||||||
// 保存数据库
|
// 保存数据库
|
||||||
|
Loading…
Reference in New Issue
Block a user