
package com.tmerclub.cloud.biz.controller.app;


import com.tmerclub.cloud.biz.service.AttachFileService;
import com.tmerclub.cloud.biz.vo.AttachFileVO;
import com.tmerclub.cloud.common.response.ServerResponseEntity;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
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;

/**
 * 上传文件记录表
 *
 * @author YXF
 * @date 2020-11-21 10:21:40
 */
@RestController("appAttachFileController")
@RequestMapping("/attachFile")
@Tag(name = "app-文件记录表")
public class AttachFileController {

    @Autowired
    private AttachFileService attachFileService;

    @GetMapping("/getFileById")
    @Operation(summary = "根据文件id获取文件信息")
    public ServerResponseEntity<AttachFileVO> getFileById(Long fileId) {
        AttachFileVO attachFileVO = attachFileService.getById(fileId);
        return ServerResponseEntity.success(attachFileVO);
    }

}
