| | |
| | | /** |
| | | * 获取导入模板 |
| | | */ |
| | | @GetMapping("/model") |
| | | @PostMapping("/model") |
| | | public void getExportModel(HttpServletResponse response){ |
| | | List<ZfPet> list = Collections.singletonList(new ZfPet()); |
| | | ExcelUtil<ZfPet> util = new ExcelUtil<>(ZfPet.class); |
| | | util.exportExcel(response,list,"魅宠记录数据"); |
| | | util.exportExcel(response,list,"魅宠记录导入模板"); |
| | | } |
| | | |
| | | /** |
| | |
| | | ExcelUtil<ZfPet> util = new ExcelUtil<>(ZfPet.class); |
| | | util.exportExcel(response, list, "魅宠记录数据"); |
| | | } |
| | | /** |
| | | * 导出魅宠记录列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:property:export')") |
| | | @Log(title = "魅宠记录", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export1/{ids}") |
| | | public void export(HttpServletResponse response, @PathVariable Long[] ids) |
| | | { |
| | | List<ZfPet> list = zfPetService.selectByIds(ids); |
| | | log.info("导出记录为:{}",list); |
| | | ExcelUtil<ZfPet> util = new ExcelUtil<>(ZfPet.class); |
| | | util.exportExcel(response, list, "魅宠记录数据"); |
| | | } |
| | | |
| | | /** |
| | | * 导入魅宠记录列表 |