|
@@ -359,10 +359,14 @@ public class WorkOrderManageController {
|
|
|
@ApiOperation(value = "上传APP安装包")
|
|
|
@RequestMapping(value = "addAppPackage", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
- public AjaxMessage<String> addAppPackage(@ApiParam(value = "上传APP安装包", required = true) @RequestParam("avatarfile") MultipartFile file) {
|
|
|
+ public AjaxMessage<String> addAppPackage(@ApiParam(value = "上传APP安装包", required = true) @RequestParam("avatarfile") MultipartFile file,
|
|
|
+ @RequestPart("filePath") String filePath) {
|
|
|
String avatar = "";
|
|
|
if (!file.isEmpty()) {
|
|
|
try {
|
|
|
+ if(filePath == null){
|
|
|
+ return new AjaxMessage<>(ResultStatus.ERROR,"参数文件路径不能为空");
|
|
|
+ }
|
|
|
//上传简单文件名
|
|
|
String originalFilename = file.getOriginalFilename();
|
|
|
String suffixName = originalFilename.substring(originalFilename.lastIndexOf("."));
|
|
@@ -374,7 +378,7 @@ public class WorkOrderManageController {
|
|
|
if (size > 1024 * 1024 * 200) {
|
|
|
return new AjaxMessage<>(ResultStatus.ERROR, "文件不能超过200M");
|
|
|
}
|
|
|
- avatar = new StringBuffer(appPackageDir).append(originalFilename).toString();
|
|
|
+ avatar = new StringBuffer(appPackageDir).append(filePath).append(originalFilename).toString();
|
|
|
File dest = new File(avatar);
|
|
|
if(!dest.getParentFile().exists()){
|
|
|
dest.getParentFile().mkdirs();
|