|
|
@@ -330,4 +330,23 @@ public class PhotoSpeakVideoController extends BaseController { |
|
|
|
return musicInfoService.saveOrUpdate(record); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("根据id删除接口") |
|
|
|
@GetMapping("/delete") |
|
|
|
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) |
|
|
|
public ResultData delete(Long id) { |
|
|
|
logger.debug("[" + getIpAddr() + "] PersonPhotoController::delete"); |
|
|
|
if(id == null){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"参数为空"); |
|
|
|
} |
|
|
|
MusicInfo musicInfo = musicInfoService.getById(id); |
|
|
|
if(musicInfo == null){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"未找到数据"); |
|
|
|
} |
|
|
|
if(!musicInfo.getUserId().equals(getMemberId())){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"未找到用户数据"); |
|
|
|
} |
|
|
|
musicInfoService.deleteById(id); |
|
|
|
return new ResultData(); |
|
|
|
} |
|
|
|
|
|
|
|
} |