@@ -0,0 +1,32 @@ | |||
package com.iformall.controller; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.dto.PageMaterialMouldDTO; | |||
import com.iformall.service.ApiMaterialMouldService; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiOperation; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
/** | |||
* 背景,素材模板api | |||
* | |||
* @author xmzhao71 | |||
* @date 2023-10-17 | |||
*/ | |||
@Api(tags = "物料模板api") | |||
@RestController | |||
@RequestMapping("/api/materialMould") | |||
public class ApiMaterialMouldController extends BaseController { | |||
@Autowired | |||
private ApiMaterialMouldService apiMaterialMouldService; | |||
@ApiOperation("分页查询物料模板") | |||
@GetMapping("page") | |||
public ResultData pageMaterialMould(PageMaterialMouldDTO dto) { | |||
return new ResultData(apiMaterialMouldService.pageMaterialMould(dto)); | |||
} | |||
} |
@@ -0,0 +1,38 @@ | |||
package com.iformall.controller; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.dto.PagePersonMouldDTO; | |||
import com.iformall.service.ApiPersonMouldService; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiOperation; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
/** | |||
* 数字人模板api | |||
* | |||
* @author xmzhao71 | |||
* @date 2023-10-17 | |||
*/ | |||
@Api(tags = "数字人模板api") | |||
@RestController | |||
@RequestMapping("/api/personPatch") | |||
public class ApiPersonMouldController extends BaseController { | |||
@Autowired | |||
private ApiPersonMouldService apiPersonMouldService; | |||
@ApiOperation("分页查询数字人模板") | |||
@GetMapping("page") | |||
public ResultData pagePersonMould(PagePersonMouldDTO dto) { | |||
return new ResultData(apiPersonMouldService.pagePersonMould(dto)); | |||
} | |||
@ApiOperation("单个查询") | |||
@GetMapping("get") | |||
public ResultData getPersonMould(Long id) { | |||
return new ResultData(apiPersonMouldService.getPersonMould(id)); | |||
} | |||
} |
@@ -0,0 +1,46 @@ | |||
package com.iformall.controller; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.dto.PageUserVideoDTO; | |||
import com.iformall.service.ApiUserVideoService; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiOperation; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.PostMapping; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
/** | |||
* 用户视频api | |||
* | |||
* @author xmzhao71 | |||
* @date 2023-10-17 | |||
*/ | |||
@Api(tags = "用户视频api") | |||
@RestController | |||
@RequestMapping("/api/userVideo") | |||
public class ApiUserVideoController extends BaseController { | |||
@Autowired | |||
private ApiUserVideoService apiUserVideoService; | |||
@ApiOperation("分页查询用户视频") | |||
@GetMapping("page") | |||
public ResultData pageUserVideo(PageUserVideoDTO dto) { | |||
return new ResultData(apiUserVideoService.pageUserVideo(dto)); | |||
} | |||
@ApiOperation("单个查询用户视频") | |||
@GetMapping("get") | |||
public ResultData getUserVideo(Long id) { | |||
return new ResultData(apiUserVideoService.getUserVideo(id)); | |||
} | |||
@ApiOperation("删除用户视频") | |||
@PostMapping("delete") | |||
public ResultData deleteUserVideo(Long id) { | |||
apiUserVideoService.deleteUserVideo(id); | |||
return new ResultData(); | |||
} | |||
} |
@@ -0,0 +1,38 @@ | |||
package com.iformall.controller; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.dto.ListVoiceLanguageDTO; | |||
import com.iformall.service.ApiVoiceMouldService; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiOperation; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
/** | |||
* 声音模板api | |||
* | |||
* @author xmzhao71 | |||
* @date 2023-10-17 | |||
*/ | |||
@Api(tags = "声音模板api") | |||
@RestController | |||
@RequestMapping("/api/voiceMould") | |||
public class ApiVoiceMouldController extends BaseController { | |||
@Autowired | |||
private ApiVoiceMouldService apiVoiceMouldService; | |||
@ApiOperation("全查询语种") | |||
@GetMapping("list") | |||
public ResultData listVoiceLanguage(ListVoiceLanguageDTO dto) { | |||
return new ResultData(apiVoiceMouldService.listVoiceLanguage(dto)); | |||
} | |||
@ApiOperation("单个查询声音风格") | |||
@GetMapping("get") | |||
public ResultData getVoiceMould(Long id) { | |||
return new ResultData(apiVoiceMouldService.getVoiceMould(id)); | |||
} | |||
} |
@@ -0,0 +1,13 @@ | |||
package com.iformall.dto; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
@ApiModel(value = "全查询语种请求参数") | |||
@Data | |||
public class ListVoiceLanguageDTO { | |||
@ApiModelProperty("语种名称") | |||
private String chineseName; | |||
} |
@@ -0,0 +1,9 @@ | |||
package com.iformall.dto; | |||
import lombok.Data; | |||
@Data | |||
public class PageDTO { | |||
private Integer pageNum = 1; | |||
private Integer pageSize = 20; | |||
} |
@@ -0,0 +1,21 @@ | |||
package com.iformall.dto; | |||
import com.iformall.domain.po.sm.MaterialMould; | |||
import com.iformall.enums.EnumaMouldPatchStatus; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
@ApiModel(value = "分页查询物料模板请求参数") | |||
@Data | |||
public class PageMaterialMouldDTO extends PageDTO { | |||
@ApiModelProperty("4:背景,5:素材") | |||
private Integer type; | |||
public static MaterialMould mappingPO(PageMaterialMouldDTO dto) { | |||
MaterialMould materialMould = new MaterialMould(); | |||
materialMould.setType(dto.getType()); | |||
materialMould.setStatus(EnumaMouldPatchStatus.put_on.getCode()); | |||
return materialMould; | |||
} | |||
} |
@@ -0,0 +1,23 @@ | |||
package com.iformall.dto; | |||
import com.iformall.domain.po.sm.PersonMould; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
@ApiModel(value = "分页查询数字人模板请求参数") | |||
@Data | |||
public class PagePersonMouldDTO extends PageDTO { | |||
@ApiModelProperty("0:保密,1:男,2:女") | |||
private Integer sex; | |||
@ApiModelProperty("1:竖版,2:横版") | |||
private Integer videoType; | |||
public static PersonMould mappingPO(PagePersonMouldDTO dto) { | |||
PersonMould personMould = new PersonMould(); | |||
personMould.setSex(dto.getSex()); | |||
personMould.setVideoType(dto.getVideoType()); | |||
return personMould; | |||
} | |||
} |
@@ -0,0 +1,20 @@ | |||
package com.iformall.dto; | |||
import com.iformall.domain.po.sm.UserMouldVideo; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
@ApiModel(value = "分页查询用户视频请求参数") | |||
@Data | |||
public class PageUserVideoDTO extends PageDTO { | |||
@ApiModelProperty("名称") | |||
private String title; | |||
public static UserMouldVideo mappingPO(PageUserVideoDTO dto) { | |||
UserMouldVideo userMouldVideo = new UserMouldVideo(); | |||
userMouldVideo.setTitle(dto.getTitle()); | |||
return userMouldVideo; | |||
} | |||
} |
@@ -0,0 +1,15 @@ | |||
package com.iformall.service; | |||
import com.iformall.dto.PageMaterialMouldDTO; | |||
import com.iformall.vo.PageMaterialMouldVO; | |||
import com.iformall.vo.PageVO; | |||
/** | |||
* 物料模板service | |||
* | |||
* @author xmzhao71 | |||
* @date 2023-10-17 | |||
*/ | |||
public interface ApiMaterialMouldService { | |||
PageVO<PageMaterialMouldVO> pageMaterialMould(PageMaterialMouldDTO dto); | |||
} |
@@ -0,0 +1,32 @@ | |||
package com.iformall.service; | |||
import com.github.pagehelper.PageInfo; | |||
import com.iformall.dto.PagePersonMouldDTO; | |||
import com.iformall.vo.GetPersonMouldVO; | |||
import com.iformall.vo.PagePersonMouldVO; | |||
import com.iformall.vo.PageVO; | |||
/** | |||
* 数字人模板service | |||
* | |||
* @author xmzhao71 | |||
* @date 2023-10-17 | |||
*/ | |||
public interface ApiPersonMouldService { | |||
/** | |||
* 分页查询数字人模板 | |||
* | |||
* @param dto | |||
* @return {@link PageInfo}<{@link PagePersonMouldVO}> | |||
*/ | |||
PageVO<PagePersonMouldVO> pagePersonMould(PagePersonMouldDTO dto); | |||
/** | |||
* 单个查询数字人模板 | |||
* | |||
* @param id | |||
* @return {@link GetPersonMouldVO} | |||
*/ | |||
GetPersonMouldVO getPersonMould(Long id); | |||
} |
@@ -0,0 +1,21 @@ | |||
package com.iformall.service; | |||
import com.iformall.dto.PageUserVideoDTO; | |||
import com.iformall.vo.GetUserVideoVO; | |||
import com.iformall.vo.PageUserVideoVO; | |||
import com.iformall.vo.PageVO; | |||
/** | |||
* 用户视频service | |||
* | |||
* @author xmzhao71 | |||
* @date 2023-10-17 | |||
*/ | |||
public interface ApiUserVideoService { | |||
PageVO<PageUserVideoVO> pageUserVideo(PageUserVideoDTO dto); | |||
GetUserVideoVO getUserVideo(Long id); | |||
void deleteUserVideo(Long id); | |||
} |
@@ -0,0 +1,31 @@ | |||
package com.iformall.service; | |||
import com.iformall.dto.ListVoiceLanguageDTO; | |||
import com.iformall.vo.GetVoiceMouldVO; | |||
import com.iformall.vo.ListVoiceLanguageVO; | |||
import java.util.List; | |||
/** | |||
* 声音模板service | |||
* | |||
* @author xmzhao71 | |||
* @date 2023-10-17 | |||
*/ | |||
public interface ApiVoiceMouldService { | |||
/** | |||
* 全查询语种 | |||
* | |||
* @param dto | |||
* @return {@link List}<{@link ListVoiceLanguageVO}> | |||
*/ | |||
List<ListVoiceLanguageVO> listVoiceLanguage(ListVoiceLanguageDTO dto); | |||
/** | |||
* 单个查询声音风格 | |||
* | |||
* @param id | |||
* @return {@link GetVoiceMouldVO} | |||
*/ | |||
List<GetVoiceMouldVO> getVoiceMould(Long id); | |||
} |
@@ -0,0 +1,34 @@ | |||
package com.iformall.service.impl; | |||
import com.github.pagehelper.PageInfo; | |||
import com.iformall.domain.po.sm.MaterialMould; | |||
import com.iformall.dto.PageMaterialMouldDTO; | |||
import com.iformall.service.ApiMaterialMouldService; | |||
import com.iformall.service.sm.MaterialMouldService; | |||
import com.iformall.vo.PageMaterialMouldVO; | |||
import com.iformall.vo.PageVO; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import java.util.List; | |||
import java.util.stream.Collectors; | |||
/** | |||
* 物料模板service | |||
* | |||
* @author xmzhao71 | |||
* @date 2023-10-17 | |||
*/ | |||
@Service | |||
public class ApiMaterialMouldServiceImpl implements ApiMaterialMouldService { | |||
@Autowired | |||
private MaterialMouldService materialMouldService; | |||
@Override | |||
public PageVO<PageMaterialMouldVO> pageMaterialMould(PageMaterialMouldDTO dto) { | |||
PageInfo<MaterialMould> materialMouldPage = materialMouldService.cListAsPage(PageMaterialMouldDTO.mappingPO(dto), dto.getPageNum(), dto.getPageSize()); | |||
List<PageMaterialMouldVO> result = materialMouldPage.getList().stream().map(PageMaterialMouldVO::mapping).collect(Collectors.toList()); | |||
return PageVO.build(materialMouldPage.getTotal(), result); | |||
} | |||
} |
@@ -0,0 +1,41 @@ | |||
package com.iformall.service.impl; | |||
import com.github.pagehelper.PageInfo; | |||
import com.iformall.domain.po.sm.PersonMould; | |||
import com.iformall.dto.PagePersonMouldDTO; | |||
import com.iformall.service.ApiPersonMouldService; | |||
import com.iformall.service.sm.PersonMouldService; | |||
import com.iformall.vo.GetPersonMouldVO; | |||
import com.iformall.vo.PagePersonMouldVO; | |||
import com.iformall.vo.PageVO; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import java.util.List; | |||
import java.util.stream.Collectors; | |||
/** | |||
* 数字人模板service | |||
* | |||
* @author xmzhao71 | |||
* @date 2023-10-17 | |||
*/ | |||
@Service | |||
public class ApiPersonMouldServiceImpl implements ApiPersonMouldService { | |||
@Autowired | |||
private PersonMouldService personMouldService; | |||
@Override | |||
public PageVO<PagePersonMouldVO> pagePersonMould(PagePersonMouldDTO dto) { | |||
PageInfo<PersonMould> personMouldPage = personMouldService.cListAsPage(PagePersonMouldDTO.mappingPO(dto), dto.getPageNum(), dto.getPageSize()); | |||
List<PagePersonMouldVO> result = personMouldPage.getList().stream().map(PagePersonMouldVO::mapping).collect(Collectors.toList()); | |||
return PageVO.build(personMouldPage.getTotal(), result); | |||
} | |||
@Override | |||
public GetPersonMouldVO getPersonMould(Long id) { | |||
PersonMould personMould = personMouldService.getDetailById(id); | |||
return GetPersonMouldVO.mapping(personMould); | |||
} | |||
} |
@@ -0,0 +1,46 @@ | |||
package com.iformall.service.impl; | |||
import com.github.pagehelper.PageInfo; | |||
import com.iformall.domain.po.sm.UserMouldVideo; | |||
import com.iformall.dto.PageUserVideoDTO; | |||
import com.iformall.service.ApiUserVideoService; | |||
import com.iformall.service.sm.UserMouldVideoService; | |||
import com.iformall.vo.GetUserVideoVO; | |||
import com.iformall.vo.PageUserVideoVO; | |||
import com.iformall.vo.PageVO; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import java.util.List; | |||
import java.util.stream.Collectors; | |||
/** | |||
* 用户视频service | |||
* | |||
* @author xmzhao71 | |||
* @date 2023-10-17 | |||
*/ | |||
@Service | |||
public class ApiUserVideoServiceImpl implements ApiUserVideoService { | |||
@Autowired | |||
private UserMouldVideoService userMouldVideoService; | |||
@Override | |||
public PageVO<PageUserVideoVO> pageUserVideo(PageUserVideoDTO dto) { | |||
PageInfo<UserMouldVideo> userMouldVideoPage = userMouldVideoService.cListAsPage(PageUserVideoDTO.mappingPO(dto), dto.getPageNum(), dto.getPageSize()); | |||
List<PageUserVideoVO> result = userMouldVideoPage.getList().stream().map(PageUserVideoVO::mapping).collect(Collectors.toList()); | |||
return PageVO.build(userMouldVideoPage.getTotal(), result); | |||
} | |||
@Override | |||
public GetUserVideoVO getUserVideo(Long id) { | |||
UserMouldVideo userMouldVideo = userMouldVideoService.getUserVideo(id); | |||
return GetUserVideoVO.mapping(userMouldVideo); | |||
} | |||
@Override | |||
public void deleteUserVideo(Long id) { | |||
userMouldVideoService.deleteById(id); | |||
} | |||
} |
@@ -0,0 +1,42 @@ | |||
package com.iformall.service.impl; | |||
import com.iformall.domain.po.sm.VoiceInfo; | |||
import com.iformall.domain.po.sm.VoiceLanguage; | |||
import com.iformall.dto.ListVoiceLanguageDTO; | |||
import com.iformall.service.ApiVoiceMouldService; | |||
import com.iformall.service.sm.VoiceInfoService; | |||
import com.iformall.service.sm.VoiceLanguageService; | |||
import com.iformall.vo.GetVoiceMouldVO; | |||
import com.iformall.vo.ListVoiceLanguageVO; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import java.util.List; | |||
import java.util.stream.Collectors; | |||
/** | |||
* 声音模板service | |||
* | |||
* @author xmzhao71 | |||
* @date 2023-10-17 | |||
*/ | |||
@Service | |||
public class ApiVoiceMouldServiceImpl implements ApiVoiceMouldService { | |||
@Autowired | |||
private VoiceLanguageService voiceLanguageService; | |||
@Autowired | |||
private VoiceInfoService voiceInfoService; | |||
@Override | |||
public List<ListVoiceLanguageVO> listVoiceLanguage(ListVoiceLanguageDTO dto) { | |||
List<VoiceLanguage> voiceLanguages = voiceLanguageService.listVoiceLanguage(dto.getChineseName()); | |||
return voiceLanguages.stream().map(ListVoiceLanguageVO::mapping).collect(Collectors.toList()); | |||
} | |||
@Override | |||
public List<GetVoiceMouldVO> getVoiceMould(Long id) { | |||
List<VoiceInfo> voiceInfos = voiceInfoService.chooseType(id); | |||
return voiceInfos.stream().map(GetVoiceMouldVO::mapping).collect(Collectors.toList()); | |||
} | |||
} |
@@ -0,0 +1,65 @@ | |||
package com.iformall.vo; | |||
import com.iformall.domain.po.sm.PersonMould; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import java.util.Date; | |||
@ApiModel(value = "单个查询数字人模板返回数据") | |||
@Data | |||
public class GetPersonMouldVO { | |||
@ApiModelProperty("模板标识") | |||
private Long id; | |||
@ApiModelProperty("1:竖版,2:横版") | |||
private Integer videoType; | |||
@ApiModelProperty("0:保密,1:男,2:女") | |||
private Integer sex; | |||
@ApiModelProperty("封面图") | |||
private String coverImg; | |||
@ApiModelProperty("多封面图") | |||
private String coverPicture; | |||
@ApiModelProperty("详情多图") | |||
private String detailPicture; | |||
@ApiModelProperty("年龄") | |||
private Integer age; | |||
@ApiModelProperty("颜色") | |||
private Integer colour; | |||
@ApiModelProperty("背景id") | |||
private Long backgroundId; | |||
@ApiModelProperty("背景素材") | |||
private String backgroundMaterial; | |||
@ApiModelProperty("创建时间") | |||
private Date createDate; | |||
@ApiModelProperty("更新时间") | |||
private Date updateDate; | |||
@ApiModelProperty("素材") | |||
private String material; | |||
@ApiModelProperty("模板第三方Id") | |||
private String mouldSmId; | |||
@ApiModelProperty("模板类型") | |||
private Integer sendType; | |||
@ApiModelProperty("状态(-1:全部,0:草稿/待生效,1:已生效,2:已失效,3:已作废)") | |||
private Integer status; | |||
public static GetPersonMouldVO mapping(PersonMould personMould) { | |||
GetPersonMouldVO vo = new GetPersonMouldVO(); | |||
vo.setId(personMould.getId()); | |||
vo.setVideoType(personMould.getVideoType()); | |||
vo.setSex(personMould.getSex()); | |||
vo.setCoverImg(personMould.getCoverImg()); | |||
vo.setCoverPicture(personMould.getCoverPicture()); | |||
vo.setDetailPicture(personMould.getDetailPicture()); | |||
vo.setAge(personMould.getAge()); | |||
vo.setColour(personMould.getColour()); | |||
vo.setBackgroundId(personMould.getBackgroundId()); | |||
vo.setBackgroundMaterial(personMould.getBackgroundMaterial()); | |||
vo.setCreateDate(personMould.getCreateDate()); | |||
vo.setUpdateDate(personMould.getUpdateDate()); | |||
vo.setMaterial(personMould.getMaterial()); | |||
vo.setSendType(personMould.getSendType()); | |||
vo.setStatus(personMould.getStatus()); | |||
return vo; | |||
} | |||
} |
@@ -0,0 +1,64 @@ | |||
package com.iformall.vo; | |||
import com.iformall.domain.po.sm.UserMouldVideo; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import java.util.Date; | |||
@ApiModel(value = "单个查询用户视频返回数据") | |||
@Data | |||
public class GetUserVideoVO { | |||
@ApiModelProperty("用户视频标识") | |||
private Long id; | |||
@ApiModelProperty(value="创建时间",name="createDate") | |||
private Date createDate; | |||
@ApiModelProperty(value="更新时间",name="updateDate") | |||
private Date updateDate; | |||
@ApiModelProperty(value="封面图",name="coverImg") | |||
private String coverImg; | |||
@ApiModelProperty(value="生成视频时间",name="createVideoDate") | |||
private Date createVideoDate; | |||
@ApiModelProperty(value="文案",name="paperwork") | |||
private String paperwork; | |||
@ApiModelProperty(value="名称",name="title") | |||
private String title; | |||
@ApiModelProperty(value="视频文件",name="videoId") | |||
private String videoId; | |||
@ApiModelProperty(value="生成视频信息",name="videoMsg") | |||
private String videoMsg; | |||
@ApiModelProperty(value="视频地址",name="videoPath") | |||
private String videoPath; | |||
@ApiModelProperty(value="播放地址",name="videoPlayUrl") | |||
private String videoPlayUrl; | |||
@ApiModelProperty(value="视频大小(byte)",name="videoSize") | |||
private Long videoSize; | |||
@ApiModelProperty("视频状态") | |||
private Integer videoStatus; | |||
@ApiModelProperty(value="视频时长(秒)",name="videoTime") | |||
private String videoTime; | |||
@ApiModelProperty("1:竖版,2:横版") | |||
private Integer videoType; | |||
public static GetUserVideoVO mapping(UserMouldVideo userMouldVideo) { | |||
GetUserVideoVO vo = new GetUserVideoVO(); | |||
vo.setId(userMouldVideo.getId()); | |||
vo.setCreateDate(userMouldVideo.getCreateDate()); | |||
vo.setUpdateDate(userMouldVideo.getUpdateDate()); | |||
vo.setCoverImg(userMouldVideo.getCoverImg()); | |||
vo.setCreateVideoDate(userMouldVideo.getCreateVideoDate()); | |||
vo.setPaperwork(userMouldVideo.getPaperwork()); | |||
vo.setTitle(userMouldVideo.getTitle()); | |||
vo.setVideoId(userMouldVideo.getVideoId()); | |||
vo.setVideoMsg(userMouldVideo.getVideoMsg()); | |||
vo.setVideoPath(userMouldVideo.getVideoPath()); | |||
vo.setVideoPlayUrl(userMouldVideo.getVideoPlayUrl()); | |||
vo.setVideoSize(userMouldVideo.getVideoSize()); | |||
vo.setVideoStatus(userMouldVideo.getVideoStatus()); | |||
vo.setVideoTime(userMouldVideo.getVideoTime()); | |||
vo.setVideoType(userMouldVideo.getVideoType()); | |||
return vo; | |||
} | |||
} |
@@ -0,0 +1,44 @@ | |||
package com.iformall.vo; | |||
import com.iformall.domain.po.sm.VoiceInfo; | |||
import com.iformall.domain.vo.VoiceInfoVo; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import org.apache.commons.collections.CollectionUtils; | |||
import org.apache.commons.lang3.StringUtils; | |||
import java.util.Collections; | |||
import java.util.Date; | |||
import java.util.List; | |||
@ApiModel(value = "单个查询声音风格返回数据") | |||
@Data | |||
public class GetVoiceMouldVO { | |||
@ApiModelProperty("性别") | |||
private Integer sex; | |||
@ApiModelProperty("年纪类型") | |||
private Integer ageType; | |||
@ApiModelProperty("展示名称") | |||
private String displayName; | |||
@ApiModelProperty("本地名称") | |||
private String localName; | |||
@ApiModelProperty("创建时间") | |||
private Date createDate; | |||
@ApiModelProperty("更新时间") | |||
private Date updateDate; | |||
@ApiModelProperty("声音风格") | |||
private List<VoiceInfoVo> styles; | |||
public static GetVoiceMouldVO mapping(VoiceInfo voiceInfo) { | |||
GetVoiceMouldVO vo = new GetVoiceMouldVO(); | |||
vo.setSex(voiceInfo.getSex()); | |||
vo.setAgeType(voiceInfo.getAgeType()); | |||
vo.setDisplayName(voiceInfo.getDisplayName()); | |||
vo.setLocalName(voiceInfo.getLocalName()); | |||
vo.setCreateDate(voiceInfo.getCreateDate()); | |||
vo.setStyles(voiceInfo.getStyle()); | |||
return null; | |||
} | |||
} |
@@ -0,0 +1,45 @@ | |||
package com.iformall.vo; | |||
import com.iformall.domain.po.sm.VoiceLanguage; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import java.util.Date; | |||
@ApiModel(value = "全查询语种请求参数返回数据") | |||
@Data | |||
public class ListVoiceLanguageVO { | |||
@ApiModelProperty("语种标识") | |||
private Long id; | |||
@ApiModelProperty("国家code") | |||
private String country; | |||
@ApiModelProperty("语言code") | |||
private String language; | |||
@ApiModelProperty("地区语言") | |||
private String local; | |||
@ApiModelProperty("地区国家名称") | |||
private String name; | |||
@ApiModelProperty("语言名称") | |||
private String chineseName; | |||
@ApiModelProperty("地区国家图片") | |||
private String img; | |||
@ApiModelProperty("创建时间") | |||
private Date createDate; | |||
@ApiModelProperty("更新时间") | |||
private Date updateDate; | |||
public static ListVoiceLanguageVO mapping(VoiceLanguage voiceLanguage) { | |||
ListVoiceLanguageVO vo = new ListVoiceLanguageVO(); | |||
vo.setId(voiceLanguage.getId()); | |||
vo.setCountry(voiceLanguage.getCountry()); | |||
vo.setLanguage(voiceLanguage.getLanguage()); | |||
vo.setLocal(voiceLanguage.getLocal()); | |||
vo.setName(voiceLanguage.getName()); | |||
vo.setChineseName(voiceLanguage.getChineseName()); | |||
vo.setImg(voiceLanguage.getImg()); | |||
vo.setCreateDate(voiceLanguage.getCreateDate()); | |||
vo.setUpdateDate(voiceLanguage.getUpdateDate()); | |||
return vo; | |||
} | |||
} |
@@ -0,0 +1,38 @@ | |||
package com.iformall.vo; | |||
import com.iformall.domain.po.sm.MaterialMould; | |||
import io.swagger.annotations.ApiModel; | |||
import lombok.Data; | |||
import java.util.Date; | |||
@ApiModel(value = "分页查询物料模板返回数据") | |||
@Data | |||
public class PageMaterialMouldVO { | |||
@io.swagger.annotations.ApiModelProperty("物料标识") | |||
private Long id; | |||
@io.swagger.annotations.ApiModelProperty("创建时间") | |||
private Date createDate; | |||
@io.swagger.annotations.ApiModelProperty("更新时间") | |||
private Date updateDate; | |||
@io.swagger.annotations.ApiModelProperty("素材地址") | |||
private String material; | |||
@io.swagger.annotations.ApiModelProperty("名称") | |||
private String title; | |||
@io.swagger.annotations.ApiModelProperty("4:背景,5:素材") | |||
private Integer type; | |||
@io.swagger.annotations.ApiModelProperty("1:竖版,2:横版") | |||
private Integer videoType; | |||
public static PageMaterialMouldVO mapping(MaterialMould materialMould) { | |||
PageMaterialMouldVO vo = new PageMaterialMouldVO(); | |||
vo.setId(materialMould.getId()); | |||
vo.setCreateDate(materialMould.getCreateDate()); | |||
vo.setUpdateDate(materialMould.getUpdateDate()); | |||
vo.setMaterial(materialMould.getMaterial()); | |||
vo.setTitle(materialMould.getTitle()); | |||
vo.setType(materialMould.getType()); | |||
vo.setVideoType(materialMould.getVideoType()); | |||
return vo; | |||
} | |||
} |
@@ -0,0 +1,60 @@ | |||
package com.iformall.vo; | |||
import com.iformall.domain.po.sm.PersonMould; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import java.util.Date; | |||
@ApiModel(value = "分页查询数字人模板返回数据") | |||
@Data | |||
public class PagePersonMouldVO { | |||
@ApiModelProperty("模板标识") | |||
private Long id; | |||
@ApiModelProperty("1:竖版,2:横版") | |||
private Integer videoType; | |||
@ApiModelProperty("0:保密,1:男,2:女") | |||
private Integer sex; | |||
@ApiModelProperty("封面图") | |||
private String coverImg; | |||
@ApiModelProperty("多封面图") | |||
private String coverPicture; | |||
@ApiModelProperty("年龄") | |||
private Integer age; | |||
@ApiModelProperty("颜色") | |||
private Integer colour; | |||
@ApiModelProperty("背景id") | |||
private Long backgroundId; | |||
@ApiModelProperty("背景素材") | |||
private String backgroundMaterial; | |||
@ApiModelProperty("创建时间") | |||
private Date createDate; | |||
@ApiModelProperty("更新时间") | |||
private Date updateDate; | |||
@ApiModelProperty("素材") | |||
private String material; | |||
@ApiModelProperty("模板类型") | |||
private Integer sendType; | |||
@ApiModelProperty("状态(-1:全部,0:草稿/待生效,1:已生效,2:已失效,3:已作废)") | |||
private Integer status; | |||
public static PagePersonMouldVO mapping(PersonMould personMould) { | |||
PagePersonMouldVO vo = new PagePersonMouldVO(); | |||
vo.setId(personMould.getId()); | |||
vo.setVideoType(personMould.getVideoType()); | |||
vo.setSex(personMould.getSex()); | |||
vo.setCoverImg(personMould.getCoverImg()); | |||
vo.setCoverPicture(personMould.getCoverPicture()); | |||
vo.setAge(personMould.getAge()); | |||
vo.setColour(personMould.getColour()); | |||
vo.setBackgroundId(personMould.getBackgroundId()); | |||
vo.setBackgroundMaterial(personMould.getBackgroundMaterial()); | |||
vo.setCreateDate(personMould.getCreateDate()); | |||
vo.setUpdateDate(personMould.getUpdateDate()); | |||
vo.setMaterial(personMould.getMaterial()); | |||
vo.setSendType(personMould.getSendType()); | |||
vo.setStatus(personMould.getStatus()); | |||
return vo; | |||
} | |||
} |
@@ -0,0 +1,63 @@ | |||
package com.iformall.vo; | |||
import com.iformall.domain.po.sm.UserMouldVideo; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import java.util.Date; | |||
@ApiModel(value = "分页查询用户视频返回数据") | |||
@Data | |||
public class PageUserVideoVO { | |||
@ApiModelProperty("用户视频标识") | |||
private Long id; | |||
@ApiModelProperty(value="创建时间",name="createDate") | |||
private Date createDate; | |||
@ApiModelProperty(value="更新时间",name="updateDate") | |||
private Date updateDate; | |||
@ApiModelProperty(value="封面图",name="coverImg") | |||
private String coverImg; | |||
@ApiModelProperty(value="生成视频时间",name="createVideoDate") | |||
private Date createVideoDate; | |||
@ApiModelProperty(value="文案",name="paperwork") | |||
private String paperwork; | |||
@ApiModelProperty(value="名称",name="title") | |||
private String title; | |||
@ApiModelProperty(value="视频文件",name="videoId") | |||
private String videoId; | |||
@ApiModelProperty(value="生成视频信息",name="videoMsg") | |||
private String videoMsg; | |||
@ApiModelProperty(value="视频地址",name="videoPath") | |||
private String videoPath; | |||
@ApiModelProperty(value="播放地址",name="videoPlayUrl") | |||
private String videoPlayUrl; | |||
@ApiModelProperty(value="视频大小(byte)",name="videoSize") | |||
private Long videoSize; | |||
@ApiModelProperty("视频状态") | |||
private Integer videoStatus; | |||
@ApiModelProperty(value="视频时长(秒)",name="videoTime") | |||
private String videoTime; | |||
@ApiModelProperty("1:竖版,2:横版") | |||
private Integer videoType; | |||
public static PageUserVideoVO mapping(UserMouldVideo userMouldVideo) { | |||
PageUserVideoVO vo = new PageUserVideoVO(); | |||
vo.setId(userMouldVideo.getId()); | |||
vo.setCreateDate(userMouldVideo.getCreateDate()); | |||
vo.setUpdateDate(userMouldVideo.getUpdateDate()); | |||
vo.setCoverImg(userMouldVideo.getCoverImg()); | |||
vo.setCreateVideoDate(userMouldVideo.getCreateVideoDate()); | |||
vo.setPaperwork(userMouldVideo.getPaperwork()); | |||
vo.setTitle(userMouldVideo.getTitle()); | |||
vo.setVideoId(userMouldVideo.getVideoId()); | |||
vo.setVideoMsg(userMouldVideo.getVideoMsg()); | |||
vo.setVideoPath(userMouldVideo.getVideoPath()); | |||
vo.setVideoPlayUrl(userMouldVideo.getVideoPlayUrl()); | |||
vo.setVideoSize(userMouldVideo.getVideoSize()); | |||
vo.setVideoStatus(userMouldVideo.getVideoStatus()); | |||
vo.setVideoTime(userMouldVideo.getVideoTime()); | |||
vo.setVideoType(userMouldVideo.getVideoType()); | |||
return vo; | |||
} | |||
} |
@@ -0,0 +1,25 @@ | |||
package com.iformall.vo; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import java.util.List; | |||
@Data | |||
@ApiModel(value = "分页信息主体") | |||
public class PageVO<T> { | |||
@ApiModelProperty(value = "总条数") | |||
private long total; | |||
@ApiModelProperty(value = "具体数据") | |||
private List<T> records; | |||
public PageVO(long total, List<T> records) { | |||
this.total = total; | |||
this.records = records; | |||
} | |||
public static <T> PageVO<T> build(long total, List<T> records) { | |||
return new PageVO<T>(total, records); | |||
} | |||
} |
@@ -59,4 +59,5 @@ public interface UserMouldVideoService { | |||
List<UserMouldVideo> getNotHaveUrl(); | |||
UserMouldVideo getUserVideo(Long id); | |||
} |
@@ -10,4 +10,6 @@ public interface VoiceLanguageService { | |||
List<VoiceLanguage> voiceTotal(); | |||
VoiceLanguage getLanguage(String paperwork); | |||
List<VoiceLanguage> listVoiceLanguage(String chineseName); | |||
} |
@@ -511,4 +511,9 @@ public class UserMouldVideoServiceImpl implements UserMouldVideoService { | |||
return userMouldVideoMapper.getNotHaveUrl(umVideoQ); | |||
} | |||
@Override | |||
public UserMouldVideo getUserVideo(Long id) { | |||
return userMouldVideoMapper.selectById(id); | |||
} | |||
} |
@@ -14,6 +14,8 @@ import org.apache.commons.lang3.StringUtils; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import java.util.ArrayList; | |||
import java.util.Collections; | |||
import java.util.List; | |||
import java.util.Optional; | |||
@@ -49,4 +51,13 @@ public class VoiceLanguageServiceImpl implements VoiceLanguageService { | |||
return voiceLanguages.get(0); | |||
} | |||
@Override | |||
public List<VoiceLanguage> listVoiceLanguage(String chineseName) { | |||
List<VoiceLanguage> languages = voiceLanguageMapper.selectList(new LambdaQueryWrapper<VoiceLanguage>() | |||
.eq(VoiceLanguage::getIsDel, 0) | |||
.like(StringUtils.isNotBlank(chineseName), VoiceLanguage::getChineseName, chineseName) | |||
.orderByAsc(VoiceLanguage::getLocal)); | |||
return CollectionUtils.isEmpty(languages) ? Collections.emptyList() : languages; | |||
} | |||
} |