|
@@ -25,6 +25,7 @@ import java.nio.file.Files;
|
|
|
import java.nio.file.Path;
|
|
|
import java.nio.file.Paths;
|
|
|
import java.util.Date;
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("/large/check")
|
|
@@ -98,13 +99,15 @@ public class PlatProjectCheckController extends BaseController {
|
|
|
* 更改问题状态
|
|
|
* */
|
|
|
@PostMapping("/changeIssueStatus")
|
|
|
- public AjaxResult changeIssueStatus(@RequestPart("issue") LargeIssue entity, @RequestPart(value = "file") MultipartFile file) {
|
|
|
+ public AjaxResult changeIssueStatus(@RequestPart("issue") LargeIssue entity, @RequestPart(value = "file",required = false) MultipartFile file) {
|
|
|
try {
|
|
|
- // 上传文件路径
|
|
|
- String filePath = ProjectConfig.getUploadPath();
|
|
|
- // 上传并返回新文件名称
|
|
|
- String fileName = FileUploadUtils.upload(filePath, file);
|
|
|
- entity.setImagePath("/uploadPath" + fileName.substring(8));
|
|
|
+ if (Objects.nonNull(file)) {
|
|
|
+ // 上传文件路径
|
|
|
+ String filePath = ProjectConfig.getUploadPath();
|
|
|
+ // 上传并返回新文件名称
|
|
|
+ String fileName = FileUploadUtils.upload(filePath, file);
|
|
|
+ entity.setImagePath("/uploadPath" + fileName.substring(8));
|
|
|
+ }
|
|
|
}catch (Exception e){
|
|
|
}
|
|
|
return toAjax(largeIssueService.updateById(entity));
|