lxw
2023-02-09 de0e3d2ac2c6d971ba8889a7b194c9be72c59137
src/main/java/com/whyc/controller/BOMFeedbakController.java
@@ -1,14 +1,17 @@
package com.whyc.controller;
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.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.mail.MessagingException;
import java.io.IOException;
@RestController
@Api(tags = "反馈管理")
@@ -28,4 +31,17 @@
    public Response getRecevierStatus(@RequestParam int flag, @RequestParam int pageCurr, @RequestParam int pageSize){
        return service.getRecevierStatus(flag,pageCurr,pageSize);
    }
    @ApiOperation(value = "接收者确认反馈")
    @GetMapping("setconfirmFk")
    public Response setconfirmFk(@RequestParam int id){
        return service.setconfirmFk(id);
    }
    @ApiOperation("提交反馈")
    @PostMapping("submitFeedback")
    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);
    }
}