Search in sources :

Example 1 with OptAttachmentRespDto

use of com.paascloud.provider.model.dto.attachment.OptAttachmentRespDto in project paascloud-master by paascloud.

the class OptAttachmentServiceImpl method queryAttachmentById.

@Override
public OptAttachmentRespDto queryAttachmentById(Long id) {
    Preconditions.checkArgument(id != null, "ID不能为空");
    OptAttachmentReqDto optAttachmentReqDto = new OptAttachmentReqDto();
    optAttachmentReqDto.setId(id);
    List<OptAttachmentRespDto> optAttachmentRespDtos = optAttachmentMapper.queryAttachment(optAttachmentReqDto);
    return optAttachmentRespDtos == null ? null : optAttachmentRespDtos.get(0);
}
Also used : OptAttachmentReqDto(com.paascloud.provider.model.dto.attachment.OptAttachmentReqDto) OptAttachmentRespDto(com.paascloud.provider.model.dto.attachment.OptAttachmentRespDto)

Example 2 with OptAttachmentRespDto

use of com.paascloud.provider.model.dto.attachment.OptAttachmentRespDto in project paascloud-master by paascloud.

the class OpcFileController method queryAttachment.

/**
 * 根据ID查询附件信息.
 *
 * @param id the id
 *
 * @return the wrapper
 */
@PostMapping(value = "/queryAttachmentById/{id}")
@ApiOperation(httpMethod = "POST", value = "根据ID查询附件信息")
public Wrapper<OptAttachmentRespDto> queryAttachment(@PathVariable Long id) {
    logger.info("queryAttachment -根据ID查询文件信息. id={}", id);
    OptAttachmentRespDto optAttachmentRespDto = optAttachmentService.queryAttachmentById(id);
    return WrapMapper.ok(optAttachmentRespDto);
}
Also used : OptAttachmentRespDto(com.paascloud.provider.model.dto.attachment.OptAttachmentRespDto) PostMapping(org.springframework.web.bind.annotation.PostMapping) ApiOperation(io.swagger.annotations.ApiOperation)

Aggregations

OptAttachmentRespDto (com.paascloud.provider.model.dto.attachment.OptAttachmentRespDto)2 OptAttachmentReqDto (com.paascloud.provider.model.dto.attachment.OptAttachmentReqDto)1 ApiOperation (io.swagger.annotations.ApiOperation)1 PostMapping (org.springframework.web.bind.annotation.PostMapping)1