| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | |
| | | */ |
| | | @Log(title = "产品规格型号", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addOrEditProductModel") |
| | | public AjaxResult addOrEditProductModel(@RequestBody ProductModelDto productModelDto) { |
| | | public AjaxResult addOrEditProductModel(@RequestBody ProductModelDto productModelDto) throws IOException { |
| | | return toAjax(productModelService.addOrEditProductModel(productModelDto)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Log(title = "导入产品",businessType = BusinessType.IMPORT) |
| | | @PostMapping("import") |
| | | public AjaxResult importProduct(MultipartFile file) { |
| | | return AjaxResult.success(productModelService.importProduct(file)); |
| | | public void importProduct(HttpServletResponse response,MultipartFile file) { |
| | | productModelService.importProduct(file,response); |
| | | } |
| | | |
| | | /** |