| | |
| | | * 根据宠物id获取相关备忘录 |
| | | */ |
| | | @GetMapping |
| | | public AjaxResult getByPetId(@PathParam("pid")Long pid){ |
| | | public AjaxResult getByPetId(@PathParam("pid")String pid){ |
| | | return zfPetNoteService.getAllPetNoteByPetId(pid); |
| | | } |
| | | |
| | |
| | | /** |
| | | * 获取导入模板 |
| | | */ |
| | | @GetMapping("/model") |
| | | @PostMapping("/model") |
| | | public void getExportModel(HttpServletResponse response){ |
| | | List<ZfPetNote> list = Collections.singletonList(new ZfPetNote()); |
| | | ExcelUtil<ZfPetNote> util = new ExcelUtil<>(ZfPetNote.class); |
| | | util.exportExcel(response,list,"魅宠备忘录记录数据"); |
| | | util.exportExcel(response,list,"魅宠备忘录导入模板"); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | @Log(title = "用户管理", businessType = BusinessType.IMPORT) |
| | | @PostMapping("/importData/{pid}") |
| | | public AjaxResult importData(@RequestParam("excelImport") MultipartFile file,@PathVariable Long pid) throws Exception |
| | | public AjaxResult importData(@RequestParam("excelImport") MultipartFile file,@PathVariable String pid) throws Exception |
| | | { |
| | | ExcelUtil<ZfPetNote> util = new ExcelUtil<>(ZfPetNote.class); |
| | | List<ZfPetNote> eventList = util.importExcel(file.getInputStream()); |