mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2025-01-31 09:30:05 +08:00
【功能新增】AI:音乐管理 100%
This commit is contained in:
parent
9d6b615f10
commit
128c38ca02
@ -30,6 +30,14 @@ public class AiMusicController {
|
||||
@Resource
|
||||
private AiMusicService musicService;
|
||||
|
||||
// TODO @xin:一个接口,获得【我的】音乐分页,参考 获得【我的】聊天角色分页 来写;用于我自己生成的列表,和音乐广场
|
||||
|
||||
// TODO @xin:一个接口,删除【我的】音乐
|
||||
|
||||
// TODO @xin:一个接口,获得【我的】音乐
|
||||
|
||||
// TODO @xin:一个接口,修改【我的】音乐,目前只支持修改标题
|
||||
|
||||
@PostMapping("/generate")
|
||||
@Operation(summary = "音乐生成")
|
||||
public CommonResult<List<Long>> generateMusic(@RequestBody @Valid AiSunoGenerateReqVO reqVO) {
|
||||
@ -55,7 +63,7 @@ public class AiMusicController {
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@PutMapping("/update-public-status")
|
||||
@Operation(summary = "更新音乐发布状态")
|
||||
@PreAuthorize("@ss.hasPermission('ai:music:update')")
|
||||
public CommonResult<Boolean> updateMusicPublicStatus(@Valid @RequestBody AiMusicUpdatePublicStatusReqVO updateReqVO) {
|
||||
|
@ -18,7 +18,7 @@ import java.util.List;
|
||||
*
|
||||
* @author xiaoxin
|
||||
*/
|
||||
@TableName("ai_music")
|
||||
@TableName(value = "ai_music", autoResultMap = true)
|
||||
@Data
|
||||
public class AiMusicDO extends BaseDO {
|
||||
|
||||
|
@ -112,7 +112,7 @@ public class AiMusicServiceImpl implements AiMusicService {
|
||||
// 校验存在
|
||||
validateMusicExists(updateReqVO.getId());
|
||||
// 更新
|
||||
musicMapper.updateBatch(new AiMusicDO().setPublicStatus(updateReqVO.getPublicStatus()));
|
||||
musicMapper.updateById(new AiMusicDO().setId(updateReqVO.getId()).setPublicStatus(updateReqVO.getPublicStatus()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user