zhou zhou
2 天以前 691bee4229856f8bf81c2720092ecee1c9f21509
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/LocReviseController.java
@@ -40,26 +40,25 @@
        BaseParam baseParam = buildParam(map, BaseParam.class);
        PageParam<LocRevise, BaseParam> pageParam = new PageParam<>(baseParam, LocRevise.class);
        PageParam<LocRevise, BaseParam> page = locReviseService.page(pageParam, pageParam.buildWrapper(true));
        buildPageRowsUtils.userNameMap(page.getRecords());
        return R.ok().add(page);
        return R.ok().add(buildPageRowsUtils.rowsMap(page));
    }
    @PreAuthorize("hasAuthority('manager:locRevise:list')")
    @PostMapping("/locRevise/list")
    public R list(@RequestBody Map<String, Object> map) {
        return R.ok().add(locReviseService.list());
        return R.ok().add(buildPageRowsUtils.rowsMap(locReviseService.list()));
    }
    @PreAuthorize("hasAuthority('manager:locRevise:list')")
    @PostMapping({"/locRevise/many/{ids}", "/locRevises/many/{ids}"})
    public R many(@PathVariable Long[] ids) {
        return R.ok().add(locReviseService.listByIds(Arrays.asList(ids)));
        return R.ok().add(buildPageRowsUtils.rowsMap(locReviseService.listByIds(Arrays.asList(ids))));
    }
    @PreAuthorize("hasAuthority('manager:locRevise:list')")
    @GetMapping("/locRevise/{id}")
    public R get(@PathVariable("id") Long id) {
        return R.ok().add(locReviseService.getById(id));
        return R.ok().add(buildPageRowsUtils.rowsMap(locReviseService.getById(id)));
    }
    @PreAuthorize("hasAuthority('manager:locRevise:save')")
@@ -71,7 +70,7 @@
        locRevise.setUpdateBy(getLoginUserId());
        locRevise.setUpdateTime(new Date());
        return R.ok("Save Success").add(locReviseService.saveRevise(locRevise));
        return R.ok("Save Success").add(buildPageRowsUtils.rowsMap(locReviseService.saveRevise(locRevise)));
    }
    @PreAuthorize("hasAuthority('manager:locRevise:update')")
@@ -83,7 +82,7 @@
        if (!locReviseService.updateById(locRevise)) {
            return R.error("Update Fail");
        }
        return R.ok("Update Success").add(locRevise);
        return R.ok("Update Success").add(buildPageRowsUtils.rowsMap(locRevise));
    }
    @PreAuthorize("hasAuthority('manager:locRevise:remove')")
@@ -93,7 +92,7 @@
        if (!locReviseService.removeByIds(Arrays.asList(ids))) {
            return R.error("Delete Fail");
        }
        return R.ok("Delete Success").add(ids);
        return R.ok("Delete Success").add(buildPageRowsUtils.rowsMap(ids));
    }
    @PreAuthorize("hasAuthority('manager:locRevise:list')")
@@ -107,13 +106,13 @@
        locReviseService.page(new Page<>(1, 30), wrapper).getRecords().forEach(
                item -> vos.add(new KeyValVo(item.getId(), item.getId()))
        );
        return R.ok().add(vos);
        return R.ok().add(buildPageRowsUtils.rowsMap(vos));
    }
    @PreAuthorize("hasAuthority('manager:locRevise:list')")
    @PostMapping("/locRevise/export")
    public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
        ExcelUtil.build(ExcelUtil.create(locReviseService.list(), LocRevise.class), response);
        ExcelUtil.build(ExcelUtil.create(buildPageRowsUtils.rowsMap(locReviseService.list()), LocRevise.class), response);
    }
}