Pārlūkot izejas kodu

feat:修改接口路径以及注释

photo
xmzhao71 pirms 1 gada
vecāks
revīzija
6316689091
4 mainītis faili ar 5 papildinājumiem un 47 dzēšanām
  1. +1
    -1
      open-api/src/main/java/com/iformall/controller/ai/AiVideoController.java
  2. +0
    -42
      open-api/src/main/java/com/iformall/service/impl/AiVideoServiceImpl.java
  3. +3
    -3
      suimangService/src/main/java/com/iformall/common/CommonConstant.java
  4. +1
    -1
      suimangService/src/main/java/com/iformall/domain/po/sm/ServiceInfo.java

+ 1
- 1
open-api/src/main/java/com/iformall/controller/ai/AiVideoController.java Parādīt failu

@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RestController;


@Api(tags = "视频相关api") @Api(tags = "视频相关api")
@RestController @RestController
@RequestMapping("/ai/video")
@RequestMapping("/api/video")
public class AiVideoController extends BaseController { public class AiVideoController extends BaseController {


@Autowired @Autowired


+ 0
- 42
open-api/src/main/java/com/iformall/service/impl/AiVideoServiceImpl.java Parādīt failu

@@ -1,24 +1,12 @@
package com.iformall.service.impl; package com.iformall.service.impl;


import com.iformall.common.ErrorCode;
import com.iformall.domain.dto.neuver.SaveServiceVideoRecordDTO; import com.iformall.domain.dto.neuver.SaveServiceVideoRecordDTO;
import com.iformall.domain.po.sm.UserMouldVideo;
import com.iformall.dto.GenerateVideoDTO;
import com.iformall.dto.PreviewVideoDTO;
import com.iformall.enums.EnumVideoStatus;
import com.iformall.exception.BizException;
import com.iformall.service.AiVideoService; import com.iformall.service.AiVideoService;
import com.iformall.service.sm.ServiceVideoRecordService; import com.iformall.service.sm.ServiceVideoRecordService;
import com.iformall.service.sm.UserMouldVideoService;
import com.iformall.service.sm.VoiceInfoService;
import com.iformall.sm.*; import com.iformall.sm.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;


import java.util.Date;
import java.util.Optional;

/** /**
* ai视频服务 * ai视频服务
* *
@@ -28,8 +16,6 @@ import java.util.Optional;
@Service @Service
public class AiVideoServiceImpl implements AiVideoService { public class AiVideoServiceImpl implements AiVideoService {


@Autowired
private UserMouldVideoService userMouldVideoService;
@Autowired @Autowired
private ServiceVideoRecordService serviceVideoRecordService; private ServiceVideoRecordService serviceVideoRecordService;


@@ -40,25 +26,6 @@ public class AiVideoServiceImpl implements AiVideoService {


@Override @Override
public AiVideoResult generateVideo(AiVideoParam aiVideoParam, Long taskId, Long serviceId) { public AiVideoResult generateVideo(AiVideoParam aiVideoParam, Long taskId, Long serviceId) {
// // 参数校验
// UserMouldVideo userMouldVideo = Optional.ofNullable(userMouldVideoService.getById(dto.getId())).orElseThrow(() -> new BizException(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "未找到用户数据"));
// if (StringUtils.isBlank(userMouldVideo.getPaperwork())) {
// throw new BizException(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "未填写视频文案");
// }
// if (EnumVideoStatus.ing.getCode().equals(userMouldVideo.getVideoStatus())
// || EnumVideoStatus.success.getCode().equals(userMouldVideo.getVideoStatus())
// || EnumVideoStatus.upload_ing.getCode().equals(userMouldVideo.getVideoStatus())
// || EnumVideoStatus.upload_fail.getCode().equals(userMouldVideo.getVideoStatus())) {
// throw new BizException(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "视频生成中");
// }
// if (EnumVideoStatus.upload_success.getCode().equals(userMouldVideo.getVideoStatus())) {
// throw new BizException(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "视频已生成完成");
// }
//
// // 更新视频信息
// updateUserMouldVideo(userMouldVideo);
// userMouldVideoService.createVideo(userMouldVideo);

AiVideoResult video = AiVideoHelper.createVideo(aiVideoParam, taskId); AiVideoResult video = AiVideoHelper.createVideo(aiVideoParam, taskId);
if (video.isSuccess()) { if (video.isSuccess()) {
// 记录时长 // 记录时长
@@ -70,13 +37,4 @@ public class AiVideoServiceImpl implements AiVideoService {
} }
return video; return video;
} }

private void updateUserMouldVideo(UserMouldVideo userMouldVideo) {
UserMouldVideo video = new UserMouldVideo();
video.setId(userMouldVideo.getId());
video.setVideoStatus(EnumVideoStatus.ing.getCode());
video.setVideoMsg("");
video.setCreateVideoDate(new Date());
userMouldVideoService.updateById(video);
}
} }

+ 3
- 3
suimangService/src/main/java/com/iformall/common/CommonConstant.java Parādīt failu

@@ -2,10 +2,10 @@ package com.iformall.common;


public interface CommonConstant { public interface CommonConstant {
/** /**
* 状态(0:锁定,1:正常
* 状态(0:正常,1:锁定
*/ */
Integer STATUS_NORMAL = 1;
Integer STATUS_ABNORMAL = 0;
Integer STATUS_NORMAL = 0;
Integer STATUS_ABNORMAL = 1;


/** /**
* 删除状态(0:未删除,1:已删除) * 删除状态(0:未删除,1:已删除)


+ 1
- 1
suimangService/src/main/java/com/iformall/domain/po/sm/ServiceInfo.java Parādīt failu

@@ -54,7 +54,7 @@ public class ServiceInfo {
@TableField("type") @TableField("type")
private Integer type; private Integer type;
/** /**
* 状态(0:锁定,1:正常
* 状态(0:正常,1:锁定
*/ */
@TableField("status") @TableField("status")
private Integer status; private Integer status;


Notiek ielāde…
Atcelt
Saglabāt