| | |
| | | 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; |
| | |
| | | |
| | | @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); |
| | | } |
| | | } |