| | |
| | | package cn.flightfeather.supervision.lightshare.web |
| | | |
| | | import cn.flightfeather.supervision.lightshare.service.CommitmentService |
| | | import cn.flightfeather.supervision.lightshare.vo.BaseResponse |
| | | import cn.flightfeather.supervision.lightshare.vo.CommitmentVo |
| | | import io.swagger.annotations.Api |
| | | import io.swagger.annotations.ApiOperation |
| | | import io.swagger.annotations.ApiParam |
| | | import io.swagger.annotations.ApiResponse |
| | | import org.springframework.web.bind.annotation.* |
| | | import org.springframework.web.multipart.MultipartFile |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest |
| | | import javax.servlet.http.HttpServletRequest |
| | | import javax.servlet.http.HttpServletResponse |
| | | |
| | | /** |
| | |
| | | @ApiParam(value = "承诺书信息json") @RequestParam("params") commitmentVoList: String, |
| | | @ApiParam(value = "承诺书图片") @RequestPart("images") files: Array<MultipartFile> |
| | | ) = commitmentService.uploadLetterOfCommitment(userId, commitmentVoList, files) |
| | | |
| | | @ApiOperation(value = "生成承诺书") |
| | | @PostMapping("/letter/create") |
| | | fun createLetterOfCommitment(request: HttpServletRequest) = if (request is MultipartHttpServletRequest) { |
| | | val sign = request.getFile("sign") |
| | | val seal = request.getFile("seal") |
| | | val userId = request.getParameter("userId") |
| | | val vo = request.getParameter("coVo") |
| | | |
| | | commitmentService.createLetterOfCommitment(userId, vo, sign, seal) |
| | | } else { |
| | | BaseResponse(false) |
| | | } |
| | | } |