|
|
|
@ -12,10 +12,7 @@ import com.bnyer.common.core.web.domain.AjaxResult; |
|
|
|
import com.bnyer.common.core.web.page.TableDataInfo; |
|
|
|
import com.bnyer.img.api.model.LoginFhUser; |
|
|
|
import com.bnyer.img.service.*; |
|
|
|
import com.bnyer.img.vo.CreatorDetailsVo; |
|
|
|
import com.bnyer.img.vo.CreatorFollowVo; |
|
|
|
import com.bnyer.img.vo.SignImgVo; |
|
|
|
import com.bnyer.img.vo.TiktokImgVo; |
|
|
|
import com.bnyer.img.vo.*; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
@ -88,6 +85,15 @@ public class FhMiniController extends BaseController { |
|
|
|
@Autowired |
|
|
|
private PromptService promptService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private StableDiffusionService stableDiffusionService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private AiPaintService aiPaintService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private PaintCdkService paintCdkService; |
|
|
|
|
|
|
|
@ApiOperation(value="查询banner列表") |
|
|
|
@GetMapping(value = "/listBanner") |
|
|
|
public AjaxResult listBanner(){ |
|
|
|
@ -392,4 +398,32 @@ public class FhMiniController extends BaseController { |
|
|
|
public AjaxResult getPrompt(){ |
|
|
|
return AjaxResult.success(promptService.queryPromptList()); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation(value="文生图") |
|
|
|
@PostMapping(value = "/textToImg") |
|
|
|
public AjaxResult textToImg(@Validated @RequestBody @ApiParam("文生图对象") TextToImgDto param){ |
|
|
|
return AjaxResult.success(stableDiffusionService.textToImg(param)); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation(value="获取绘画者ai绘画分页") |
|
|
|
@PostMapping(value = "/getAiPaintPage") |
|
|
|
public TableDataInfo getAiPaintPage(@Validated @RequestBody @ApiParam("ai绘画对象") AiPaintPageDto dto){ |
|
|
|
PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); |
|
|
|
List<AiPaintVo> aiPaintList = aiPaintService.queryPage(dto); |
|
|
|
return getDataTable(aiPaintList); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation(value="生成cdk") |
|
|
|
@PostMapping(value = "/generatorCdk/{paintNum}") |
|
|
|
public AjaxResult generatorCdk(@PathVariable int paintNum){ |
|
|
|
paintCdkService.generatorCdk("2",paintNum); |
|
|
|
return AjaxResult.success(); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation(value="使用cdk") |
|
|
|
@PostMapping(value = "/useCdk") |
|
|
|
public AjaxResult useCdk(@Validated @RequestBody @ApiParam("ai绘画对象") PaintCdkUseDto dto){ |
|
|
|
paintCdkService.useCdk(dto.getCdk(),dto.getSource(),dto.getUserId(),dto.getAppType()); |
|
|
|
return AjaxResult.success(); |
|
|
|
} |
|
|
|
} |
|
|
|
|