package com.cy.guoyan.admin.module.infra.api.file;

import com.cy.guoyan.admin.module.infra.service.file.FileService;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.annotation.Resource;
import java.util.Map;

/**
 * 文件 API 实现类
 *
 * @author 木易
 */
@Service
@Validated
public class FileApiImpl implements FileApi {

    @Resource
    private FileService fileService;

    @Override
    public String createFile(byte[] content, String name, String directory, String type,String  restricted) {
        return fileService.createFile(content, name, directory, type,restricted);
    }

    @Override
    public Map<String, Object> getFile(Long businessId, String jobTypeCode, String name, String path, byte[] content,String restricted) {
        return fileService.getFile(businessId,jobTypeCode,name, path, content, restricted);
    }

}
