AiznModelController.java 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. //package com.backendsys.controller.Ai;
  2. //
  3. //import com.backendsys.entity.Ai.Aizn.AiznImageStyleDTO;
  4. //import com.backendsys.entity.Ai.Aizn.AiznIntelligentClipTaskDTO;
  5. //import com.backendsys.entity.Ai.Aizn.AiznInteractClipTask.AiznInteractClipTaskDTO;
  6. //import com.backendsys.entity.Ai.Aizn.AiznModel.AiznModelTaskDTO;
  7. //import com.backendsys.entity.System.SysResourcePointsDTO;
  8. //import com.backendsys.exception.CustException;
  9. //import com.backendsys.mapper.System.SysResourcePointsMapper;
  10. //import com.backendsys.service.Ai.Aizn.AiznImageTaskService;
  11. //import com.backendsys.service.Ai.Aizn.AiznModelService;
  12. //import com.backendsys.service.SDKService.SDKTencent.SDKTencentCOSService;
  13. //import com.backendsys.utils.response.Result;
  14. //import jakarta.validation.constraints.NotEmpty;
  15. //import org.springframework.beans.factory.annotation.Autowired;
  16. //import org.springframework.security.access.prepost.PreAuthorize;
  17. //import org.springframework.validation.annotation.Validated;
  18. //import org.springframework.web.bind.annotation.*;
  19. //
  20. //import java.io.IOException;
  21. //
  22. //@Validated
  23. //@RestController
  24. //public class AiznModelController {
  25. //
  26. // @Autowired
  27. // private SysResourcePointsMapper sysResourcePointsMapper;
  28. //
  29. // @Autowired
  30. // private AiznModelService aiznModelService;
  31. //
  32. // @Autowired
  33. // private AiznImageTaskService aiznImageTaskService;
  34. //
  35. // @Autowired
  36. // private SDKTencentCOSService sdkTencentCOSService;
  37. //
  38. // /**
  39. // * [紫鸟] AI模特 - 获得风格/场景配置数据
  40. // */
  41. // @PreAuthorize("@sr.hasPermission('35')")
  42. // @GetMapping("/api/ai/zn/getImageStyle")
  43. // public Result getImageStyle(AiznImageStyleDTO aiznImageStyleDTO) {
  44. // return Result.success(aiznModelService.getImageStyle(aiznImageStyleDTO));
  45. // }
  46. //
  47. // /**
  48. // * [紫鸟] AI模特 - 获得积分单价 (AI模特)
  49. // */
  50. // @PreAuthorize("@sr.hasPermission('35')")
  51. // @GetMapping("/api/ai/zn/getResourceOfZnModel")
  52. // public Result getImageStyle() {
  53. // SysResourcePointsDTO sysResourcePointsDTO = new SysResourcePointsDTO();
  54. // sysResourcePointsDTO.setResource_type("ZnModel");
  55. // return Result.success(sysResourcePointsMapper.queryResourcePointsList(sysResourcePointsDTO));
  56. // }
  57. //
  58. //
  59. // /**
  60. // * [紫鸟] AI模特 - 智能抠图 (发起任务)
  61. // */
  62. // @PreAuthorize("@sr.hasPermission('35')")
  63. // @PostMapping("/api/ai/zn/makeIntelligentClipTask")
  64. // public Result makeIntelligentClipTask(@Validated @RequestBody AiznIntelligentClipTaskDTO aiznIntelligentClipTaskDTO) {
  65. // return Result.success(aiznModelService.makeIntelligentClipTask(aiznIntelligentClipTaskDTO));
  66. // }
  67. //
  68. // /**
  69. // * [紫鸟] AI模特 - 智能抠图 (查询任务)
  70. // */
  71. // @PreAuthorize("@sr.hasPermission('35')")
  72. // @GetMapping("/api/ai/zn/getProgressOfIntelligentClipTask")
  73. // public Result getProgressOfIntelligentClipTask(@NotEmpty(message = "任务ID 不能为空") String id) throws IOException {
  74. // return Result.success(aiznImageTaskService.getProgressOfTask(id, 3));
  75. // }
  76. //
  77. // /**
  78. // * [紫鸟] AI模特 - 交互抠图 (直接返回结果)
  79. // */
  80. // @PreAuthorize("@sr.hasPermission('35')")
  81. // @PostMapping("/api/ai/zn/makeInteractClipTask")
  82. // public Result makeInteractClipTask(@Validated @RequestBody AiznInteractClipTaskDTO aiznInteractClipTaskDTO) {
  83. // return Result.success(aiznModelService.makeInteractClipTask(aiznInteractClipTaskDTO));
  84. // }
  85. //
  86. //
  87. //
  88. // /**
  89. // * [紫鸟] AI换模特 (发起任务)
  90. // */
  91. // @PreAuthorize("@sr.hasPermission('35')")
  92. // @PostMapping("/api/ai/zn/makeModelTask")
  93. // public Result makeModelTask(@Validated @RequestBody AiznModelTaskDTO aiznModelTaskDTO) {
  94. // return Result.success(aiznModelService.makeModelTask(aiznModelTaskDTO));
  95. // }
  96. //
  97. // /**
  98. // * [紫鸟] AI换模特 (查询任务)
  99. // */
  100. // @PreAuthorize("@sr.hasPermission('35')")
  101. // @GetMapping("/api/ai/zn/getProgressOfModelTask")
  102. // public Result getProgressOfModelTask(
  103. // @RequestParam(value = "id", required = false) String id,
  104. // @RequestParam(value = "ids", required = false) String ids
  105. // ) throws IOException {
  106. // if (ids != null) {
  107. // if (id != null) throw new CustException("id 与 ids 不能同时存在");
  108. // return Result.success(aiznImageTaskService.getProgressOfTaskArray(ids, 9));
  109. // } else {
  110. // if (id == null) throw new CustException("id 与 ids 至少一项不能为空");
  111. // return Result.success(aiznImageTaskService.getProgressOfTask(id, 9));
  112. // }
  113. // }
  114. //
  115. //
  116. //
  117. //}