| | |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.enumerates.DataDictionaryEnum; |
| | | import cc.mrbird.febs.common.exception.FebsException; |
| | | import cc.mrbird.febs.common.utils.FileUtil; |
| | | import cc.mrbird.febs.common.utils.OssUtils; |
| | | import cc.mrbird.febs.mall.dto.*; |
| | |
| | | private final IAdminMallGoodsService adminMallGoodsService; |
| | | private final DataDictionaryCustomMapper dataDictionaryCustomMapper; |
| | | |
| | | // 文件保存目录URL |
| | | @Value("${static.resource.ai.common}") |
| | | private String commonPath; |
| | | // 文件保存目录URL |
| | | @Value("${static.resource.ai.company}") |
| | | private String companyPath; |
| | | @ControllerEndpoint(operation = "文件上传服务器", exceptionMessage = "上传失败") |
| | | @PostMapping(value = "/fileUploadEsc") |
| | | public Map<String,Object> fileUploadEsc(@RequestBody @Validated MultipartFile file) throws IOException { |
| | | if (file == null) { |
| | | throw new FebsException("上传文件不能为空"); |
| | | } |
| | | |
| | | String path = commonPath; |
| | | String companyId = getCurrentUserCompanyId(); |
| | | if (StrUtil.isNotEmpty(companyId)){ |
| | | path = companyPath + companyId; |
| | | } |
| | | return FileUtil.fileUploadEsc(file,null,path); |
| | | } |
| | | |
| | | // /** |
| | | // * 图片上传 |
| | | // * @return |