888
Jinquan_Ou
2023-04-06 1c741aeeb78327e9ce93e6c2248e3aa779cdb030
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEventController.java
@@ -67,14 +67,7 @@
    @PostMapping("/importData")
    public AjaxResult importData(@RequestParam("excelImport") MultipartFile file) throws Exception
    {
        ExcelUtil<ZfEvent> util = new ExcelUtil<>(ZfEvent.class);
        List<ZfEvent> eventList = util.importExcel(file.getInputStream());
        log.info("家庭大事件列表为:{}",eventList);
        if (zfEventService.saveBatch(eventList)) {
            return AjaxResult.success("导入数据成功");
        }
        return AjaxResult.error("导入数据失败");
        return zfEventService.importExcel(file);
    }
@@ -96,7 +89,7 @@
    @PostMapping
    public AjaxResult add(@RequestBody ZfEvent zfEvent)
    {
        return toAjax(zfEventService.save(zfEvent));
        return toAjax(zfEventService.addEvent(zfEvent));
    }
    /**