...
This commit is contained in:
parent
92eb9d542e
commit
861483a477
|
@ -114,4 +114,5 @@ public class CodeGenerationUtils {
|
|||
public static CodeGenerationUtils getInstance() {
|
||||
return CodeGenerationUtilsEnum.INSTANCE.getInstnce();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -48,8 +48,8 @@ public class DevelopmentGuideController {
|
|||
})
|
||||
public Result uploadDevelopmentFile(@RequestParam("file") MultipartFile uploadFile, HttpServletRequest request) {
|
||||
try {
|
||||
developmentGuideService.uploadDevelopmentFile(uploadFile, request);
|
||||
return new Result();
|
||||
String s = developmentGuideService.uploadDevelopmentFile(uploadFile, request);
|
||||
return new Result().ok(s);
|
||||
}catch (Exception e) {
|
||||
return new Result().error(e.getMessage());
|
||||
}
|
||||
|
|
|
@ -9,5 +9,5 @@ public interface DevelopmentGuideService {
|
|||
|
||||
void getDevelopmentFile(HttpServletRequest request, HttpServletResponse response) throws Exception;
|
||||
|
||||
void uploadDevelopmentFile(MultipartFile uploadFile, HttpServletRequest request) throws Exception;
|
||||
String uploadDevelopmentFile(MultipartFile uploadFile, HttpServletRequest request) throws Exception;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public class DevelopmentGuideServiceImpl implements DevelopmentGuideService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void uploadDevelopmentFile(MultipartFile uploadFile, HttpServletRequest request) throws Exception{
|
||||
public String uploadDevelopmentFile(MultipartFile uploadFile, HttpServletRequest request) throws Exception{
|
||||
logger.info("----------------------------------开始上传开发指南--------------------------------------------------");
|
||||
String type = request.getParameter("type");
|
||||
String fileName = request.getParameter("fileName");
|
||||
|
@ -81,6 +81,7 @@ public class DevelopmentGuideServiceImpl implements DevelopmentGuideService {
|
|||
// 文件保存
|
||||
uploadFile.transferTo(new File(path, fileName));
|
||||
logger.info("----------------------------------文件上传成功--------------------------------------");
|
||||
return folder.getPath();
|
||||
} catch (IOException e) {
|
||||
logger.info("----------------------------------文件上传失败--------------------------------------");
|
||||
logger.info("异常描述" + e.getMessage());
|
||||
|
|
Loading…
Reference in New Issue