|
|
@ -12,8 +12,10 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.apache.commons.codec.binary.Base64;
|
|
|
|
import org.apache.commons.codec.binary.Base64;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.util.Assert;
|
|
|
|
import org.springframework.util.Assert;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import java.io.*;
|
|
|
|
import java.io.*;
|
|
|
@ -276,6 +278,29 @@ public class JupyterController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("uploadFile")
|
|
|
|
|
|
|
|
@ApiOperation("新增数据集") //todo 案例目录和案例正文通过前端传路径过来 ,这里只存url
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
|
|
|
ResultEntity<String> uploadFile(List<MultipartFile> dataFile) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String filepath = "/usr/local/tianzeProject/financial_bigdata_total/py/dataResource/";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//设置数据文件
|
|
|
|
|
|
|
|
if (dataFile != null && !dataFile.isEmpty()) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (MultipartFile file : dataFile) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
iFileUtil.uploadResource(file,filepath);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK,"上传成功");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|