【解决todo】image 删除重命名

This commit is contained in:
cherishsince 2024-05-30 10:26:23 +08:00
parent 610badf503
commit 5d8aedbe9b
3 changed files with 5 additions and 5 deletions

View File

@ -78,10 +78,10 @@ public class AiImageController {
}
@Operation(summary = "删除【我的】绘画记录")
@DeleteMapping("/my-delete")
@DeleteMapping("/delete-my")
@Parameter(name = "id", required = true, description = "绘画编号", example = "1024")
public CommonResult<Boolean> myDelete(@RequestParam("id") Long id) {
return success(aiImageService.myDelete(id, getLoginUserId()));
public CommonResult<Boolean> deleteMyById(@RequestParam("id") Long id) {
return success(aiImageService.deleteMyById(id, getLoginUserId()));
}
}

View File

@ -62,6 +62,6 @@ public interface AiImageService {
* @param id
* @param loginUserId
*/
Boolean myDelete(Long id, Long loginUserId);
Boolean deleteMyById(Long id, Long loginUserId);
}

View File

@ -184,7 +184,7 @@ public class AiImageServiceImpl implements AiImageService {
}
@Override
public Boolean myDelete(Long id, Long userId) {
public Boolean deleteMyById(Long id, Long userId) {
// 校验是否存在并获取 image
AiImageDO image = validateExists(id);
// 是否属于当前用户