whycxzp
2023-02-06 e0e69bb175c7cafe0c397197ca128157ebbf9a04
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);
    }
}