From e0e69bb175c7cafe0c397197ca128157ebbf9a04 Mon Sep 17 00:00:00 2001
From: whycxzp <perryhsu@163.com>
Date: 星期一, 06 二月 2023 16:53:44 +0800
Subject: [PATCH] 接口格式修复

---
 src/main/java/com/whyc/controller/BOMFeedbakController.java |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/whyc/controller/BOMFeedbakController.java b/src/main/java/com/whyc/controller/BOMFeedbakController.java
index 3eef2b8..b78f53a 100644
--- a/src/main/java/com/whyc/controller/BOMFeedbakController.java
+++ b/src/main/java/com/whyc/controller/BOMFeedbakController.java
@@ -3,10 +3,12 @@
 import com.whyc.dto.Response;
 import com.whyc.pojo.BOMFeedback;
 import com.whyc.service.BOMFeedbakService;
+import com.whyc.util.ActionUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.mail.MessagingException;
 import java.io.IOException;
@@ -38,7 +40,8 @@
 
     @ApiOperation("鎻愪氦鍙嶉")
     @PostMapping("submitFeedback")
-    public Response submitFeedback(@RequestBody BOMFeedback feedback) throws IOException, MessagingException {
-        return service.submitFeedback(feedback);
+    public Response submitFeedback(@RequestPart(required = false) MultipartFile multipartFile,@RequestParam String feedbackJson) throws IOException, MessagingException {
+        BOMFeedback feedback = ActionUtil.getGson().fromJson(feedbackJson, BOMFeedback.class);
+        return service.submitFeedback(feedback,multipartFile);
     }
 }

--
Gitblit v1.9.1