| | |
| | | import com.ruoyi.purchase.service.ITicketRegistrationService; |
| | | import com.ruoyi.purchase.service.impl.TicketRegistrationServiceImpl; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | |
| | |
| | | private TicketRegistrationServiceImpl ticketRegistrationServiceImpl; |
| | | |
| | | @PostMapping("/upload") |
| | | public AjaxResult uploadFile(MultipartFile file, Integer type) { |
| | | public AjaxResult uploadFile(MultipartFile file, @RequestParam(required = false) Integer type) { |
| | | try { |
| | | return AjaxResult.success(tempFileService.uploadFile(file, type)); |
| | | } catch (Exception e) { |